After applying a kernel update on a Red Hat Enterprise Linux (RHEL) system, the server is still booting with an older kernel despite the new kernel being installed. This document explains how to diagnose and resolve this issue.
Diagnosis Steps
1. Checking Installed Kernels
To list all installed kernels:
rpm -qa | grep kernel
Observation:
The output indicates that multiple kernels are installed, including:
kernel-4.18.0-553.34.1.el8_10.x86_64(latest installed kernel)kernel-debug-4.18.0-553.32.1.el8_10.x86_64kernel-core-4.18.0-553.32.1.el8_10.x86_64
2. Checking the Boot Configuration
To verify the bootloader configuration:
ls -l /boot/
Observation:
- The
/boot/directory contains multiple kernel and initramfs images.
3. Checking GRUB Boot Entries
To verify the bootloader’s saved kernel entry:
cat /boot/efi/EFI/redhat/grubenv
Output Example:
###GRUB Environment Block#####
saved_entry=569c62490b9d4240afb066650e2120eb-4.18.0-553.34.1.el8_10.x86_64
kernelopts=root=/dev/mapper/rhel-root ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never
boot_success=1
boot_indeterminate=0
Key Observations:
saved_entrypoints to4.18.0-553.34.1.el8_10.x86_64, which is the expected new kernel.boot_success=1indicates that the last boot attempt was successful.
4. Checking GRUB Boot Entries
To list all available boot entries:
grubby --info=ALL
Output Example:
index=0
kernel="/boot/vmlinuz-4.18.0-553.34.1.el8_10.x86_64"
...
index=1
kernel="/boot/vmlinuz-4.18.0-553.32.1.el8_10.x86_64+debug"
...
Key Observations:
- The default boot kernel is set to
index=0, which corresponds to the latest kernel.
5. Checking the Default Kernel
To confirm the default kernel:
grubby --default-kernel
Output:
/boot/vmlinuz-4.18.0-553.34.1.el8_10.x86_64
Key Observations:
- The system recognizes the correct default kernel.
Resolution Steps
1. Reinstall the Latest Kernel
To ensure the latest kernel is properly installed:
yum reinstall kernel-4.18.0-553.34.1.el8_10.x86_64 kernel-core-4.18.0-553.34.1.el8_10.x86_64
2. Set the Default Kernel Manually
If the system still boots with the older kernel, manually set the correct kernel:
grubby --set-default /boot/vmlinuz-4.18.0-553.34.1.el8_10.x86_64
3. Verify Default Kernel Index
To check which kernel index is set as default:
grubby --default-index
Expected Output:
0
4. Update GRUB Configuration
If needed, regenerate the GRUB configuration:
grub2-mkconfig -o /boot/grub2/grub.cfg
5. Reboot the System
reboot
6. Verify the Active Kernel After Boot
After rebooting, confirm the system is using the correct kernel:
uname -r
Expected Output:
4.18.0-553.34.1.el8_10.x86_64
Conclusion
By following the above steps, the system should boot with the latest installed kernel. If the issue persists, verify UEFI settings, check for BIOS/firmware updates, and inspect system logs for boot-related errors.
For further troubleshooting, review logs using:
dmesg | less
journalctl -xb









