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 21, 2021
1 parent 56a0162 commit 11fa5a2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 11fa5a2

Please sign in to comment.