If this blog helped you in any way, please donate a dollar here

Wednesday, February 23, 2011

Recovering GRUB2 in Ubuntu 10.10

GRUB is the boot-loader (the software that starts or boots the computer to action when it starts up) used on Ubuntu and various other systems. The latest edition of GRUB is GRUB2. It features better maintainability and automation than it's predecessor. However, some people find GRUB Legacy to be easier to use.

Comparisons apart, GRUB2 can be reinstalled to the computer after it has been removed or deleted by this process:




  1. Boot your computer with any Linux based Live CD (Ubuntu for e.g.)
  2. Mount the Linux parition (with /boot folder) into a folder (say /mnt). I assume it is on /dev/sda1
    sudo mount /dev/sda1 /mnt
  3. Do some mountings:
    sudo mount --bind /dev  /mnt/dev && sudo mount --bind /dev/pts  /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys  /mnt/sys
  4. Login to your previous Linux Ubuntu
    sudo chroot /mnt
  5. Now you are root. Run this:
    update-grub
  6. And instrall grub: (assuming /dev/sda is your hard drive device)
    grub-install /dev/sda 
  7. All done now exit
  8. And unmount all the previously mounted filesystems
    sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/proc && sudo umount /mnt/sys
All done!

No comments:

Post a Comment