Problem (Symptom)
On CloudLinux OS 8 / CentOS 8:
- Server doesn’t boot into the CloudLinux kernel after reboot.
- Setting a default kernel with
grub2-set-defaulthas no effect. awk -F\' '$1=="menuentry "…' /etc/grub2.cfgshows limited or unexpected entries.
Cause
RHEL 8–based systems (including CloudLinux 8 and CentOS 8) use Boot Loader Specification (BLS) for kernel management. If GRUB2 is outdated or BLS is not enabled/configured correctly, the system may ignore your default kernel and fail to boot the latest CloudLinux kernel.
Quick Fix Steps
- Update GRUB2 packages
Bashyum update grub2*
- Enable saved default + BLS
Edit /etc/default/grub:
Bashnano /etc/default/grub
Ensure these lines exist:
iniGRUB_DEFAULT=saved
GRUB_ENABLE_BLSCFG=true
Save and exit.
- Regenerate GRUB configs
Run the commands that match existing paths on your system (some may not exist; that’s fine):
Bashgrub2-mkconfig -o /etc/grub2.cfg
grub2-mkconfig -o /etc/grub2-efi.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg
- (Optional) Set CloudLinux kernel as default with
grubby
List kernels:
Bashgrubby --info=ALL | grep ^kernel
Set the CloudLinux kernel:
Bashgrubby --set-default /boot/vmlinuz-<cloudlinux-kernel-version>
Check default:
Bashgrubby --default-kernel
- Reboot and confirm
Bashreboot
After reboot:
Bashuname -r
You should now see the CloudLinux kernel as the running kernel.