Thursday, September 16, 2010

Wednesday, September 1, 2010

Recover GRUB menu after Ubuntu 9.10 update

A couple the GRUB menu got screwed up after an update. The recover process can be found here. But I had to take a couple additional steps to fix my GRUB.

  1. Figure what your where your /boot and /root partition is installed in. My /boot was /dev/sdc2 and /root was /dev/sdc3.
  2. Mount /root to /mnt using sudo mount /dev/sdc3 /mnt
  3. Mount /boot to /mnt/boot using
    mount /dev/sdc2 /mnt/boot.
    NOTE: If both /root and /boot are on the same partition then you only have to mount the /root partition.
  4. Check /mnt/boot/grub/device.map for an entry for /dev/sdc.
  5. If /dev/sdc does not exist, then add it using vi. For example, the entries in mine were
    (hd0) /dev/sda
    (hd1) /dev/sdb

    So I added (hd2) /dev/sdc to list.
  6. If this was not added to the list, the /root partition will not be found and the grub recovery will fail.
  7. Next re-install the grub by executing
    sudo grub-install --root-directory=/mnt /dev/sdc
  8. Reboot
  9. Refresh the GRUB 2 menu by executing update-grub2