From db27fe48c34db84af105693bddddd896f6f2bca5 Mon Sep 17 00:00:00 2001 From: Aditya Gaurav Date: Mon, 2 Nov 2026 16:10:39 +0000 Subject: [PATCH 1/3] Rebuild the boot image after the quiet boot migration changes limine.conf Secure Boot with config enrollment checks limine.conf against a checksum in the boot image, so editing it without limine-mkinitcpio panics the next boot (#15524). --- migrations/1791898365.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/migrations/1791898365.sh b/migrations/1791898365.sh index 2eaec5d0b512..23fe50f28916 100644 --- a/migrations/1791898365.sh +++ b/migrations/1791898365.sh @@ -41,6 +41,13 @@ if ! sudo grep -Eqi '^[[:space:]]*quiet:' "$limine_conf"; then added_quiet=1 fi +# Secure Boot with config enrollment checks the menu against a checksum in +# the boot image, so a changed menu has to be rebuilt into it or the next +# boot panics. +if [[ -n $set_timeout || -n $added_quiet ]] && omarchy-cmd-present limine-mkinitcpio; then + sudo limine-mkinitcpio +fi + if [[ -n $set_timeout && -n $added_quiet ]]; then echo "The boot menu now waits 1 second and stays quiet until a key is pressed" elif [[ -n $set_timeout ]]; then From 61ad38ab1f0a8258ba210fed264597d87336d4a7 Mon Sep 17 00:00:00 2001 From: Aditya Gaurav Date: Mon, 2 Nov 2026 16:10:39 +0000 Subject: [PATCH 2/3] Rebuild the boot image on a retry of the quiet boot migration A failed rebuild leaves the migration pending, but the retry found the menu already edited and skipped the rebuild, marking itself done with a stale boot image. Rebuild on every run instead. --- migrations/1791898365.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/migrations/1791898365.sh b/migrations/1791898365.sh index 23fe50f28916..749494c6ef13 100644 --- a/migrations/1791898365.sh +++ b/migrations/1791898365.sh @@ -42,9 +42,10 @@ if ! sudo grep -Eqi '^[[:space:]]*quiet:' "$limine_conf"; then fi # Secure Boot with config enrollment checks the menu against a checksum in -# the boot image, so a changed menu has to be rebuilt into it or the next -# boot panics. -if [[ -n $set_timeout || -n $added_quiet ]] && omarchy-cmd-present limine-mkinitcpio; then +# the boot image, so the menu has to be rebuilt into it or the next boot +# panics. A run after a failed rebuild finds the menu already edited, so +# the rebuild does not wait for an edit in this run. +if omarchy-cmd-present limine-mkinitcpio; then sudo limine-mkinitcpio fi From bf92b5f66962c044a9b681c888fa0e72c018406f Mon Sep 17 00:00:00 2001 From: Aditya Gaurav Date: Tue, 3 Nov 2026 00:26:43 +0000 Subject: [PATCH 3/3] Keep the quiet boot migration pending when a kernel fails to rebuild --- migrations/1791898365.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/migrations/1791898365.sh b/migrations/1791898365.sh index 749494c6ef13..6b3c44966cc4 100644 --- a/migrations/1791898365.sh +++ b/migrations/1791898365.sh @@ -46,7 +46,16 @@ fi # panics. A run after a failed rebuild finds the menu already edited, so # the rebuild does not wait for an edit in this run. if omarchy-cmd-present limine-mkinitcpio; then - sudo limine-mkinitcpio + rebuild_log=$(mktemp) + trap 'rm -f "$rebuild_log"' EXIT + sudo limine-mkinitcpio 2>&1 | tee "$rebuild_log" + + # limine-mkinitcpio reports a kernel it could not rebuild and still exits 0. + # The menu no longer matches that image, so the migration stays pending. + if grep -q 'mkinitcpio failed for kernel' "$rebuild_log"; then + echo "A boot image was not rebuilt. Fix the error above, then run omarchy-migrate again before rebooting." >&2 + exit 1 + fi fi if [[ -n $set_timeout && -n $added_quiet ]]; then