Fedora Linux Support Community & Resources Center
  #1  
Old 12th November 2005, 08:35 AM
eijckron Offline
Registered User
 
Join Date: Nov 2005
Posts: 4
Accidently deleted /sbin, howto restore?

I accidently deleted the /sbin directory of my FC4 installlation (yes I know how stupid that is :-). The system is still up. Is there any way to restore the content of this directory so I can safely reboot my machine?
Reply With Quote
  #2  
Old 12th November 2005, 10:58 AM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
Is the directory still in the "Trash". That is, having deleted /sbin from within the file-browser.
Then you can drag and drop directory back from where you deleted it from. If you emptied the trash, maybe google can help.
If you have used the command line to delete the directory with the 'rmdir' command, it would usually only do that if there where no files in it.
Otherwise, if you did "rm -fR *.* /sbin" on an ext3 filesystem, oh boy.
__________________
Ziggy
Reply With Quote
  #3  
Old 12th November 2005, 02:03 PM
eijckron Offline
Registered User
 
Join Date: Nov 2005
Posts: 4
It was rm -fr /sbin :-(
Reply With Quote
  #4  
Old 12th November 2005, 02:09 PM
Zigzagcom Offline
Registered User
 
Join Date: Feb 2005
Location: CALIFORNIA, yeah
Age: 86
Posts: 1,657
This is not windows...LOL, did 'ya think it was spyware?
...or just messing around. Hope you can backup your file. Try Knoppix, if all else fails.
__________________
Ziggy
Reply With Quote
  #5  
Old 12th November 2005, 02:37 PM
eijckron Offline
Registered User
 
Join Date: Nov 2005
Posts: 4
I know it was stupid. I was cleaning up a subdirectory for an oldinstall (/oldhd). I Had the CD in /oldhd and wanted to delete sbin from there. The problem was typing a / in front of sbin :-)
Reply With Quote
  #6  
Old 12th November 2005, 03:01 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,305
About the only thing you can do is find another machine and copy /sbin from there.
Reply With Quote
  #7  
Old 12th November 2005, 03:09 PM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
Yup. Or do a reinstall of ALL packages on your system. That would suck... You'd have to download every single package on your system again, then run
rpm -Uhv ./*.rpm --replacefiles
Best idea is do an Upgrade install of Fedora so you don't lose your /home.
Remeber to backup /etc/ first.
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #8  
Old 12th November 2005, 05:00 PM
eijckron Offline
Registered User
 
Join Date: Nov 2005
Posts: 4
Thanks for the ideas. I think I'll try to do an install to another harddrive and then copy over the /sbin directory. Thats probably faster then the rpm trick.
Reply With Quote
  #9  
Old 12th November 2005, 08:25 PM
Firewing1's Avatar
Firewing1 Offline
Administrator
 
Join Date: Dec 2004
Location: Canada
Age: 22
Posts: 9,224
yeah... seriously... lol
The thing is then yo'll also have to install the other programs that put files into /sbin.
eg, usb-utils, smart, and root program.
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #10  
Old 12th November 2005, 09:31 PM
linmix's Avatar
linmix Offline
Registered User
 
Join Date: Jan 2005
Posts: 626
Quote:
Originally Posted by Firewing1
Yup. Or do a reinstall of ALL packages on your system. That would suck... You'd have to download every single package on your system again, then run
rpm -Uhv ./*.rpm --replacefiles
Best idea is do an Upgrade install of Fedora so you don't lose your /home.
Remeber to backup /etc/ first.
Firewing1
Unless you've used yum to update the system and haven't cleaned out all the rpms. In that case you could back-up /var/cache/yum/* (on cd /dvd or on another partition) and /home (provided it isn't already on another partition) and then do a new install after which you put /var/cache/yum back into place and do a 'yum -y update'. THere'd still be the matter of additional packages you may have added through yuma nd that are not available on the dvd/cd, but you could reinstall those from the yum cache manually.
__________________
You can find out what book a person needs by asking the question, "Do you want to be a Muggle or a Wizard?"

(1) If they answer "Wizard", then you give them RUTE.
(2) If they answer "Muggle", then you give them "Linux for Dummies."
(3) If they answer "What's a Muggle?", then you give them "Harry Potter".
Reply With Quote
  #11  
Old 12th November 2005, 09:46 PM
linmix's Avatar
linmix Offline
Registered User
 
Join Date: Jan 2005
Posts: 626
Quote:
Originally Posted by Firewing1
Yup. Or do a reinstall of ALL packages on your system. That would suck... You'd have to download every single package on your system again, then run
rpm -Uhv ./*.rpm --replacefiles
Best idea is do an Upgrade install of Fedora so you don't lose your /home.
Remeber to backup /etc/ first.
Firewing1
Unless you've used yum to update the system and haven't cleaned out all the rpms. In that case you could back-up /var/cache/yum/* (on cd /dvd or on another partition) and /home (provided it isn't already on another partition) and then do a new install after which you put /var/cache/yum back into place and do a 'yum -y update'. THere'd still be the matter of additional packages you may have added through yuma nd that are not available on the dvd/cd, but you could reinstall those from the yum cache manually.
__________________
You can find out what book a person needs by asking the question, "Do you want to be a Muggle or a Wizard?"

(1) If they answer "Wizard", then you give them RUTE.
(2) If they answer "Muggle", then you give them "Linux for Dummies."
(3) If they answer "What's a Muggle?", then you give them "Harry Potter".
Reply With Quote
Reply

Tags
accidently, deleted, howto, or sbin, restore

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
accidently deleted the crontab file jerry08 Using Fedora 2 6th January 2009 05:18 PM
/var/log accidently deleted Camino Using Fedora 2 8th October 2005 02:10 PM
accidently deleted rpm installer. cykill Using Fedora 1 4th September 2005 10:23 AM
Accidently deleted kernel source Bonez Using Fedora 15 23rd August 2005 09:25 AM
I accidently deleted /tmp... what now? Bear Knuckle Using Fedora 3 13th April 2005 09:36 AM


Current GMT-time: 18:24 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat