rhel 8 kernel update won't display on grub

Latest response

I updated the kernel using yum and it was successfull. but new version is not displayed in grub
Here is the output

$ sudo grubby --info=ALL
index=0
kernel="/boot/vmlinuz-4.18.0-305.el8.x86_64"
args="ro console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 crashkernel=auto audit=1 audit_backlog_limit=8192 ipv6.disable=1 $tuned_params"
root="UUID=d47ead13-ec24-428e-9175-46aefa764b26"
initrd="/boot/initramfs-4.18.0-305.el8.x86_64.img $tuned_initrd"
title="Red Hat Enterprise Linux (4.18.0-305.el8.x86_64) 8.4 (Ootpa)"
id="ffffffffffffffffffffffffffffffff-4.18.0-305.el8.x86_64"

above is the old version

Also /boot directory contains only the old version
vmlinuz-4.18.0-305.el8.x86_64

$ rpm -q kernel
kernel-4.18.0-305.el8.x86_64
kernel-4.18.0-348.2.1.el8_5.x86_64

Responses

The kernel package doesn't contain any files. The vmlinuz files are in the kernel-core packages so that is what you should be checking.

Okay. my goal is to make the new kernel updates activate in the system. When I check with "uname -r", it gives the old version.

The following command would provide better insight into the situation.

$ rpm -qa | grep ^kernel

Also, related to grubby, note that grubby-deprecated is not part of RHEL 8, so on Legacy BIOS systems which boot using extlinux, the /boot/extlinux/extlinux.conf file will not be automatically updated when a new kernel is installed.

Edit: I somehow missed "grub" in the title of the post, so my comment about extlinux isn't relevant. Nevertheless, it's an example of a case where the kernel could successfully update, but not appear in the boot menu.

Here is the output

$ rpm -qa | grep ^kernel
kernel-4.18.0-348.2.1.el8_5.x86_64
kernel-modules-4.18.0-348.2.1.el8_5.x86_64
kernel-modules-extra-4.18.0-348.2.1.el8_5.x86_64
kernel-4.18.0-305.el8.x86_64
kernel-core-4.18.0-305.el8.x86_64
kernel-modules-4.18.0-305.el8.x86_64
kernel-modules-extra-4.18.0-348.el8.x86_64
kernel-core-4.18.0-348.2.1.el8_5.x86_64
kernel-tools-libs-4.18.0-348.2.1.el8_5.x86_64
kernel-core-4.18.0-348.el8.x86_64
kernel-modules-4.18.0-348.el8.x86_64
kernel-modules-extra-4.18.0-305.el8.x86_64
kernel-tools-4.18.0-348.2.1.el8_5.x86_64

Can you try re-installing the kernel and see if the issue persists?

yes. I tried reinstalling both versions. but the issue is still there.

Did you reinstall the kernel-core-4.18.0-348.2.1.el8_5.x86_64 package? Also if /boot is a separate file system, make sure it is mounted.

Yes I tried reinstalling both versions. /boot is in the root

Looking at the kernel-core-4.18.0-348.2.1.el8_5.x86_64 package the corresponding vmlinuz should be created by one its scripts running /bin/kernel-install add 4.18.0-348.2.1.el8_5.x86_64 /lib/modules/4.18.0-348.2.1.el8_5.x86_64/vmlinuz If you try running this by hand does it give any errors?

Thank you sooo much. It succeeded.