Score:0

Rocky 9.1 dracut fails to boot

US flag

My rocky 9.1 vm kernel is not able to load/boot/decrypt a LVM Luks2 volume during boot. Booting with 5.14.0-162.6 works fine. But fails booting the latest 5.14.0-162.18 or 5.14.0-162.12 kernel, dracut throws with error:

Starting dracut pre-udev hook.
dracut-pre-udev[397] modprobe: ERROR: could not insert 'dm_mod': Operation not permitted.

/run/iniramfs/rdsosreport.txt

dmsetup ls --tree
/dev/mapper/control: open failed: No such device
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Incompatible libdevmapper 1.02.185 (2022-05-18) and kernel driver (unknown version).
Command failed.

I've created a new initramfs. Grub settings and modules are identical.

lsinitrd -m initramfs-5.14.0-162.6.1.el9_1.0.1.x86_64.img

Image: initramfs-5.14.0-162.6.1.el9_1.0.1.x86_64.img: 33M
========================================================================
Version: dracut-057-13.git20220816.el9

dracut modules:
bash
systemd
systemd-initrd
systemd-sysusers
dbus-broker
dbus
i18n
network-manager
network
ifcfg
prefixdevname
crypt
dm
kernel-modules
kernel-modules-extra
kernel-network-modules
lvm
qemu
qemu-net
resume
rootfs-block
terminfo
udev-rules
virtiofs
biosdevname
dracut-systemd
usrmount
base
fs-lib
memstrack
microcode_ctl-fw_dir_override
shutdown

lsinitrd -m initramfs-5.14.0-162.18.1.el9_1.x86_64.img

Image: initramfs-5.14.0-162.18.1.el9_1.x86_64.img: 33M
========================================================================
Version: dracut-057-13.git20220816.el9

dracut modules:
bash
systemd
systemd-initrd
systemd-sysusers
nss-softokn
dbus-broker
rngd
dbus
i18n
network-manager
network
ifcfg
prefixdevname
crypt
dm
kernel-modules
kernel-modules-extra
kernel-network-modules
lvm
qemu
qemu-net
resume
rootfs-block
terminfo
udev-rules
virtiofs
biosdevname
dracut-systemd
usrmount
base
fs-lib
memstrack
microcode_ctl-fw_dir_override
shutdown

Packages are all up to date. I've reinstall the kernel, kernel-modules and lvm2 without success.

I've managed to rebuild a rescue initramfs and vmlinuz through a live CD chroot by executing /usr/lib/kernel/install.d/51-dracut-rescue.install. The rescue system is booting the 5.14.0-162.18 kernel. But a lot modules are missing.

lsmod
Module                  Size  Used by
fuse                  176128  1
drm                   622592  0
ext4                  962560  3
mbcache                16384  1 ext4
jbd2                  167936  1 ext4
dm_crypt               61440  2
sr_mod                 28672  0
cdrom                  81920  1 sr_mod
sg                     40960  0
ata_generic            16384  0
crct10dif_pclmul       16384  1
crc32_pclmul           16384  0
ata_piix               45056  0
crc32c_intel           24576  6
virtio_net             65536  0
libata                389120  2 ata_piix,ata_generic
ghash_clmulni_intel    16384  0
serio_raw              20480  0
net_failover           24576  1 virtio_net
virtio_blk             20480  4
failover               16384  1 net_failover
dm_mirror              28672  0
dm_region_hash         24576  1 dm_mirror
dm_log                 20480  2 dm_region_hash,dm_mirror
dm_mod                184320  17 dm_crypt,dm_log,dm_mirror

Thank you for any advice!

cn flag
Could you try to disable secure boot? If it's working see: https://unix.stackexchange.com/a/543580/1254
sherwood avatar
md
Nope, that did not work. But I've managed to rebuild a rescue initramfs and vmlinuz from a live CD. Booting the rescue kernel 5.14.0-162.18.1 is now working, but a lot of modules are not loaded.
sherwood avatar
md
I've ended up reinstalling the system. Guess it caused form a corrupt rocky 8 to 9 upgrade.
nathou avatar
in flag
I'm getting the exact same error (`ERROR: could not insert 'dm_mod': Operation not permitted.`) after upgrading from 5.14.0-162.12.1.el9_1.0.2 to 5.14.0-162.23.1.el9_1. Disks are LVM but not encrypted, and this was a fresh Rocky 9 install. I'm using SeaBIOS instead of UEFI, so no Secure boot involved apparently.
sherwood avatar
md
Have you solved it? I've faced the same issue again after the reinstall and now on an upgrade from kernel 5.14.0-284.11.1 to 5.14.0-284.18.1. The reinstall was not encrypted too.
mx flag
might be related to https://access.redhat.com/solutions/5160421 I see the same on Oracle Linux with 5.15.0-103 while -101 works. I rebuild the initrd. Odd bug or foul play by RH? I don't have access to the bugzilla, but it sounds way too similar and the date is also very close.
Score:0
tt flag

This worked after all for me after doing some research and regenerating the initramfs from the previous kernel version:

cd /boot
dracut -f initramfs-5.14.0-162.23.1.el9_1.x86_64.img 5.14.0-162.23.1.el9_1.x86_64
reboot

Booted nicely on 5.14.0-162.23.1.el9_1.x86_64 version …

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.