1

This is a virtual machine (vmware) on vCenter

Current Kernel 3.10.0-862.el7.x86_64

[root@stage ~]# uname -a
Linux stage.dsr.FILTERED.net 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@stage ~]# hostnamectl
   Static hostname: stage.dsr.FILTERED.net
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 4121FILTERED1663
           Boot ID: b264FILTEREDa2dc
    Virtualization: vmware
  Operating System: CentOS Stream 8
       CPE OS Name: cpe:/o:centos:centos:8
            Kernel: Linux 3.10.0-862.el7.x86_64
      Architecture: x86-64

Installed latest kernel

sudo dnf --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel kernel-ml-headers
[root@stage ~]# sudo dnf --enablerepo=elrepo-kernel install kernel-ml kernel-ml-devel kernel-ml-headers
Last metadata expiration check: 0:36:34 ago on Tue 21 Jun 2022 23:59:55 BST.
Package kernel-ml-5.18.5-1.el8.elrepo.x86_64 is already installed.
Package kernel-ml-devel-5.18.5-1.el8.elrepo.x86_64 is already installed.
Package kernel-ml-headers-5.18.5-1.el8.elrepo.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Checking available images in /boot

[root@stage boot]# ls -al
total 91212
dr-xr-xr-x.  6 root root      272 Jun 22 00:06 .
dr-xr-xr-x. 17 root root      224 Jun 22 00:01 ..
drwxr-xr-x.  3 root root       17 Aug 30  2018 efi
drwxr-xr-x.  2 root root        6 Jun 22 00:07 grub
drwx------.  5 root root      156 Jun 21 23:48 grub2
-rw-------.  1 root root 55388571 Aug 30  2018 initramfs-0-rescue-4121a368f8744621872224e7593f1663.img
-rw-------.  1 root root 12508372 Jun  7 18:44 initramfs-3.10.0-862.el7.x86_64kdump.img
-rw-------.  1 root root 19272908 Jun 22 00:06 initramfs-5.18.5-1.el8.elrepo.x86_64.img
drwxr-xr-x.  3 root root       21 Jun 21 23:48 loader
-rwxr-xr-x.  1 root root  6224704 Aug 30  2018 vmlinuz-0-rescue-4121a368f8744621872224e7593f1663

List default kernel

[root@stage boot]# grubby --default-kernel
/boot/vmlinuz-0-rescue-4121a368f8744621872224e7593f1663

List out available

[root@stage boot]# ls -l /boot/vmlinuz-*
-rwxr-xr-x. 1 root root 6224704 Aug 30  2018 /boot/vmlinuz-0-rescue-4121a368f8744621872224e7593f1663

There is only one entry!

Listing out RPM kernel packages

[root@stage boot]# rpm -qa | grep kernel
kernel-ml-devel-5.18.5-1.el8.elrepo.x86_64
kernel-ml-headers-5.18.5-1.el8.elrepo.x86_64
kernel-ml-modules-5.18.5-1.el8.elrepo.x86_64
kernel-ml-5.18.5-1.el8.elrepo.x86_64
kernel-ml-core-5.18.5-1.el8.elrepo.x86_64

How do I install and set 5.18.5-1.el8.elrepo.x86_64 to be the new default kernel?

Any pointers are most welcome

UPDATE 20220622

[root@stage ~]# dracut --force
dracut: Cannot find module directory /lib/modules/3.10.0-862.el7.x86_64/
dracut: and --no-kernel was not specified

also tried

dracut --kver 5.18.5-1.el8.elrepo.x86_64 --force
dracut --regenerate-all --force

but I still only have one same vmlinuz- in the the /boot folder

[root@stage boot]# ls -al
drwxr-xr-x.  3 root root       17 Aug 30  2018 efi
drwxr-xr-x.  2 root root        6 Jun 22 00:07 grub
drwx------.  5 root root      156 Jun 22 16:44 grub2
-rw-------.  1 root root 55388571 Aug 30  2018 initramfs-0-rescue-4121a368f8744621872224e7593f1663.img
-rw-------.  1 root root 12508372 Jun  7 18:44 initramfs-3.10.0-862.el7.x86_64kdump.img
-rw-------.  1 root root 19457348 Jun 22 17:32 initramfs-5.18.5-1.el8.elrepo.x86_64.img
drwxr-xr-x.  3 root root       21 Jun 21 23:48 loader
-rwxr-xr-x.  1 root root  6224704 Aug 30  2018 vmlinuz-0-rescue-4121a368f8744621872224e7593f1663

2 Answers 2

1
+50

It seems kernel files are missing.

Try reinstall kernel by

dnf remove kernel-ml
dnf --enablerepo=elrepo-kernel install kernel-ml

kernel 5.x should bas been set by default.

verify it by

grubby --default-kernel

if not, set it manually

grubby --set-default /boot/vmlinuz-5.xxx.el8.elrepo.x86_64
0

try dracut --force and grub2-mkconfig

3
  • 2
    Welcome to Unix & Linux! Brevity is acceptable, but fuller explanations are better.
    – Kusalananda
    Commented Jun 22, 2022 at 4:11
  • dracut --force gives me a dracut: Cannot find module directory /lib/modules/3.10.0-862.el7.x86_64/ I have tried specifying a kernel to no avail. BTW Can you vote up the question please? thank you
    – zabumba
    Commented Jun 22, 2022 at 16:34
  • although dracut looks like a good pointer, I still haven't resolve my issue. I will update my question accordingly.
    – zabumba
    Commented Jun 22, 2022 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .