How to Reinstall and Repair Grub2 Ubuntu

Description: In this tutorial we will explain how to repair or reinstall the Grub2 on Ubuntu.

Follow 5 simple steps mention below and you will get your Grub back.

Step 1:

Prepare USB bootable and  Insert the USB drive or Ubuntu CD and turn the live Ubuntu on.

Step 2:

Mount the partition where Ubuntu is install. If you are not sure then write the command:

sudo fdisk -l

to check the which partition has Ubuntu Installation and type of partition.

To mount the partition give command as follows:

sudo mount /dev/sdXY /mnt

sdXY is your type of partition, in my case it is sda1 so i give ” sudo mount /dev/sda1/mnt”

Step 3:

Now you need to bind the directories which is used by Grub to detect other OS . Give command as follows:

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


sudo chroot /mnt

Step 4:

Now update Grub by following command:

grub-install /dev/sdK

Please replace the (K) in /dev/sdK according to your partition type. In my case “grub-install /dev/sda”

grub-install –recheck /dev/sda


Step 5:

Now the grub is Updated and back to your system, now you need to exit the chroot and unmount the directories like this:

exit &&
sudo umount /mnt/dev &&
sudo umount /mnt/dev/pts &&
sudo umount /mnt/proc &&
sudo umount /mnt/sys &&
sudo umount /mnt

This is all, now restart your system and you will see the grub-2 screen back on your system.

Happy commenting 🙂

Leave a Reply

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