LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2006, 08:02 PM   #1
joose
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Rep: Reputation: 0
Deleted /bin and more, help me unscrew myself.


So by matter of typo, i managed to basically execute rm -r * as root in /

As far as I can tell /bin and /etc are completely gone.

My important files are in /home/useraccount.

I only have 2 open ssh clients, and if they disconnect, I can't reconnect to the server. The servers too far away to simply go to, and an OS reload costs money. I'd at least like to back up my files before having to reformat.

I can use wget...so I tried copying over some bash files (ls / mkdir) but got permission denied...and chmod is gone do I can't change the permissions...

Anyone have any suggestions or should I just give up?
 
Old 03-16-2006, 08:08 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
I'd honestly suggest backing up the home directories and reinstalling. Chances are you've deleted eenouygh critical system libraries that recovery will be difficult without booting to a LiveCD and re-installing the base system packages. If you can't do that, I'd suggest a reinstall.

Sounds like you learned a lesson about being careful with rm and the root account.
 
Old 03-16-2006, 08:10 PM   #3
joose
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Thats the problem...I can't think of any way to back it up.
 
Old 03-16-2006, 08:12 PM   #4
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Try reinstalling with the 'upgrade' option.
 
Old 03-16-2006, 08:20 PM   #5
joose
LQ Newbie
 
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
It's a self dedicated server, so os reloads cost money, but I managed to restore /bin by zipping /bin off my home linux box and unzipping it off the server, seems to have retained the permissions, will post here if i run into any problems.
 
Old 03-16-2006, 08:51 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You should check and see if your /lib is still intact (hopefully it is). If you're using a RPM based distro the -V (verify) option to RPM can help quite a lot.
 
Old 03-17-2006, 01:00 AM   #7
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Assuming that /home is on its own partition, you could simply reinstall. The critical step however would be that during the partitioning step, do NOT reformat /home. Simply leave it as is, then continue the installation normally. What you'd more or less be doing would be to re-install the distro "around" /home.

Note that this approach would also allow you to switch from one distro to another pretty painlessly. Again, the key is just that /home must exist on its own partition.
 
  


Reply



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
I deleted /bin/ls in slackware 10.1 swatward Linux - Software 2 12-10-2005 03:04 PM
Accidently deleted the wastebin, now no "bin icon jebus69 Linux - Newbie 6 11-23-2005 08:34 PM
deleted trash bin + desktop folder?? psa Linux - Newbie 3 01-26-2005 11:43 PM
Accidentally deleted /usr/bin/net larley Linux - General 2 07-26-2004 10:22 PM
Deleted Bin, Daemon, Adm, and Lp Users, now to fix it... KneeLess Linux - Newbie 3 05-17-2003 11:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:11 AM.

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