How to kill a hard drive in Linux quietly with an easy way to undo it
We know that we can kill Linux by running the command rm -rf /, but this can’t be undone as your files are gone. Here’s a quick way to make your hard drive look like formatted and how to undo that easily (tested under VMWare with ubuntu), click each picture for more information.
First back up the first 10000 bytes of the hard drive and then replace it with empty data.

Everything seemed to be OK and we could still shut down normally, but……..
After we restart, it won’t boot anymore with an empty MBR and all the partitions are gone! To fix it we need to boot from a boot disk and restore what we backed up.
After all this it everything worked again. Now restart and check it…
Inspiration from my very sad personal experience:
Once upon a time I thought the first 512 bytes of hda1(where my Windows is installed) is the MBR but in fact it’s supposed to be the first 512 bytes of hda, I ran the command “dd if=/dev/zero of=/dev/hda1 bs=512 count=1″ and thought this would reset the MBR, but the Windows partition is ruined instead!
Comments
4 Comments on How to kill a hard drive in Linux quietly with an easy way to undo it
-
traffic on Thu, 7th Sep 2006 12:43 am
hye..
i just put ur link on my blog.
but you didn’t tell me the anchor text so i put ‘angelchen1111′
is it ok??please reply to my email
-
nacho on Sun, 12th Nov 2006 5:14 pm
actually, the mbr are the first 446 bytes of the disk, the next 64 bytes are the partition table and the next 2 are a magic number (55aa) so, if you delete the first 512 bytes of the disk youre basically killing your partition table too and your partitions will be lost, luckily there are tools that can check the disk for specific filesystem signatures and rebuild that (parted)
-
groggyboy on Sun, 12th Nov 2006 10:31 pm
crazy! linux has a self-destruct sequence! mwahahaha!
-
Test on Fri, 30th Mar 2007 1:10 am
Hello
Bye
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!








