Skip to content

Drop the fork's GRUB_FONT once the ESP leaves /boot - #727

Open
patrikduksin wants to merge 2 commits into
omacom:mac/migrate-standalonefrom
patrikduksin:mac/migrate-grub-font
Open

patrikduksin wants to merge 2 commits into
omacom:mac/migrate-standalonefrom
patrikduksin:mac/migrate-grub-font

Conversation

@patrikduksin

Copy link
Copy Markdown

For #690. Stacked on #726: this branch contains #726's commit, so review only the last commit (30a20d6). Rebase it onto mac/migrate-standalone once #726 is merged.

Found on real hardware. A MacBook Pro 14" M1 Pro (j314s), encrypted legacy cohort (GRUB, busybox encrypt, ESP at /boot), installed with quattro's guided installer. As far as I know, this is the first run of #690 on a real Mac.

The fork's bin/omarchy-mac-setup (quattro, around line 580) writes a HiDPI font to /boot/grub/fonts/unicode32.pf2 on the ESP and sets GRUB_FONT= to that path in /etc/default/grub. legacy_move_esp moves the ESP to /boot/efi and creates an empty /boot/grub on the root, so the font path disappears. setup-boot's limine-boot.sh still runs Asahi's update-grub when GRUB's tools are installed, and grub-mkconfig stops:

/usr/bin/grub-probe: error: failed to get canonical path of `/boot/grub/fonts/unicode32.pf2'.
The boot switch was undone; GRUB boots this Mac as before.
omarchy-mac-migrate: Limine could not be activated; GRUB is still the loader

The rollback worked as designed, and GRUB kept booting the Mac. Nothing short of this fix lets the migration get past loader, and it is likely to hit every Mac set up by omarchy-mac-setup.

Change: after moving the ESP, legacy_move_esp checks GRUB_FONT. If it names a file that is no longer reachable, the line is dropped from GRUB's defaults, and the original is kept through legacy_stage_keep, so legacy_unstage restores it. GRUB is retired after the switch anyway.

Tests:

  • The fixture's setup-boot leaf now calls update-grub as limine-boot.sh does.
  • The update-grub stub now fails, as grub-mkconfig does, when GRUB_FONT names a missing file.
  • The encrypted test's expected boot.log gains that call.
  • A new encrypted-font case uses the fork's font on the ESP. It fails without the change, and passes with it.
  • Results: mac-migrate-legacy-test 25/25, mac-migrate-test 49/49, mac-migrate-mx-test 28/28, mac-move-migration-test 4/4, and migrate/build --check is clean.

On the "converged systemd image" failure I mentioned in #726: it depends on the environment. The fixture's 93-omarchy-mac-plymouth.conf checks the host's /usr/lib/initcpio/install/plymouth, so the test fails on any machine with Plymouth installed. With that path hidden (bwrap --dev-bind / / --tmpfs /usr/lib/initcpio/install), it passes.

Real-Mac result with this fix: resumed at loader → loader done, and Limine took U-Boot's slot. After the reboot, omarchy-mac-migrate-verify completed: "This Mac now runs repository https://pkgs.omarchy.org/edge/$arch". The booted kernel is linux-aurora 7.1.12.aurora2-11 through Limine, the root unlocks via rd.luks.name= and sd-encrypt, the platform reads aarch64-apple, and there are no failed units.

Also hit, not fixed here: the defaults step then failed with "cannot set up Snapper for the root filesystem". The cause is an orphan /.snapshots subvolume from the fork era (snapper had been installed, then removed, with no config left). Upstream's install/config/snapper.sh exits 1, not 3, on "creating btrfs subvolume .snapshots failed since it already exists". I moved it aside by hand and the run finished. It probably belongs upstream: snapper.sh could adopt or set aside an orphan .snapshots, or return 3 for it.

🤖 Generated with Claude Code

patrikduksin and others added 2 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>
@blueedgesolutions-tom

Copy link
Copy Markdown

Reproduced on a second machine: MacBook Air (M1, 2020), j313, the same encrypted legacy cohort as yours (GRUB, busybox encrypt, ESP at /boot), installed from quattro, following the edge lane.

I ran bin/omarchy-mac-migrate from #726 (7bdb12e, sha256 2593c676…2e44, matching the README). check reported Ready (legacy, grub boot, encrypted → https://pkgs.omarchy.org/edge/$arch). run went through transaction and boot-chain, then stopped at loader with the same error:

/usr/bin/grub-probe: error: failed to get canonical path of `/boot/grub/fonts/unicode32.pf2'.
The boot switch was undone; GRUB boots this Mac as before.
omarchy-mac-migrate: Limine could not be activated; GRUB is still the loader

/etc/default/grub had GRUB_FONT=/boot/grub/fonts/unicode32.pf2 from omarchy-mac-setup. The rollback held: the ESP went back to /boot, grub.cfg booted linux-aurora with cryptdevice=, and the initramfs still had encrypt.

Instead of switching builds, I applied this PR's change by hand (commented out GRUB_FONT) and ran run again. It resumed at loader and completed loader → defaults → verify → unpin → reboot. After the reboot, Limine came up, the systemd rd.luks unlock worked, and the journal finished with reboot done / retire done. So the fix here resolves it on a second Mac, and resuming after the failed loader step works as designed.

Post-migration drift worth knowing about (not this PR): the fork set touchpad natural_scroll = true by default, and official Omarchy's default/hypr/input.lua sets it to false, so migrated Macs get reversed two-finger scrolling unless the user pinned it in ~/.config/hypr/input.lua.

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