RE: i just did a rm -rf /*r as root!!!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, there are a couple of things that you could do.  As far as getting back any files that are not part of the OS installation you're probably out of luck unless you have a tape backup.
 
First, boot from your redhat disk 1 in rescue mode.
Second, mount your hard drive partitions to another directory like /mnt/root, /mnt/var, etc or something.
 
Unfortunately /var and /usr are probably gone, so you might be able to use rpm to reinstall the rpm by redirecting to install with the '--relocate' switch.  if you can get rpm working again you should be able to chroot to your mounted partitions and run 'rpm --rebuilddb' and get the rpm database back.  Once rpm is working you can run 'rpm -Va' to see what files are missing.  With this list of files you can force reinstallation of the packages that have missing files.
 
This can be messy and if you're not that experienced, it may be difficult.  In this case you may be better of rebuilding.  
 
--
Brian

________________________________

From: redhat-list-bounces@xxxxxxxxxx on behalf of bruce
Sent: Thu 4/21/2005 6:14 PM
To: 'General Red Hat Linux discussion list'
Subject: i just did a rm -rf /*r as root!!!



hi...

i stupidly just did a 'rm -rf /*r' and i understand that there's no way to
redo/undo this command.. it seems to have blown away my /usr/bin dir..
although, for all i know, i may have screwed up a lot more...

my question, is there someway that i can reinstall the '/usr/bin' dir.. or
am i pretty much f*ed up. i have fedora core 2. (i've asked th question on
the FC2 list, and they leep telling me that i need to do a complete
reinstall) i thought there was a way to more or less recreate the indoe, or
that there was some way that you can recover if you haven't done anything
with the drive since the 'rm -rf'... i've seen some postings/information on
google that kind of discuss this. but i need more understanding...

this is a critical system that i was putting alot of things on.. i haven't
done anything else to the box after my mistake..

-bruce
bedouglas@xxxxxxxxxxxxx


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subjecthttps://www.redhat.com/mailman/listinfo/redhat-list


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux