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.
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!