]> git.ipfire.org Git - thirdparty/dracut.git/commit
fix(dracut-functions.sh): get block device driver if in a virtual subsystem
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Wed, 10 Nov 2021 09:19:14 +0000 (10:19 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Wed, 24 Nov 2021 10:15:25 +0000 (11:15 +0100)
commitdc3b976f3393d7a3fb75b349418fc8ee2c9142bd
treeb5f7bd5b7908b49319a3b2da8845fefe73712c5d
parentd364ce8334fef96f48492bd0fb3b7deac37bbb66
fix(dracut-functions.sh): get block device driver if in a virtual subsystem

dracut does not install the kernel module of the block device that contains
the root filesystem if the following preconditions are met:
- Running in host-only mode.
- Symlinks of all block devices needed to boot the system pointing to virtual
subsystems.

The get_dev_module function uses "udevadm info -a" to get the corresponding
kernel modules of a /sys/class/*/* or /dev/* device. This function is called
in modules.d/90kernel-modules/module-setup.sh to detect if dracut must install
block device drivers in host-only mode. The symlinks in /sys/dev/block/
usually point to "real" devices in /sys/devices/pci*. But, we have come across
some NVMe systems where the kernel creates the symlinks in /sys/dev/block/
pointing to "virtual" devices instead. In this case, udevadm never finds any
"driver" attributes following up the chain of parent devices.
dracut-functions.sh