How to re-install GRUB bootloader on the Master Boot Record(MBR) in rescue mode

Solution Verified - Updated -


  • I had to restore my system and data partitions from tape after a crash. Why does my Red Hat Enterprise Linux system only shows a black screen after POST?

  • Why does my Red Hat Enterprise Linux 4 system on a hang on the word GRUB?

  • Why does my Red Hat Enterprise Linux 6 system drops to GRUB rescue prompt on boot?

  • How to reinstall grub2 into the MBR on Red Hat Enterprise Linux 7

    GNU GRUB version 0.97 (638K lower / 3143616K uper memory)
    [ Minimal BASH-like line editing is supported. For the first word. TAB
    lists possible command completions. Anywhere else TAB lists the possible 
    comlettions of a device/filename.]
  • I re-installed Windows on my server and now I can no longer boot to Red Hat Enterprise Linux.

  • On attempting to re-install grub I get the following error:

    grub> root (hd0,0)
    root (hd0,0)
    Error 5: Partition table invalid or corrupt
    grub> setup (hd0)
    setup (hd0)
    Error 12: Invalid device requested
  • The system boot gets stops with the following message:

    GRUB loading stage 2


  • Red Hat Enterprise Linux 3
  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • GRUB

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.