Skip to content

Boot check: busybox encrypt Macs and the keyboard layout at the passphrase prompt - #576

Merged
maralcbr merged 4 commits into
quattro-upstreamfrom
mac/67-boot-check-busybox-keymap
Sep 26, 2026
Merged

maralcbr merged 4 commits into
quattro-upstreamfrom
mac/67-boot-check-busybox-keymap

Conversation

@maralcbr

Copy link
Copy Markdown
Member

Ticket 67 (gap audit row B14): the boot check, and so update-verify, now covers legacy busybox-encrypt Macs and the keyboard layout at the disk passphrase prompt. Ports omarchy-mx-mac #248, #247 and #266.

  • Busybox encrypt. A GRUB Mac installed before Omarchy's images unlocks its root in mkinitcpio's busybox init (encrypt hook, cryptdevice= on the kernel line, no crypttab). The check used to fail it with "encrypted root has no crypttab". It now recognises a busybox image from its contents (init_functions and hooks/encrypt, no systemd init or cryptsetup generator) and checks each of its own GRUB entries (the 10_linux section) for cryptdevice= naming the root's LUKS partition and a single rootflags=. The migration engine still refuses these Macs for ticket 45; its boot-file check no longer adds a false "incoherent" reason.
  • Keymap at the prompt. On an encrypted Mac (crypttab or busybox) with a Latin non-US layout, the image that boots (the UKI's .initrd on Limine, /boot/initramfs on GRUB) must carry /etc/vconsole.conf's keyboard settings and what loads them: sd-vconsole's tools and KEYMAP file, busybox's keymap.bin (new, not in mx), Plymouth's XKB symbols. This also runs under --boot-chain, so update-verify refuses the reboot when the prompt would type with another layout.
  • Fix over mx: mx extracts only the main CPIO (lsinitcpio -x --cpio). mkinitcpio 42 keeps compressed files, including the KEYMAP's .map.gz, in the early archive (confirmed on the M2's UKI). So mx would refuse every encrypted Mac with a non-US KEYMAP. This check extracts both archives. mx has the same bug, so it needs the same fix; that's the owner's call, since mx is frozen.

Tests:

  • The boot package suite (packages/omarchy-mac/boot/test/all) passes in the CI container image, as do test/shell.d/update-boot-verify-test.sh, test/shell.d/snapshot-restore-mac-test.sh and tools/hardware/test/mac-check-test.sh.
  • New fixture cases: a legacy busybox Mac (GRUB, ESP at /boot, cryptdevice=) through update-verify, passing and refused (lost cryptdevice=, second rootflags=, wrong LUKS UUID). Also keymap cases for Limine/UKI, GRUB and busybox images, in both full and --boot-chain mode.
  • The new cases fail against the previous boot check.
  • One-off with real images: busybox and systemd initramfs images built by mkinitcpio 42 in an Arch container, then the real boot check with the real lsinitcpio. It passes the busybox and systemd images and refuses an image without the keymap hook, one built before the layout changed, and a systemd image without sd-vconsole.
  • Read-only look at the M2 (converged, US layout): its UKI keeps .map.gz only in the early archive.

Second review: no blockers. Applied: the busybox entry scan now covers only grub-mkconfig's 10_linux section, so os-prober entries for other installs don't count; vconsole.conf is read in a clean shell. Left as is: extracting the whole image, since the listing alone cannot compare vconsole.conf's settings.

Merged current quattro-upstream. Likely overlap with other work: test/fixtures/limine-mac.sh (extended stubs, two new helpers) and the end of test/update-verify-test.sh.

…t in the boot check

A Mac installed before Omarchy's images unlocks its root in the busybox init
through the encrypt hook and GRUB's cryptdevice=, with no crypttab; the boot
check now verifies every GRUB entry's cryptdevice= and single rootflags= on
such a Mac instead of failing it for a missing crypttab. On an encrypted Mac
with a Latin non-US layout the image that boots must carry vconsole.conf and
what loads it at the prompt (sd-vconsole's tools and KEYMAP file, busybox's
keymap.bin, Plymouth's XKB symbols), in --boot-chain too, so update-verify
covers legacy and non-US Macs. Both archives of the image are extracted:
mkinitcpio keeps the compressed KEYMAP file in the early one.
…ad vconsole.conf in a clean shell

os-prober's entries boot other installs, whose command lines are theirs.
…ot-check-busybox-keymap

# Conflicts:
#	docs/lifecycle-dispatch.md
@maralcbr
maralcbr merged commit 7beda56 into quattro-upstream Sep 26, 2026
5 checks passed
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.

1 participant