If I have booted a kernel with md/raid built in (no modules) and I use dracut to build the initramfs for a different kernel which has the md code compiled as separate modules, then it does not include the required md modules in the initramfs. As a particular instance this happen when the root filesystem is on RAID0. The 'raid0.ko' module is not included and boot fails. https://bugzilla.opensuse.org/show_bug.cgi?id=935993 This only happens when 'host-only' is selected (which is the default for openSUSE). the modules.d/90mdraid/module-setup.sh code calls instmods =drivers/md instmods calls module_is_host_only "raid0" and this incorrectly fails. If raid0.ko didn't have any alias this would succeed, but it does. $ modinfo -F alias raid0 md-level-0 md-raid0 md-personality-2 However these aliases don't appear in any modalias file in /sys/devices, in /proc/crypto, or in /proc/modules. Maybe you could parse /proc/mdstat.. if [ -f /proc/mdstat ]; then while read _d _c _a _m _x; do if [ "$_c" = ':' -a "$_a" = 'active' ]; then host_modalias["md-$_m"]=1 fi done < /proc/mdstat fi but it all seems rather fragile. There are probably other modules that might miss out accidentally. dm? Do we really need the host_modalias stuff? Thanks, NeilBrown
Attachment:
signature.asc
Description: PGP signature