Skip to content

Commit

Permalink
40rhcos-fips: drop zipl run
Browse files Browse the repository at this point in the history
`rdcore kargs` in coreos-installer 0.10.0 handles this for us.
  • Loading branch information
bgilbert committed Sep 3, 2021
1 parent 2c45649 commit 5a25251
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ install() {
bwrap \
env

local _arch=${DRACUT_ARCH:-$(uname -m)}
if [[ "$_arch" == "s390x" ]]; then
inst_multiple zipl
inst /lib/s390-tools/stage3.bin
fi

inst_script "$moddir/rhcos-fips.sh" \
"/usr/sbin/rhcos-fips"
inst_script "$moddir/coreos-dummy-ignition-files-run.sh" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,6 @@ firstboot() {
rdcore kargs --boot-device /dev/disk/by-label/boot \
--append fips=1 --append boot=LABEL=boot

if [[ $(uname -m) = s390x ]]; then
# Similar to https://github.com/coreos/coreos-assembler/commit/100c2e512ecb89786a53bfb1c81abc003776090d in the coreos-assembler
# 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 ${optfile}"
options="$(grep options $tmpfile | cut -d ' ' -f2-) ignition.firstboot"
echo $options > "$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 $optfile
fi

echo "Scheduling reboot"
# Write to /run/coreos-kargs-reboot to inform the reboot service so we
# can apply both kernel arguments & FIPS without multiple reboots
Expand Down

0 comments on commit 5a25251

Please sign in to comment.