Sample Header Ad - 728x90

modprobe: FATAL: Module dm_mod not found in directory /lib/modules/6.6.16

1 vote
1 answer
1135 views
I have built a custom kernel and given a CONFIG_LOCALVERSION of -grant-nvme during compilation. However, when I try to boot into it, no matter what I do, grub seems to look for /lib/modules/6.6.16 and I cannot for the life of me figure out where it is pulling 6.6.16 from. It should be looking in 6.6.16-grant-nvme. I have checked a dozen times that CONFIG_LOCALVERSION is set correctly during compilation, the boot entries for GRUB have it set correctly, the correct name exists both in /lib/modules and /boot/vmlinuz-6.6.16-grant-nvme yet for some reason GRUB persists in booting to the folder 6.6.16 vanilla. Where is it pulling that from? How do I direct it to the correct folder? Full error is:
[ 6.174579] systemd: Failed to start Load Kernel Modules.
[FAILED] Failed to start Load Kernel Modules.
[ 6.494351] dracut-pre-udev: modprobe: FATAL: Module dm_mod not found in directory /lib/modules/6.6.16
Sure enough, when I drop to dracut, I see:
dracut:/# ls /lib/modules
6.6.16-grant-nvme
## Update I also tried dracut --force --kver 6.6.16-grant-nvme /boot/initramfs-6.6.16-grant-nvme.img ## Update 2 Came back to this with fresh eyes today and ran strings on vmlinuz. Here is what is odd to me; the kernel build string is 6.6.16 (root@nvme.lan) (gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2), GNU ld version 2.35.2-42.el9) #2 SMP PREEMPT_DYNAMIC Thu Feb 15 08:10:42 EST 2024 This clearly does not have my CONFIG_LOCALVERSION. I am going to go back through the kernel build process again and see if somehow it didn't take. The thing is, the folder names in /boot are correct which I can only imagine happens if it is reading CONFIG_LOCALVERSION
Asked by Grant Curell (769 rep)
Feb 23, 2024, 08:57 PM
Last activity: Feb 26, 2024, 02:41 PM