Bugzilla – Bug 868397
dracut's mkinitrd broken wrt. INITRD_MODULES
Last modified: 2021-03-02 16:37:23 UTC
susi:~ # mkinitrd Creating: target|kernel|dracut args Unknown arguments: /boot/initrd-3.14.0-rc5-1-default 3.14.0-rc5-1-default Usage: /usr/bin/dracut [OPTION]... [<initramfs> [<kernel-version>]] Version: 036-5.1 Creates initial ramdisk images for preloading modules -h, --help Display all options If a [LIST] has multiple arguments, then you have to put these in quotes. For example: # dracut --add-drivers "module1 module2" ... Unknown arguments: /boot/initrd-3.14.0-rc6-3.gd1a7ba5-desktop 3.14.0-rc6-3.gd1a7ba5-desktop Usage: /usr/bin/dracut [OPTION]... [<initramfs> [<kernel-version>]] Version: 036-5.1 Creates initial ramdisk images for preloading modules -h, --help Display all options If a [LIST] has multiple arguments, then you have to put these in quotes. For example: # dracut --add-drivers "module1 module2" ... using "bash -x": ... + '[' -n 'processor thermal fan' ']' + dracut --logfile /var/log/YaST2/mkinitrd.log --hostonly --force --add-drivers '"processor' thermal 'fan"' /boot/initrd-3.14.0-rc6-3.gd1a7ba5-desktop 3.14.0-rc6-3.gd1a7ba5-desktop Unknown arguments: /boot/initrd-3.14.0-rc6-3.gd1a7ba5-desktop 3.14.0-rc6-3.gd1a7ba5-desktop Usage: /usr/bin/dracut [OPTION]... [<initramfs> [<kernel-version>]] Version: 036-5.1 Creates initial ramdisk images for preloading modules -h, --help Display all options If a [LIST] has multiple arguments, then you have to put these in quotes. For example: # dracut --add-drivers "module1 module2" ... + (( i++ )) ok, broken quoting. fix: susi:~ # diff -u /sbin/mkinitrd.bak /sbin/mkinitrd --- /sbin/mkinitrd.bak 2014-03-11 20:33:27.000000000 +0100 +++ /sbin/mkinitrd 2014-03-14 10:55:06.155754920 +0100 @@ -337,13 +337,13 @@ # -> dracut bug workarounded ugly, because of complex whitespace # expansion magics if [ -n "${modules_all}" ];then - $dracut_cmd $dracut_args --add-drivers \"${modules_all}\" "$target" "$kernel" &>/dev/null + $dracut_cmd $dracut_args --add-drivers "${modules_all}" "$target" "$kernel" &>/dev/null else $dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null fi else if [ -n "${modules_all}" ];then - $dracut_cmd $dracut_args --add-drivers \"${modules_all}\" "$target" "$kernel" + $dracut_cmd $dracut_args --add-drivers "${modules_all}" "$target" "$kernel" else $dracut_cmd $dracut_args "$target" "$kernel" fi Since it looks like this was obviously never tested before submitting to Factory, but I'm not able to parse the code at all, I'm not creating a submit request with the obvious fix, but instead am opening this report. This is a critical bug, since after a kernel update, there will be no initrd to boot from.
I tested the stuff, but did not properly sync everything into the patch, maybe I forgot a quilt refresh or similar. Thanks, package submitted.
This is an autogenerated message for OBS integration: This bug (868397) was mentioned in https://build.opensuse.org/request/show/225991 Factory / dracut
*** Bug 866454 has been marked as a duplicate of this bug. ***