HOWTO: Restore GRUB (if your MBR is messed up)
Restoring GRUB (the GRand Unified Bootloader) is quite simple in Ubuntu; instead of going through all of the "gain root access" steps, and playing with confusing shell commands, you can simply use the Ubuntu installation CD (the alternate version if you use dapper) to restore it without going through all of the previous hassles.
[edit]
Here are the steps
- Boot your computer with Ubuntu CD.
- Go through the install process until you reach "[!!!] Disk Partition."
- Select Manually Partition.
- Mount the appropriate linux partions:
/
/boot
swap
DO NOT FORMAT THEM - Finish the manual partitioning.
- Select "Yes" when it asks you to save the changes.
- It will give you errors saying that "The system couldn't install ....." after that; ignore them. Proceed with selecting "continue" until you get back to the Ubuntu installation menu.
- Jump to "Install GRUB."
- Once it is finished, simply restart your computer.
Good luck!