Skip to content

Commit

Permalink
rhcos-fips: use "rdcore kargs" to update BLS entry
Browse files Browse the repository at this point in the history
rdcore only updates the latest BLS entry, but this is the first boot, so
there should only be one.

Also drop a spurious "sync" command.
  • Loading branch information
bgilbert committed Jul 23, 2021
1 parent 2a8ca5a commit 37642d3
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,10 @@ firstboot() {
;;
esac

echo "FIPS mode required; updating BLS entries"
echo "FIPS mode required; updating BLS entry"

mkdir -p "${tmpsysroot}/boot"
mount /dev/disk/by-label/boot "${tmpsysroot}/boot"

for f in "${tmpsysroot}"/boot/loader/entries/*.conf; do
echo "Appending 'fips=1 boot=LABEL=boot' to ${f}"
sed -e "/^options / s/$/ fips=1 boot=LABEL=boot/" -i "$f"
done
sync -f "${tmpsysroot}/boot"
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
Expand Down

0 comments on commit 37642d3

Please sign in to comment.