Will remote Debian 6 boot ok (after a '/*' mv) what can I do to ensure?
Hello I was working as root on a Debian 6.0.4 Linux 2.6.32-5-amd64 Server (over ssh)
I accidentally moved the entire '/*' filesystem into a subdirectory I was in, leaving the system quite unusable (no commands worked, even with new absoloute path given). (Yes, I learnt a big lesson here, don't use root all the time and be VERY careful with mv & rm etc). Now after a fix found here (listed below), the system seems ok, sshd, apache2/php5, ls, mv, cp, cron, mount etc. I have not rebooted it yet. I just want to know what I can do/check to ensure it will boot (if it ever needs to) with at least working ssh access, becuase I don't have physical access if it does not boot. This is what I did wrong and the fix: Code:
srv:/home/username# mv ftproot /* ./ Command used to fixed it was something like: Code:
srv:/home/username# /home/username/lib/ld-2.11.3.so --library-path /home/username/lib /home/username/bin/mv /home/username/* / |
Hi, welcome to LQ!
I can't guarantee that it will work, but it looks sane enough, apart from the fact that a few files/directories that actually belong in your home will have ended up in / ... If this is a remote server: does your hoster provide any backup/restore facilities? Cheers, Tink |
Nice.
Note the title of the person that (originally) provided that answer ... I would expect that ftproot (at least) will also be in the wrong place. Edit: just noticed the OP used ld.so rather than ld-linux.so; any particular reason ?. |
Hi thanks it's good to be here!
@both repliers: Yes sorry I ommitted that the home dir files ended up in / but I just moved them back (no filename conflicts with original /* stuff). @Tinkster: it seemed to work, in that it moved everything from that folder back into /, I could see that with an ls -lA. My issue is just I am scared that if I reboot it (soon or in the far future) it may not come back up becuase of something I overlooked/do not know about like proc files etc I have no idea really which is why I asked here where I consider there are some people who know a lot more than me about Linux files and the boot process/ssh requirements etc. The host does not back up this machine automatically, that's down to us really (it is backed up, I would just rather it not have downtime). @syg00 LOL. I think I executed ld-2.11.3.so because the original fix command I found on the forum did not work, becuase the executable was a symlink: Code:
/lib/ld-linux.so.2 -> /lib32/ld-linux.so.2 So in desperation and thinking the system is dead for sure, why not try: Code:
srv:/home/username# /home/username/lib/ld-*.so --library-path /home/username/lib /home/username/bin/mv /home/username/* / So overall, any tips to make sure it will boot and run net & sssh etc? I know that's vague but is there like a checklist or a command I can run to test bootup files/scripts etc or anything? If not I'll probably reboot it & prepare for the worst at the weekend when there's less load on it to see/fix. Cheers. |
Fair enough - I should have checked first, before asking.
Can't comment on the general commands, but you'd hope they'd be o.k. As for booting, depends on the loader - presuming (either) grub, you should be o.k. Go get bootinfoscript to see if everything can be found o.k. |
All times are GMT -5. The time now is 08:20 AM. |