Linux, Operating System

Recover Ubuntu GRUB

recover-ubuntu-grub

GRUB is a popular Bootloader.

However, how could we recover GRUB is covered by other Bootloader ?

Recover Ubuntu GRUB
We need to boot with Ubuntu Live Boot Disc.
Open the partition which you have installed GRUB.
Then copy the path of that root of partition.

Recover Ubuntu GRUB
Recover Ubuntu GRUB
However, if you cannot mount that partition with X11 or your Ubuntu Live Boot Disc does not have X11, you need mount that partition manually.
Open the terminal and type

sudo fdisk -l

to view all partitions in your harddisk(s).
You should know where does Ubuntu partition installed. For example /dev/sda5
Then type

sudo mkdir /mnt/sda5

to create a directory for mounting the partition
Next type

sudo mount /dev/sda5 /mnt/sda5

Recover Ubuntu GRUB
After mounting the partition, type

sudo grub-install --root-directory=/mnt/sda5 /dev/sda

Pay attention in this part.
You should know where does your GRUB install to.
If Master Boot Record is in first harddisk, you should type /dev/sda
If Master Boot Record is in second harddisk, you should type /dev/sdb
If Master Boot Record is in third harddisk, you should type /dev/sdc
.
.
.
etc