Repository navigation
Repair stale boot images before restart - #6840
yashranaway wants to merge 9 commits into
Conversation
The Limine mkinitcpio hook can return success after an individual UKI build fails, leaving pacman and omarchy update free to finish with an old boot image. Compare each package-owned kernel with its UKI metadata and Limine hash before offering a restart, rebuild once on mismatch, and stop the update when repair does not converge.
There was a problem hiding this comment.
Pull request overview
Adds post-update boot-image verification and one repair attempt before restart.
Changes:
- Verifies kernel versions and Limine hashes.
- Repairs stale UKIs once, then blocks unsafe restarts.
- Adds shell coverage for verification and failure propagation.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
bin/omarchy-update-verify-boot |
Implements boot-image verification and repair. |
bin/omarchy-update-analyze-logs |
Runs verification before update completion. |
test/shell.d/update-boot-verification-test.sh |
Tests healthy, stale, repaired, and failed images. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Reading the effective value would avoid it: uki=
for file in /usr/share/limine-entry-tool.d/*.conf /etc/limine-entry-tool.conf \
/etc/limine-entry-tool.d/*.conf /etc/default/limine; do
[[ -f $file ]] || continue
value=$(sed -nE 's/^[[:space:]]*ENABLE_UKI[[:space:]]*=[[:space:]]*"?([^"]*)"?[[:space:]]*$/\1/p' "$file" | tail -n 1)
[[ -z $value ]] || uki=$value
done
[[ $uki == "yes" ]] || exit 0 |
[High impact] The PR appears safe to merge; no outstanding boot-verification finding or new actionable issue was identified. SummaryThe PR adds a final boot check after AUR package updates. On generic UEFI systems, it checks active Limine entries and UKIs against installed kernels, attempts one repair when needed, and withholds the reboot prompt if verification fails. It retains platform-specific lifecycle verification and adds focused tests and documentation.
|
|
The verifier now follows the full Limine configuration order and upstream value parsing. Later, empty and literal-quoted overrides are covered, and the boot-verification regression passes. |
|
I reviewed this at 5d5825d and ran it on a disposable worker built from the current Omarchy ISO (x86, The verifier changes the UKI it checks. Writing to a separate file instead,
On Two gaps, found by reading the code:
It no longer merges with Tests: Second opinion from Codex Medium. It agreed on the objcopy defect, but my brief asked it whether any command modifies the files it checks, so that agreement is not independent. It contributed the two gaps above and the smaller log-based alternative, both of which I checked against the source. Waiting on the maintainer to decide how x86 boot verification should fit into |
|
Fixed in d44d48e. The verifier now extracts |
|
Thanks for the update. I looked at d44d48e by reading it. Nothing ran on a worker this time, because the classification is now unsettled. I took this as a bug fix. Codex Medium, asked separately without my answer, classed it as an enhancement. I've taken the The split makes sense. The new head does more than fix a hook that hides a failed build. It changes what an x86 update deliberately does on
From reading, the earlier findings look addressed. This is waiting on the maintainer. They need to decide whether x86 updates should gain this root step and the rebuild. If they want it, it goes on to a worker, with the reproduction run against |
Keep a swallowed UKI build failure from turning a successful update into an unbootable restart.
Fixes #5706.
<<< AI wording below >>>
Problem
The current
limine-mkinitcpio-installturns an individual UKI build failure back into success. Pacman completes, Omarchy continues, and can offer a reboot even though/usr/lib/modulescontains a newer kernel than the UKI deployed on the ESP. The existing log analyzer warns about some initcpio failures but does not stop the update or prove which image Limine will boot.Fix
Verify boot images only when UKIs are effectively enabled. Read ENABLE_UKI in limine-entry-tool's configuration order, including later drop-ins and
/etc/default/limine, without executing configuration as shell. Empty and quoted values follow the upstream parser.Verification
bash test/shell.d/update-boot-verification-test.shpasses. Changed Bash files pass syntax checks andgit diff --checkpasses. Tests use boot-image and configuration fixtures; no real boot or UKI rebuild was performed.Review follow-up, 1 October
Only active Limine path entries count. Boot images are checked again after AUR changes. The final check intentionally requires a separate uncached sudo prompt, with privileged Bash startup, because the earlier authorization is revoked before third-party builds. Failure blocks the reboot phase.
Focused regressions, Bash syntax, command metadata, and diff checks pass. Hardware and live Hyprland behavior were not exercised on this host.