Sometimes, especially if you have just installed Windows operating system alongside with your Ubuntu, your precious Grub boot loader will be wiped out from the MBR (Master Boot Record) from your hard disk. How do you restore it?
The steps here have been tested with Ubuntu 9.10.
- Boot into the Ubuntu Live CD or USB stick.
- Open a terminal with 'Accessories' -> 'Terminal'.
- Find out the partition that correspond to your root
/. If you have a separate partition for/boot, find it out too. The commandsudo fdisk -lmay help. Here we assume that the partitions are/dev/sda1and/dev/sda2(if any) respectively. - Now mount your root partition with
sudo mount /dev/sda1 /mnt. If you have a separate partition for/boot, mount it too withsudo mount /dev/sda2 /mnt. - Restore Grub with
sudo grub-install --root-directory=/mnt /dev/sda. (Assume that you want to install Grub to the MBR of /dev/sda.)
Reboot your computer and it should work fine now.
Bookmark/Search this post with:

Digg
Facebook
Google
Yahoo
Technorati