Skip to content

Commit

Permalink
coreos-boot-edit: inject boot= karg on first boot
Browse files Browse the repository at this point in the history
This ensures that the rootfs will always mount the correct boot
filesystem in the future (see previous patch).

Part of: coreos/fedora-coreos-tracker#976
  • Loading branch information
jlebon committed Oct 1, 2021
1 parent f904cdc commit d03db1c
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,16 @@ root=$(karg root)
if [ -z "${root}" ]; then
rdcore rootmap /sysroot --boot-mount ${bootmnt}
fi

# And similarly, only inject boot= if it's not already present.
boot=$(karg boot)
if [ -z "${boot}" ]; then
# XXX: `rdcore rootmap --inject-boot-karg` or maybe `rdcore bootmap`
eval $(blkid -o export "${bootdev}")
if [ -z "${UUID}" ]; then
# This should never happen
echo "Boot filesystem ${bootdev} has no UUID" >&2
exit 1
fi
rdcore kargs --boot-mount ${bootmnt} --append boot=UUID=${UUID}
fi

0 comments on commit d03db1c

Please sign in to comment.