From our previous slide, our situation isn't nearly as bad as it looks. All of the operating systems and all of their data is still in place. We have simply overwritten the boot loader with zeros so that the boot loader can no longer load any of the operating systems.

To fix the machine we boot the machine with most any live cd (Knoppix is great, but your distros install cd should work). Now we'll use the GRUB application from the live cd to reinstall the first stage of the GRUB bootloader (the first stage is the part that is stored in the first 446 bytes of the hard drive which we overwrote with zeros).

When the live CD is booted we need to mount the root partition from the OS which installed GRUB last with write permissions using the following command if you are using something like Knoppix

mount -o rw /mnt/hda1
or these commands are more generic
mkdir /mnt/hda1
mount -o rw /dev/hda1 /mnt/hda1
Now we type the following command to reinstall the GRUB first stage (need root permissions).
grub-install --root-directory=/mnt/hda1 /dev/hda
Now when we reboot, GRUB works again and has the same menu entries as before.