Did you know  45Drives offers free  public and private  webinars ? Click here to learn more  & register! Build & Price

KB450238 – Recovering a Corrupted CentOS Boot Partition

You are here:


How to repair a CentOS installation that is stuck booting into GRUB.



  • A unit that is unable to properly boot into CentOS
  • Access to the IPMI management port on the 45 Drives unit
  • Java installed for ISO mounting
  • ISO for the matching version of CentOS 7 downloaded



  • Open the Java IPMI management tool from the IPMI web GUI



  • Click “Virtual Media”, followed by “Virtual Storage”.



  • Select the drive type. In this case, ISO, and navigate to the file



  • Click “Plug In” then “OK”


  • Reboot the unit using “Power Control” and “Set Power Reset”. When the unit is reboot, hammer the F11 key until the boot menu appears.


  • Select ATEN Virtual CDROM YSOJ



  • Select Troubleshooting, then Rescue a CentOS System



  • This will boot the unit into Anaconda Recovery mode. From here, we can repair the OS installation.


  • Enter 1 to continue


  • Press enter to engage the shell, then input “chroot /mnt/sysimage” to enter bash.


  • From here, we can use lsblk to identify which drives are being used as our boot drives. In this case, it’s sda and sdb


  • Next step is to re-write the MBR of the boot devices using grub2install. If you have redundant boot drives, you will have to repeat this step for both devices.


  • Navigate to /boot/grub2 and check the directory. Grub.cfg should be present.


  • From here, we’ll need to generate a new grub.cfg file using the following command:
    grub2-mkconfig -o /boot/grub2/grub.cfg


  • Exit from chroot and reboot the system using init 6 in the shell.


  • Boot into the OS and ensure it will properly post.
Was this article helpful?
Dislike 0
Views: 2541
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access