From a603e0d0464dc30225da115bb2af82f0b253bf24 Mon Sep 17 00:00:00 2001 From: nocode Date: Tue, 22 Sep 2026 11:26:52 +0200 Subject: [PATCH] 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-*. --- configs/baseline/airootfs/root/.xinitrc | 8 ++++++++ configs/baseline/airootfs/usr/bin/grub2-mkconfig | 16 +++++++++++++++- configs/baseline/profiledef.sh | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) mode change 120000 => 100755 configs/baseline/airootfs/usr/bin/grub2-mkconfig diff --git a/configs/baseline/airootfs/root/.xinitrc b/configs/baseline/airootfs/root/.xinitrc index 56967e0..a7301ad 100644 --- a/configs/baseline/airootfs/root/.xinitrc +++ b/configs/baseline/airootfs/root/.xinitrc @@ -205,6 +205,14 @@ if command -v liveinst >/dev/null 2>&1; then echo echo "########## Récapitulatif (page GUI fws_recap, avant install) ##########" cat /tmp/fws-hw-summary.txt 2>/dev/null || echo "(absent — page récap pas atteinte)" + # The crash dialog only shows the dasbus wrapper frames; the actual + # remote exception is at the end of this dump, and nowhere else. + for f in /tmp/anaconda-tb-*; do + [ -f "$f" ] || continue + echo + echo "########## $f (traceback Anaconda, fin) ##########" + tail -n 80 "$f" + done for f in /tmp/anaconda.log /tmp/syslog /tmp/program.log \ /tmp/storage.log /tmp/dbus.log /tmp/packaging.log /tmp/X.log; do echo diff --git a/configs/baseline/airootfs/usr/bin/grub2-mkconfig b/configs/baseline/airootfs/usr/bin/grub2-mkconfig deleted file mode 120000 index 4b6fb43..0000000 --- a/configs/baseline/airootfs/usr/bin/grub2-mkconfig +++ /dev/null @@ -1 +0,0 @@ -grub-mkconfig \ No newline at end of file diff --git a/configs/baseline/airootfs/usr/bin/grub2-mkconfig b/configs/baseline/airootfs/usr/bin/grub2-mkconfig new file mode 100755 index 0000000..d675804 --- /dev/null +++ b/configs/baseline/airootfs/usr/bin/grub2-mkconfig @@ -0,0 +1,15 @@ +#!/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 "$@" diff --git a/configs/baseline/profiledef.sh b/configs/baseline/profiledef.sh index 4f4d640..47b3c71 100644 --- a/configs/baseline/profiledef.sh +++ b/configs/baseline/profiledef.sh @@ -28,6 +28,7 @@ file_permissions=( ["/usr/local/bin/livecd-sound"]="0:0:755" ["/usr/bin/load_policy"]="0:0:755" ["/usr/bin/setstatus"]="0:0:755" + ["/usr/bin/grub2-mkconfig"]="0:0:755" ["/usr/local/bin/fws-setup-hardware"]="0:0:755" ["/usr/local/bin/fws-drivers"]="0:0:755" ["/usr/local/bin/fws-intel-rst"]="0:0:755"