Reinstalling GRUB 2 from LiveCD
If you cannot boot from GRUB 2 and need to reinstall it, here is the simple method. For more details or for advanced options, refer to the Ubuntu community documentation here: Grub2 - Reinstalling GRUB 2:
* Boot the Karmic or Lucid LiveCD (Try without installing).
* From the Desktop, open a terminal - Applications, Accessories, Terminal.
* Determine your normal system partition - `sudo fdisk -l` (That is a lowercase L)
* If you aren't sure, run `df -Th`. Look for the correct disk size and ext3 or ext4 format.
* Mount your normal system partition:
Code:
sudo mount /dev/sdXY /mnt
o Example: sudo mount /dev/sda1 /mnt
o Note: The partition to mount is normally the partition on which Ubuntu was installed: sda1, sdb5, etc. If you have a separate /boot partition, use the device on which the /boot partition is located. Grub 2 works best when installed in the MBR of the drive to which BIOS boots. Also remember that you mount the partition (including the number) in this step, but you do not include the partition number when you run the "sudo grub-install" command later.
o Note: GRUB 2 counts the first drive (X) as "0", but the first partition (Y) as "1"
* Only if you have a separate boot partition:
o
Code:
sudo mount /dev/sdXY /mnt/boot
with sdXY being your /boot partition designation.
* Reinstall GRUB 2:
Code:
sudo grub-install --root-directory=/mnt /dev/sdX
*
o Example: sudo grub-install --root-directory=/mnt /dev/sda
o Note: Substitute the device on which Ubuntu was installed - sda, sdb, etc. Do not specify a partition number.
Now you need to unmount the root system but, if you have a separate boot partition which you mounted earlier, you should unmount this first, eg: "sudo umount /mnt/boot".
* Unmount the partition:
Code:
sudo umount /mnt
* Reboot.
Bookmarks