Reinstall GRUB in Ubuntu

My brother asked me to repair his boot loader after he accidentally erased his MBR. This can be done easily via a LiveCD and the command line.

Boot the system using a LiveCD (I used Ubuntu from a USB stick) and do the following:

$ sudo mount /dev/sda /mnt
$ sudo mount --bind /usr/sbin /mnt/usr/sbin
$ sudo mount --bind /usr/lib /mnt/usr/lib
$ sudo mount --bind /dev/ /mnt/dev
$ sudo chroot /mnt

# grub-install /dev/sda

I hope it will be useful for others as well, as the Ubuntu community documentation offers a solution based on Boot-Repair, which seems like overkill to me.

Leave a Reply

Your email address will not be published. Required fields are marked *