How to rebuild GRUB on CloudLinux 8 with UEFI for Boot Issues

January 17, 2025 / How-to Guide

If your CloudLinux 8 server with UEFI is entering the GRUB shell after a reboot, the issue may be caused by a misconfigured or corrupted GRUB configuration file (grub.cfg).

OS: CloudLinux 8
Platform: Windows Hyper-V

This article provides a step-by-step guide on how to rebuild the grub.cfg file for UEFI systems to resolve boot issues and restore normal server operation.

Follow the guide:

  1. Download the CloudLinux ISO for the version installed on your server.
  2. Attach the ISO to the virtual machine and boot into rescue mode.
  3. Change the boot order from the file to DVD and reboot the server/VM.
  4. Once booted from the ISO, select the Troubleshooting option.
  5. Choose the option to Rescue a CloudLinux system.
  6. Select option 1 to continue.
  7. Press Enter and type the following command to chroot into the system:
    chroot /mnt/sysroot
  8. Navigate to /boot/efi/EFI. You will find two folders: almalinux and centos.
    1. Check which folder contains the grub and shimx64 files.
    2. Go to the Centos directory, as it contains the required files.
    3. Check the grub.cfg file, and if it is blank, regenerate the file by running the following command:
      # grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
  9. Turn off the server/VM, remove the ISO, and revert the boot order if required. Then, start the server again.

By following these steps, you can rebuild the GRUB configuration on your CloudLinux 8 server, fixing any boot issues related to a misconfigured grub.cfg file.

If you encounter any issues or need further assistance, feel free to contact our support team.

Spread the love