Reinstaling GRUB using Ubuntu 9.10

You might have been searching for instructions to reinstall grub after upgrading or reinstalling Windows on your systems to get your Ubuntu booting once again. Here are the steps.

  1. Boot to the 9.10 Karmic LiveCD Desktop.
  2. Open a terminal - Applications, Accessories, Terminal.
  3. Determine your normal system partition – (the switch is a lowercase “L”) sudo fdisk -l
    • If you aren’t sure, run df -Th. Look for the correct disk size and ext3 or ext4 format.
  4. Mount your normal system partition:
    • Substitute the correct partition: sda1, sdb5, etc.
    • GRUB 2 counts the first drive as “0″, but the first partition as “1″

    sudo mount /dev/sdXX /mnt

  5. Only if you have a separate boot partition:
    • sdYY is the /boot partition designation (examply sdb3)
    • sudo mount /dev/sdYY /mnt/boot
  6. Mount devices: sudo mount --bind /dev/ /mnt/dev
  7. Chroot into your normal system device: sudo chroot /mnt
  8. Reinstall GRUB 2:
    • Substitute the correct device – sda, sdb, etc. Do not specify a partition number.

    sudo grub-install /dev/sdX

  9. Verify the install (use the correct device, for example sda. Do not specify a partition): sudo grub-install –recheck /dev/sdX
  10. Exit chrootCTRL-D on keyboard
  11. Unmount devices: sudo umount /mnt/dev
    • If you mounted a separate /boot partition: sudo umount /mnt/boot
  12. Unmount last device: sudo umount /mnt
  13. Reboot. reboot

Ubuntu 9.10 now comes with Grub2. To learn more about Grub2 use the following link:

https://help.ubuntu.com/community/Grub2

Enjoy!!!

Leave a comment

5 Comments.

  1. “recheck” option actually has two dashes in front of it.

    –recheck

    Other than that minor typo, this was a wonderful, clear tutorial. Thank you so much.

  2. “–recheck”

  3. This thing won’t print double dashes. Anyway, thanks again.

  4. Your instructions got me a bit closer, but still didn’t work. After running the grub-install script, I got some kind of error like “unable to resolve host ubuntu”. But it then completed and reported “no errors.” Otherwise, everything looked fine… only when I reboot, there’s #@&$&@! Windows again, no sign of GRUB.

Leave a Reply


[ Ctrl + Enter ]

Comment moderation is enabled. Your comment may take some time to appear.

Trackbacks and Pingbacks: