Recovering your corrupted or overwritten MBR
From FedoraNEWS.ORG
Written by Anze Vidmar on 2005-09-13
Description
This is a quick (3 min) how-to repair/restore your lost or damageed MBR.
Work to be done
The first thing is to grab your bootable cd/dvd of Fedora and make sure your box boots from a cd.
Note: you can also restore your MBR with Live-Cd distro such as Knoppix, but I'll just describe details for Fedora boot cd.
When the Fedora boot screen appears type
linux rescue
...in the prompt.
The system will boot into text-mode a.k.a. rescue boot.
Select language that you prefer and go to the next step, where you also select the keyboard type that you use.
After this step, you are asked if you would like to start your network interface(s). You don't need network for this, so choose "No" button.
Next you'll be asked if it's ok to search for your existing Linux partitions and mount them under /mnt/sysimage. We sure want this to happen, so choose the "continue" button.
In the next step you are informed, that your Linux system was found and it will be mounted under /mnt/sysimage for writing. Choose ok and you're dropped into the rescue console.
The next step is to change the system root path, so that we can actually have our system root mounted on "/". Issue the command:
chroot /mnt/sysimage
When the command executes you have your root system mounted on your actual "/".
The only step left to do is to actually re-write the MBR info. This is done by typeing
grub-install /dev/hda
...in the console, assuming you want to have MBR on your first sector of primary master disk a.k.a. /dev/hda.
You can now safely logout, so the rescue mode reboots your computer and you can start using your grub boot loader again.
Enjoy! ;-)

