Repository navigation
Warn instead of failing update-verify on an owner-managed boot chain - #29
Conversation
A Mac that boots a kernel or m1n1 stage 2 its owner builds, not linux-aurora or linux-asahi with their m1n1, fails the boot check on every omarchy update: at the first step there is no packaged kernel to check. The update then stops as unfinished and offers no reboot, although its package steps, migrations and AUR builds all ran. Removing omarchy-mac-boot would turn the failure into the dispatcher's status-3 warning, but also drops the hooks the rest of the Mac's boot still needs. The owner can now name such a chain in /etc/omarchy-mac-boot/owner-boot-chain. update-verify still runs the check and shows what it found; when it fails there, it says the boot files were not verified, names the chain and lets the update finish. Without the file nothing changes. The snapshot restore check does not read it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scottjones
left a comment
There was a problem hiding this comment.
Thanks, this is a real problem for hand-built chains, and the fix is nicely contained: the check still runs and shows its reasons, the snapshot-restore check ignores the file, and the tests cover both sides.
On your scope question: I agree with one declaration for the whole chain. A set of narrower switches would be more fragile for a Mac like yours.
One thing I'd like addressed before approving: a forgotten declaration silently turns real failures into warnings. If an owner later goes back to the packaged kernel and m1n1 but leaves /etc/omarchy-mac-boot/owner-boot-chain in place, a genuine problem (a missing UKI, a stale m1n1) only warns, and the update offers the reboot. Because a passing check prints nothing extra, the file never shows up until the moment it hides something. Two small changes would cover it:
- In the warning, say how to go back, e.g. "To have updates verify the boot files again, remove /etc/omarchy-mac-boot/owner-boot-chain."
- Print one line on every update while the file exists, even when the check passes, e.g. "Boot files verified; /etc/omarchy-mac-boot/owner-boot-chain is present, so a failed check would only warn." That changes your "a chain that passes prints nothing extra" test, but it keeps the declaration visible.
Happy to approve once that's in.
A declaration left in /etc/omarchy-mac-boot/owner-boot-chain after its owner goes back to the packaged kernel and m1n1 would quietly turn a real failure, such as a missing UKI or a stale m1n1, into a warning. A passing check printed nothing about the file, so it only showed up once it hid something. update-verify now prints one line on every update while the file exists, even when the check passes, and its warning says to remove the file to have updates verify the boot files again. The Updates page says the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Posted by Claude (AI assistant) on behalf of @satchlj. Thanks, @scottjones, good catch. Both changes are in 3c7899d, as a new commit:
The Updates page says both. Tests, Ubuntu 24.04 aarch64, with the runtime at the pinned e1b0e5e, 077ac1d and current 🤖 Generated with Claude Code |
Posted by Claude (AI assistant) on behalf of @satchlj.
Cause
update-verifyrunsomarchy-apple-silicon-boot-check --boot-chain, which first needslinux-auroraorlinux-asahi. A Mac that boots a kernel and m1n1 stage 2 its owner builds has neither installed. Everyomarchy updatewould then end with "cannot tell which kernel boots: neither linux-aurora nor linux-asahi installed" and "This Mac might not boot what the update installed, so do not reboot yet", after the transaction, migrations and AUR builds have all run. Nothing the owner rebuilds makes it pass. Today the only way out is to removeomarchy-mac-boot, so that the dispatcher's status 3 makes it a warning. That also removes the Limine, initramfs and m1n1 hooks the rest of the Mac's boot still uses.This came from an M3 MacBook Air (J613) whose daily boot is a hand-built kernel and m1n1 stage 2. It still runs omarchy-mx-mac, so the failure is read from the code, not observed: we compared the boot check with the Mac's recorded packages and its
/etc/default/update-m1n1, which sets its ownM1N1andDTBS.Fix
/etc/omarchy-mac-boot/owner-boot-chain, next todtb-overlays.opt-in.update-verifystill runs the check, so what it found is still shown. When the check fails and the file exists,update-verifysays the boot files were not verified, prints the named chain and exits 0. The update then finishes and offers its reboot. When the check passes, nothing extra is printed.omarchy-mac-snapshot-checkdo not read the file, so snapshot restores are still guarded.A question for review: would you rather have something narrower, such as a boot-check switch like
M1N1_UPDATE_DISABLEDthat skips only what an owner took over? On this Mac that would need several switches (no packaged kernel, its ownM1N1, its ownDTBS), so one declaration for the whole chain seemed the honest scope. I can narrow it.Tests
omarchy-mac-boot/test/update-verify-test.sh, with the file present:test/integration/mac-update-boot-verify-test.sh: with a declared chain and a missing UKI,omarchy update -yexits 0 and offers the reboot. It shows the check's reason and the warning, and not "The update is not finished". This fails with the old entrypoint.OMARCHY_TEST_RUNTIMEwas omacom/omarchyquattro@ 077ac1d; the two tests above also pass with the pinned runtime e1b0e5e.omarchy-mac-bootsuite and integration test passes, except five that fail the same way onmainin this environment and do not touch these files:dtb-overlays-test.shstops at its dtc version check (it needs 1.7.1; the machine has 1.7.0);update-m1n1-locale-test.sh(the machine's locales);snapshot-check-test.sh, at "the check runs before the Limine activation gate";apple-platform-hooks-test.shandmac-keyboard-layout-seam-test.shneednodeandlua, which the machine lacks.check-scopeandcheck-architecture-gatespass.🤖 Generated with Claude Code