diff --git a/overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/rhcos-fips.sh b/overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/rhcos-fips.sh index f1071819c..cb0f981c4 100755 --- a/overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/rhcos-fips.sh +++ b/overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/rhcos-fips.sh @@ -70,16 +70,22 @@ firstboot() { # We need to call zipl with the kernel image and ramdisk as running it without these options would require a zipl.conf and chroot # into rootfs tmpfile=$(mktemp) + optfile=$(mktemp) for f in "${tmpsysroot}"/boot/loader/entries/*.conf; do for line in title version linux initrd options; do echo $(grep $line $f) >> $tmpfile done done + # This is needed to finish all ignition stages + echo "Appending 'ignition.firstboot' to ${tmpfile}" + sed -e "/^options / s/$/ ignition.firstboot/" -i "$tmpfile" + + grep options $tmpfile | cut -c 9- > $optfile zipl --verbose \ --target "${tmpsysroot}/boot" \ --image $tmpsysroot/boot/"$(grep linux $tmpfile | cut -d' ' -f2)" \ --ramdisk $tmpsysroot/boot/"$(grep initrd $tmpfile | cut -d' ' -f2)" \ - --parmfile $tmpfile + --parmfile $optfile fi echo "Rebooting"