Files
FWS-ISO/configs/baseline/airootfs/usr/bin/grub2-mkconfig
T
nocode a9aacaa8f9 fix(installer): stop Anaconda's grub2-mkconfig from aborting the install
Even with "bootloader --disabled", Anaconda runs "grub2-mkconfig -o
/etc/grub2.cfg" in the target for live installs and aborts on failure. On
an Intel RST laptop (Omen 16 Max) this crashed the install at "Installing
boot loader", before the %post that actually configures GRUB could run.
FWS never reads that file, so the shim now skips that single call.

The crash dialog only shows dasbus wrapper frames, so the FWS debug report
now also includes the tail of /tmp/anaconda-tb-*.
2026-09-22 14:03:06 +02:00

16 lines
805 B
Bash
Executable File

#!/bin/sh
# Fedora-name shim for grub-mkconfig.
#
# Even with "bootloader --disabled", Anaconda's CreateBLSEntriesTask still runs
# "grub2-mkconfig -o /etc/grub2.cfg" in the target for every live install
# (pyanaconda/modules/storage/bootloader/utils.py, create_bls_entries), and a
# non-zero exit aborts the whole install with an opaque D-Bus traceback during
# "Installing boot loader". FWS never reads /etc/grub2.cfg: the kickstart %post
# (fws-grub-finalize) writes /boot/grub/grub.cfg itself and logs its failures.
# So only that exact call is skipped; any other use still reaches grub-mkconfig.
if [ "$#" -eq 2 ] && [ "$1" = "-o" ] && [ "$2" = "/etc/grub2.cfg" ]; then
echo "[FWS] grub2-mkconfig -o /etc/grub2.cfg skipped (GRUB is configured in %post)" >&2
exit 0
fi
exec grub-mkconfig "$@"