Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Search this Thread
Old 04-13-2012, 02:59 PM   #1
LQ Newbie
Registered: Apr 2012
Posts: 2

Rep: Reputation: Disabled
Question 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:

srv:/home/username# mv ftproot /* ./
(one accidental space after the 'ftproot')

Command used to fixed it was something like:
srv:/home/username# /home/username/lib/ --library-path /home/username/lib /home/username/bin/mv /home/username/* /
Old 04-13-2012, 06:52 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,009
Blog Entries: 11

Rep: Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904Reputation: 904
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

Old 04-13-2012, 07:08 PM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,552

Rep: Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083
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 rather than; any particular reason ?.

Last edited by syg00; 04-13-2012 at 07:12 PM.
Old 04-13-2012, 09:15 PM   #4
LQ Newbie
Registered: Apr 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
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 because the original fix command I found on the forum did not work, becuase the executable was a symlink:

/lib/ -> /lib32/
It gave me an error and I shat myself becuase I did not know what it would be called, I had no working ls.
So in desperation and thinking the system is dead for sure, why not try:

srv:/home/username# /home/username/lib/ld-*.so --library-path /home/username/lib /home/username/bin/mv /home/username/* /
Which seemed to work (I am not assuming of course, hence this original post).

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.

Old 04-13-2012, 10:29 PM   #5
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,552

Rep: Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083Reputation: 1083
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to ensure USB HDD is detectable at boot time ? ranpkri55 Linux - Hardware 7 02-23-2012 04:04 PM
How to ENSURE email delivery ??? entz Linux - Server 8 08-29-2009 11:38 PM
Does a separate boot partition ensure that grub doesn't get deleted easily? samrat_rao Linux - General 1 02-15-2009 03:24 AM
How to ensure paths are set during boot greengrocer Linux - Newbie 3 04-14-2007 01:47 AM
how to ensure only one record exist with the same name. meluser Programming 5 03-18-2003 03:12 PM

All times are GMT -5. The time now is 05:52 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration