Build a failed initramfs again, and don't offer a reboot until it builds

When mkinitcpio fails during an update or install, run it once more. If
that fails too, say why (a full /boot, a hook or module that isn't
installed) and don't offer a reboot. The install now logs its upgrade and
checks the build before finish-install offers one, and nvidia.sh's rebuild
no longer stops the install. A failed build is carried into the next
update's log, so it's rebuilt and checked until it builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 07:34:51 -07:00
co-authored by Claude Opus 5.5
parent 16e5a9c79d
commit d456e31192
8 changed files with 230 additions and 23 deletions
+10 -1
View File
@@ -146,7 +146,12 @@ ensure_federated_repo
# Bring the system fully up to date before installing anything new
echo "Updating system..."
sudo pacman -Sy --needed --noconfirm archlinux-keyring
sudo pacman -Su --noconfirm
# Logged for check_initramfs, before finish-install offers a reboot. Not
# through script(1): this file is usually piped into bash, and script would
# read the rest of it from stdin.
new_pacman_log
sudo pacman -Su --noconfirm < /dev/null 2>&1 | tee -a "$PACMAN_UPDATE_LOG"
[ "${PIPESTATUS[0]}" -eq 0 ] || exit 1
cd ~/
@@ -319,5 +324,9 @@ fi
echo "Running migrations..."
run_migrations
# The initramfs must build before finish-install offers a reboot. Its
# warnings say what to do if it doesn't.
check_initramfs || true
# Say the install worked, whether to reboot, and offer configure
bash ~/.local/share/coredesktop/system/finish-install.sh