Skip to content

Take the Aurora release from the tree the package owns - #777

Open
patatman wants to merge 3 commits into
omacom:mac/migrate-standalonefrom
patatman:mac/migrate-owned-kernel-release
Open

patatman wants to merge 3 commits into
omacom:mac/migrate-standalonefrom
patatman:mac/migrate-owned-kernel-release

Conversation

@patatman

@patatman patatman commented Oct 30, 2026 •

Copy link
Copy Markdown

For #690. Stacked on #727 (and so #726): this branch contains their commits, so review only the last commit (c51704d). I'll rebase it onto mac/migrate-standalone once those are merged.

Found on real hardware. MacBook Pro 14" M2 Pro (j414s), encrypted legacy cohort (quattro guided install, LUKS + btrfs + snapper, GRUB, ESP at /boot), with Touch ID through aurora-sep (install-aurora-sep.sh).

loader failed:

the staged boot chain does not check: Apple Silicon boot check: /boot/vmlinuz-linux-aurora is not the 7.2.11-10-1-ARCH kernel linux-aurora installed

kernel_release() returns the first /usr/lib/modules/*/ whose pkgbase names the kernel. aurora-sep installs its kernel outside pacman: /usr/lib/modules/7.1.12-2-20261013.18-sep-ARCH/ is owned by no package, so the transaction leaves it, its pkgbase says linux-aurora, and it sorts before 7.2.11-10-1-ARCH. legacy_build_initramfs then copied the old sep vmlinuz to the root's /boot/vmlinuz-linux-aurora and the UKI was built from it. The final boot check caught it before the reboot, so nothing unbootable became the default. The same can happen with any leftover tree carrying the pkgbase (a hand-built kernel, a running kernel whose package was replaced).

Change: when one tree names the kernel, nothing changes. When several do, kernel_release() takes the one whose vmlinuz the package itself installs (pacman -Qlq), as omarchy-apple-silicon-boot-check does, and fails if none matches.

Tests: a new encrypted-sep case in mac-migrate-legacy-test.sh adds an unowned tree with pkgbase linux-aurora that sorts before the packaged one. It fails without the change (the root's /boot gets "sep kernel 7.1.11") and passes with it. Results: mac-migrate-legacy-test 26/26 (with the Plymouth path hidden, as in #727), mac-migrate-test 49/49, mac-migrate-mx-test 28/28, mac-move-migration-test 4/4, migrate/build --check clean.

Real-Mac result: with that tree's pkgbase moved aside by hand (which is what this change does in code), run resumed at loader and finished; after the reboot verify passed ("This Mac now runs repository https://pkgs.omarchy.org/edge/$arch"), booting linux-aurora 7.2.11-10-1-ARCH through Limine.

The rest of aurora-sep (its pin blocking preflight, its leftovers) is in #778.

🤖 Generated with Claude Code

patrikduksin and others added 3 commits October 13, 2026 16:42
omacom/omarchy omacom#14431 renamed the detector's Apple Silicon platform to
aarch64-apple. A migrated Mac runs that detector, so a boot that retries
pending user setup after the migration completed read the Mac as another
platform and returned without retrying. Accept both names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fork's omarchy-mac-setup points GRUB_FONT at a HiDPI font it writes to
the ESP's grub/fonts. Once the boot switch moves the ESP to /boot/efi, that
path is gone, and setup-boot's update-grub fails in grub-mkconfig ("failed to
get canonical path of /boot/grub/fonts/unicode32.pf2"), so the Limine
activation is undone. Remove an unreachable GRUB_FONT from GRUB's defaults
while moving the ESP, keeping the original for the undo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kernel_release returned the first module tree whose pkgbase named the
kernel. aurora-sep installs its kernel outside pacman, so its tree stays
after the transaction, says linux-aurora and sorts before the packaged
one: the legacy stage copied that old kernel to the root's /boot and the
staged boot check refused it. With several trees naming the kernel, take
the one whose vmlinuz the package installs.

Found migrating a j414s with aurora-sep's 7.1.12 kernel to 7.2.11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed commit appears safe to merge.

Summary

Reviewed commit c51704d4, as requested by patatman. The earlier platform-name and GRUB-font commits were treated as stack context.

  • Legacy migrations choose the package’s Aurora kernel when trees collide.
  • Migration recognizes both Apple platform names.
  • Legacy migrations remove a missing GRUB font setting when the ESP moves.

Reviews (1) · Last reviewed commit: "Take the Aurora release from the tree th..." · Reviewed by Greptile

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants