How to install GRUB in rescue disk ?

During rescue disk, there can be problems with grub-installation if we are not able to ‘chroot’ in the correct OS environment.
so, if the rescue mode of a Linux OS allows you to run grub from the command line, then installing grub can be done like this

grub-install /dev/sda –root-directory=/mnt/boot

for this, MBR is on /dev/sda and the boot directory with the grub files is located/mounted at /mnt/boot

Rescue Disk is quite different from Linux Rescue Mode.
Rescue Disk is similar to LiveCD

The above command works in Rescue Disk as it does not contain chroot

To install grub in rescue mode.

1. Please find hard-disk name(sda or sdb)

fdisk -l

2. enter into the partition

chroot /mnt/sysimage     –> hard-disk mounted under this path while server in rescue mode.

3. grub-install /dev/sda

The above cmd for re-install grub boot loader.

The above fix is to install Grub in Linux Rescue Mode

Advertisements

One thought on “How to install GRUB in rescue disk ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s