How to Recover or Rescue Corrupted Grub Boot Loader in CentOS 7

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

5 Responses

  1. Mike Robinson says:

    The method for fixing a bad boot sector clearly doesn’t work in Centos 7.5. I’m getting the same results as Vijay.

    The /usr/lib/grub/ directory on my server contains another directory: /i386-pc. There is no /x86_64.efi directory anywhere on the server.

    Where is the author? Missing in action?

    You will be wasting your time if you follow the author’s instructions for repairing a bad boot sector.

  2. vijay says:
    # chroot /mnt/sysimage
    # lsblk
    

    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 238.5G 0 disk
    sda1 8:1 0 120M 0 part /boot/efi
    sda2 8:2 0 180G 0 part /
    sda3 8:3 0 14G 0 part [SWAP]
    sda4 8:4 0 43G 0 part /home

    # /sbin/grub2-install /dev/sda
    

    I am getting error like:

    /sbin/grub2-install: error : /usr/lib/grub/x86_64.efi/modinfo.sh doesn't exist. Please specify --target or --directory

    Can you please tell me what I need to do for this error

  3. Jamie says:

    Hey. Great article. Almost perfect but when I get to the grub2-install step it doesn’t work. It says only grub2-macbless in the list instead of all the ones you list. I tried reinstalling the grub files but it says there is an error with YUM on YumMain line 28 not found. Any ideas on what this is?

    • Chris says:

      It sounds like you didn’t successfully chroot to /mnt/sysimage?

      • Mike Robinson says:

        chroot doesn’t fix the problem.

        It sounds like there may be more than one reason why a Centos 7 system that has been operating successfully for several years suddenly decides not to boot up again. This article doesn’t consider any alternatives.

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.