Skip to content

Commit

Permalink
overlay.d: fips: s390x: fix zipl parmfile
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
madeelibm authored and nikita-dubrovskii committed Jun 18, 2021
1 parent 66e08de commit daff6b8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +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

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"
Expand Down

0 comments on commit daff6b8

Please sign in to comment.