From 5a252510da1c57e284264c73f2ecfed687cee4fb Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Fri, 3 Sep 2021 13:04:49 -0400 Subject: [PATCH] 40rhcos-fips: drop zipl run `rdcore kargs` in coreos-installer 0.10.0 handles this for us. --- .../modules.d/40rhcos-fips/module-setup.sh | 6 ------ .../modules.d/40rhcos-fips/rhcos-fips.sh | 21 ------------------- 2 files changed, 27 deletions(-) diff --git a/overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/module-setup.sh b/overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/module-setup.sh index 4747674c..1375fb9f 100755 --- a/overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/module-setup.sh +++ b/overlay.d/05rhcos/usr/lib/dracut/modules.d/40rhcos-fips/module-setup.sh @@ -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" \ 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 63f85385..d6967768 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 @@ -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