When the bootloader is configured by the user, or grub2-bls is used, the file /etc/sysconfig/bootloader can be present in the final image, but empty.
A workaround is fill it in disk.sh. For example:
loader_type="grub2-bls"
rpm -q systemd-boot && loader_type="systemd-boot"
if [ -s /etc/sysconfig/bootloader ]; then
sed -i "s/^LOADER_TYPE=.*$/LOADER_TYPE=\"$loader_type\"/g" /etc/sysconfig/bootloader
else
echo "LOADER_TYPE=\"${loader_type}\"" > /etc/sysconfig/bootloader
fi
When the bootloader is configured by the user, or
grub2-blsis used, the file/etc/sysconfig/bootloadercan be present in the final image, but empty.A workaround is fill it in
disk.sh. For example: