View previous topic :: View next topic |
Author |
Message |
esapersona n00b
Joined: 17 May 2003 Posts: 16 Location: Perth, Western Australia
|
Posted: Mon Jun 16, 2003 7:34 am Post subject: 'rm -rf /' ?(The wonders of 'emerge -e') |
|
|
ArgH!
I thought that I would benchmark some different filesystems (encrypted and not) and wrote a script to help me out. A portion of that script:
Ran great until I thought I'd try something different:
Code: | #time ./bench "/mnt/stor..... /mnt/fileSystem..." |
Forgetting that the quotes would become $1...DOH! (because $2 was now empty, the rm -rf $2/* became rm -rf /*)
But that's okay - Thanks to my quick reflexes , I managed to ctrl-c. Only a few symlinks in /dev, and my /bin directory died. (thanks to whoever thought to not have /boot mounted automatically in the install instructions!).
But here is my tip:
My friend suggested I reinstall, but don't allow anything to be overwritten...but Gentoo is freaking great and has a better solution:
I slapped my knoppix cd in and untar'd my stage1 tarball into a ramdisk. I then copied the /bin part over to my crippled partition, chrooted and typed:
And soon, if that doesn't fix everything:
Perhaps this really doesn't need to be posted, but I felt that I should just in case someone else does something similar and doesn't have a friend to bring up these brilliant suggestions...
(and also so that someone can point out anything else that I may need to do ) |
|
Back to top |
|
|
russo79 n00b
Joined: 22 May 2003 Posts: 27
|
Posted: Mon Jun 16, 2003 12:39 pm Post subject: |
|
|
Better yet:
Use qpkg -I -c -v to check all the damaged packages
and emerge only the ones that have files the are missing!!!
Just my 2 cents
Last edited by russo79 on Fri Feb 18, 2005 9:42 pm; edited 1 time in total |
|
Back to top |
|
|
esapersona n00b
Joined: 17 May 2003 Posts: 16 Location: Perth, Western Australia
|
Posted: Mon Jun 16, 2003 1:27 pm Post subject: |
|
|
Hmm...That would be good, if I had qpkg =/
It's not a standard Gentoo thing, is it?
*edit* RTFM (okay - qpkg is in gentoolkit) Thanks alot! =) */edit*
Last edited by esapersona on Mon Jun 16, 2003 1:51 pm; edited 1 time in total |
|
Back to top |
|
|
bsolar Bodhisattva
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Mon Jun 16, 2003 1:50 pm Post subject: |
|
|
esapersona wrote: | It's not a standard Gentoo thing, is it? |
It's in the gentoolkit package. _________________ I may not agree with what you say, but I'll defend to the death your right to say it. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|