A CloudLinux 8 virtual machine may stop at the GRUB prompt if its boot configuration is missing or damaged. This guide covers checking and regenerating an existing configuration from rescue mode on a UEFI installation; it does not repair every boot-loader problem.

Prepare rescue access

Use the hypervisor console and CloudLinux installation media matching the installed system. Preserve a recoverable backup or snapshot and record the current virtual machine boot settings.

  1. Attach the ISO and boot the virtual machine from it.
  2. Select Troubleshooting, then Rescue a CloudLinux system.
  3. Allow rescue mode to locate and mount the installed system. Confirm the reported mount point before continuing.
  4. If mounted at /mnt/sysroot, enter it:
chroot /mnt/sysroot

Identify the configuration file

Check that the installation’s boot and EFI partitions are mounted correctly. Do not choose an EFI directory merely because its name is centos or almalinux.

findmnt /boot
findmnt /boot/efi
readlink -e /etc/grub2-efi.cfg

Confirm the appropriate configuration layout against the installed CloudLinux version. A small EFI forwarding file is not necessarily damaged or the full configuration to regenerate.

Regenerate a confirmed target

Where /etc/grub2-efi.cfg points to the confirmed full configuration file, resolve its path and display it:

grub_cfg=$(readlink -e /etc/grub2-efi.cfg)
printf '%s\n' "$grub_cfg"

Check the displayed path before continuing. Preserve that file at a new, unused backup destination, then regenerate it:

cp -a -- "$grub_cfg" "${grub_cfg}.before-rebuild"
grub2-mkconfig -o "$grub_cfg"

If the command fails, do not assume the machine is ready to reboot. After successful generation, exit rescue mode, detach the ISO, restore the recorded boot order and test startup through the console. Missing EFI boot entries, Secure Boot problems or damaged disks require separate recovery steps.