Reinstalling Grub legacy Linux boot loader

Reinstalling Grub legacy Linux boot loader. If you have accidentally removed Grub or you set up a dual boot and Windows did here is how to restore it.

1. Boot into a Linux live cd.

2. Make the mount point directory.

mkdir /mnt/recovery

3. Mount the partition(s) of the disk your working on.

sudo mount /dev/sdxx /mnt/recovery

(sdxx being the partition to be mounted i.e sda1).

sudo mount /dev/sda1 /mnt/recovery

Install Grub (yum needs to be substituted to the package manager of your distro, yum, aptitude etc. In this example we will use yum.

chroot /mnt/recovery yum install grub -y

4. Reinstall Grub boot loader to the MBR.

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


Linux, Virtual & Dedicated Servers , ,

Leave a Reply

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

20 − six =