CentOS 8 is not booting with the latest kernel
I have installed Centos 8 operating system and it has updated with the installation. There were three kernels listed in the /boot folder 4.8.1, 4.8.10 and 4.8.22. After completing all the installation I have rebooted the server to boot with latest kernel version. Yet, it was found that the server was booted with 4.8.10 kernel not with the latest. Even grub does not show the 4.8.22 kernel to select and boot.
To ensure the what is the default kernel which shows by the OS, run the several commands and ensure the default kernel set to the latest.
# rpm -qa | grep kernel | sort
# grubby --info=ALL | grep ^kernel
# grubby --grub2 --default-title ( It shows that default booting kernel is 4.8.22 even though it has not booted)
# grubby --default-kernel
Above commands set confirm that default kernel is set to the latest (4.8.22). Unfortunately, there were no any error logs related to the issue. I have searched through the google to find out a solution, but most of the google results did not provide a correct solution.
Fortunately while going through deep search I was able find one clue stating that there was a issue with 4.8.22 kernel for several servers. It was a simple solution to address this issue which is reinstall the grub again. As this is test server without having second thought I have reinstalled the grub with the below command.
dnf reinstall grub*
The reboot solve everything after that.
Further reading: https://forums.centos.org/viewtopic.php?t=77412&p=325535
https://www.golinuxcloud.com/change-default-kernel-version-rhel-centos-8/