View Single Post
Old 29-Nov-2007, 03:23 AM   #1 (permalink)
Anilrgowda
Administrator
 
Anilrgowda's Avatar

Posts: 18,715
Join Date: Jan 2006
Rep Power: 10 Anilrgowda is on a distinguished road

IM:
Default Moved the /lib directory on centos linux.. "bad ELF interpreter"... Nothing works..

I have a moderately large problem on a remote server that I haven't got easy physical access to.

Due to working while moderately stressed and under pressure, I embaressingly made an utterly stupid and unforgiveable mistake.

I, for reasons best left unsaid, on a linux server, ran, more or less, the following commands:

cd /
mkdir archive
mv * archive/

This, of course, has resulted in every directory in the / directory being moved to /archive.

feel free to laugh now..

I now have the enviable task of getting every directory in /archive back into / via the one remote shell that I have left open to me (can't open any more obviously).

examples of attempts:

[root@krynn bin]# ls
bash: /bin/ls: No such file or directory
[root@krynn bin]# /archive/bin/ls
bash: ./ls: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

The same response is given for the commands mv, ln, chroot, cp.

I now place my sanity in your hands.. short of arriving physically at the server with a rescue disk and moving the directories back, is there any method that you can possibly think of to get those directories back where they should be via the ssh session I have left open?


------------------


Anilrgowda is offline   Reply With Quote