How to repair the corrupted boot loader and recover it ?

There might be a situation where your boot loader i.e., Grub might not corrupted and you want to recover it or in other word repair it. Basically the reairing of Grub means installing a new grub on the existing one from RHEL 6 DVD.

To recover the grub the steps are as fallows:
  • Insert the RHEL 6 DVD and Make the system boot from CD/DVD
  • Boot the system in rescue  installed system mode.




  • Select the language with which you want to continue and move cursor on OK, press Enter.

  • Select the keyboard Type and move cursor to OK and press Enter to continue.

  • Select local CD/Dvd to make the system boot from it. As the system’s bootloader is corrupt.

  • Move cursor to No to ignore the networking and also to continue.

  •  Move the cursor to Continue tab, to mount the ‘root’ from CD/DVD. Press Enter

  • Observe from above pic, that now your system has been mounted on /mnt/sysimage. It means where our system root is residing.
  • Move the cursor to OK and press Enter to continue.

  • Press Enter to continue.

  • Select  ‘Shell start shell’ and move cursor to OK to start the shell
  • You can observe that a shell prompt is displayed.

  • Change the DVD root to system root by using following command
  • #chroot /mnt/sysimage

  • Check that on which partition does your ‘/boot’ is using #fdisk –l or parted –l command

  • Install the grub on /boot device i.e. /dev/vda2 by using following command
  • #grub-install <device name>
  • #grub-install /dev/vda2
  • If it shows no error reported, that means we have successfully recovered the grub.

  • Type “exit” to exit from system root
  • Againg type “exit” or “reboot” to reboot the system.


Note: Whenever you reinstall boot loader then it is mandatory task is selinux policy…..




Post a Comment