diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh index 8fca954497..1f759b4599 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh +++ b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh @@ -33,3 +33,16 @@ root=$(karg root) if [ -z "${root}" ]; then rdcore rootmap /sysroot --boot-mount ${bootmnt} fi + +# And similarly, only inject boot= if it's not already present. +boot=$(karg boot) +if [ -z "${boot}" ]; then + # XXX: `rdcore rootmap --inject-boot-karg` or maybe `rdcore bootmap` + eval $(blkid -o export "${bootdev}") + if [ -z "${UUID}" ]; then + # This should never happen + echo "Boot filesystem ${bootdev} has no UUID" >&2 + exit 1 + fi + rdcore kargs --boot-mount ${bootmnt} --append boot=UUID=${UUID} +fi diff --git a/tests/kola/root-reprovision/luks/test.sh b/tests/kola/root-reprovision/luks/test.sh index 656b6feee6..0fbde10329 100755 --- a/tests/kola/root-reprovision/luks/test.sh +++ b/tests/kola/root-reprovision/luks/test.sh @@ -42,6 +42,10 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in grep root=UUID= /proc/cmdline grep rd.luks.name= /proc/cmdline ok "found root kargs" + + # while we're here, sanity-check that we have a boot=UUID karg too + grep boot=UUID= /proc/cmdline + ok "found boot karg" ;; *) fatal "unexpected mark: ${AUTOPKGTEST_REBOOT_MARK}";; esac