Skip to content

Commit

Permalink
Merge pull request #546 from nikita-dubrovskii/fips
Browse files Browse the repository at this point in the history
overlay.d: s390x: add to ramdisk missing zipl
  • Loading branch information
openshift-merge-robot authored Jun 21, 2021
2 parents f683733 + 2e65604 commit 1a0553a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ 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 @@ -70,16 +70,20 @@ 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 ${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 $tmpfile
--parmfile $optfile
fi

echo "Rebooting"
Expand Down

0 comments on commit 1a0553a

Please sign in to comment.