Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay.d: s390x: add to ramdisk missing zipl #546

Merged
merged 3 commits into from
Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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