Re:How to trash own root

From: Jean Buchet (jean.buchet@libertysurf.fr)
Date: Mon Oct 30 2000 - 21:43:59 CET


I did it once too :
while logged in as root, I type rm -r ./* without checking I was in the right directory (damned multiple screen sessions). In fact I was in /bin, and yeppah! "roulez jeunesse!"

'Same player, shoot again'
*grin*

Bye
---------------------------------------
From: Michele Andreoli <m.andreoli@tin.it>
Subject: How to trash own root
Date: 27/10/2000 16:54:35
---------------------------------------
Ok, it is happened again: I removed the best part of my Debian sustem, with a gigantic "rm -r /".

This is the script-fragment that caused the disaster:

===========================
.....
floppy=./floppy
Fsck.ext2 /dev/fd0H1722
mount /dev/fd0H1722 $floppy
......
rm -r $FLOPPY/*
===========================

You see the tremendous (and pedagocical) mistake: in the last row
I wrote $FLOPPY, but was intended "$floppy". Now, the FLOPPY variable was blank, so the shell interpreted in this way:

                        mount -r /* :-((((

Obviously, I used the "root" user there. So, with gaiety, the system started to remove every directory in the top of the ierarchy, in alphabetical order:

        /a, /bin/, /boot, /cdrom, /dev, /etc, /home ....

When I interrupted with control-C, the only living was /root, /usr, /var and some other!

Luckyly, my important data was in /root, mounted from
an additional hard-disk, so the muLinux sources are intacts, but
I loss all muLinux website, that was in /home/mulinux.

Using the debugfs utility and the Ext2fs-Undeletion-MiniHowto,
I'm restoring some important file that was in /etc, with
my customization (e.g. Muttrc, etc).

I'm very sad, now: I'm back to the Stone Age. I have to reconfig Apache, enstablish correct return address in Sendmail, Netscape, XWindow, Mutt and so on. A week, full-time.

Take care of your filesystems!

Michele

-- 
"I'd like to conclude with a positive statement, but I can't remember any. Would two negative ones do?"			-- Woody Allen
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:16 CET