From 11fa5a236fda040a94d83fcbe2e70f8a3da95623 Mon Sep 17 00:00:00 2001 From: Muhammad Adeel Date: Fri, 18 Jun 2021 09:14:21 +0200 Subject: [PATCH] overlay.d: fips: s390x: fix zipl parmfile Zipl expects only kernel command line options in the parmfile. If a whole bls file is provided as a parmfile, the system will not be able to boot and switch to rescue mode after reboot. --- .../usr/lib/dracut/modules.d/40rhcos-fips/rhcos-fips.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 f1071819..6d8158dd 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,18 @@ 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 + grep options $tmpfile | cut -d ' ' -f2- > $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"