2021-12-14 19:05:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
if [[ ! '9-stream' =~ ${DIB_RELEASE} ]]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# This is a workaround for the grub issue reported upstream with
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2032680
|
|
|
|
|
2022-01-21 00:10:17 +00:00
|
|
|
# This renames the BLS entries from the upstream .qcow2 image in
|
|
|
|
# /boot/loader/entries with the current machine-id. This means that in the
|
|
|
|
# bootloader setup, grub2-mkconfig will update config options as required.
|
|
|
|
|
|
|
|
pushd /boot/loader/entries
|
|
|
|
|
|
|
|
machine_id=$(</etc/machine-id)
|
|
|
|
|
2022-04-28 22:54:52 +00:00
|
|
|
for entry in *.conf; do
|
2022-01-21 00:10:17 +00:00
|
|
|
new_entry=$(echo $entry | sed "s/^[a-f0-9]*/$machine_id/")
|
|
|
|
echo "renaming $entry to $new_entry for new machine-id"
|
2022-04-28 22:54:52 +00:00
|
|
|
if [[ $entry != $new_entry ]]; then
|
|
|
|
mv $entry $new_entry
|
|
|
|
fi
|
2022-01-21 00:10:17 +00:00
|
|
|
done
|
|
|
|
popd
|
|
|
|
|
2021-12-14 19:05:47 +00:00
|
|
|
echo "--- Show kernels ---"
|
|
|
|
grubby --info=ALL
|