diff --git a/dracut.sh b/dracut.sh index 8d7ee70a..681a6b7a 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1307,7 +1307,7 @@ export initdir dracutbasedir \ dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \ mods_to_load \ fw_dir drivers_dir debug no_kernel kernel_only \ - omit_drivers mdadmconf lvmconf root_dev \ + omit_drivers mdadmconf lvmconf root_devs \ use_fstab fstab_lines libdirs fscks nofscks ro_mnt \ stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \ debug host_fs_types host_devs swap_devs sshkey add_fstab \ diff --git a/modules.d/95rootfs-block/module-setup.sh b/modules.d/95rootfs-block/module-setup.sh index 2b06bac2..987373b4 100755 --- a/modules.d/95rootfs-block/module-setup.sh +++ b/modules.d/95rootfs-block/module-setup.sh @@ -32,6 +32,12 @@ cmdline_journal() { cmdline_rootfs() { local _dev=/dev/block/$(find_root_block_device) local _fstype _flags _subvol + + # "--no-hostonly-default-device" can result in empty root_devs + if [ "${#root_devs[@]}" -eq 0 ]; then + return + fi + if [ -e $_dev ]; then printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$_dev")")" _fstype="$(find_mp_fstype /)"