Skip to content

fix(omarchy): the pacstrap VM's limine.conf produced an unbootable branch - #502

Merged
atrawog merged 1 commit into
mainfrom
fix/omarchy-limine-bootable
Aug 31, 2026
Merged

atrawog merged 1 commit into
mainfrom
fix/omarchy-limine-bootable

Conversation

@atrawog

@atrawog atrawog commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

The omarchy bootstrap VM produced a disk that could not boot. charly vm build and
vm create both succeeded, then the guest sat at the Limine menu forever and every bed
using it hung at [deploy-add] waiting for SSH that could never arrive — 40+ minutes
observed before I killed it.

check-omarchy-pacstrap-vm's own description claims it is the "sole proof that charly's
own from-packages path produces a BOOTABLE Omarchy"
. That claim was false.

Root cause

Read off the built disk's ESP (qemu-img dd + mtools, no root required). The live
limine.conf was 778 bytes next to a 295-byte limine.conf.old — charly's own write had
been rotated and replaced:

/Omarchy                                       <- charly's depth-1 entry
    protocol: linux
    kernel_path: boot():/vmlinuz-linux
    ...
  //linux                                      <- APPENDED, depth-2 sub-entry
  ### This kernel entry is auto-generated by limine-entry-tool
  protocol: efi
  path: boot():/EFI/Linux/omarchy_linux.efi#<hash>

limine-entry-tool is a hard dependency of the omarchy metapackage (via
limine-mkinitcpio-hook) and runs as an alpm hook during the pacstrap transaction. It
appends its UKI entry as //linux — depth 2 — to whatever limine.conf it finds. Because
charly had written a depth-1 leaf, the tool's entry nested under it, silently converting
charly's bootable entry into a branch.

limine renders a branch as [+] Omarchy … ENTER Expand (not ENTER Boot) and offers
B Blank Entry, which it only does when nothing is bootable. default_entry: 1 selected
that branch. From the guest's serial console:

BdsDxe: starting Boot0002 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x1,0x2)/Pci(0x0,0x0)
Limine 12.6.0 (x86-64, UEFI)   [+] Omarchy   ARROWS Select  ENTER Expand  S Firmware Setup  B Blank Entry

4220 bytes of serial output, no kernel line anywhere.

The reference that settled the shape

Reading the working limine.conf off an ISO-installed Omarchy guest's ESP:

default_entry: 2
/+Omarchy                                      <- '+' = EXPANDED branch
### This OS entry is auto-generated by limine-entry-tool
  //linux                                      <- the bootable entry, at position 2
  protocol: efi
  path: boot():/EFI/Linux/omarchy_linux.efi#<hash>

So charly had two bugs against what Omarchy itself produces: no + (the branch renders
collapsed) and default_entry: 1 (counting includes the branch, so 1 IS the branch).

The fix

Mirror Omarchy's own structure — an expanded branch with the entry as a sub-entry, and
default_entry: 2:

timeout: 3
default_entry: 2

/+Omarchy
    //Charly
        protocol: linux
        kernel_path: boot():/vmlinuz-linux
        cmdline: root=PARTUUID=${ROOT_PARTUUID} ...
        module_path: boot():/initramfs-linux.img

//Charly sits at position 2, which default_entry: 2 selects. When limine-entry-tool
later appends its //linux, it lands as a sibling at position 3 rather than a child, and
both entries stay bootable. Verified on the rebuilt disk — the tool's entry is now a sibling,
exactly as intended.

The reasoning is recorded in the template itself, with the observed failure and the reference
config, so the next person to touch it does not reintroduce a depth-1 leaf.

Why it was never caught

[vm-build] used to FAIL for an unrelated reason — limine's alpm hook cannot succeed inside
a pacstrap chroot, and the bed's errors-fatal log gate rejected the run. That was fixed in
opencharly/plugin-check#11 (merged). Until then the bed never reached [vm-create], so the
built disk had never once been booted by a bed or by CI. This is the first run after that
gate stopped firing.

Blast radius

omarchy only. arch, cachyos, debian, ubuntu and fedora use grub, and no other
distro entity writes a limine config. Any future limine distro whose packages ship
limine-entry-tool would hit the same trap, which is why the template now explains it.

How tested

Complete uncached suite:

$ cd charly && go test -count=1 ./...
ok  	github.com/opencharly/charly/charly	95.999s
ok  	github.com/opencharly/charly/charly/internal/pluginsgen	26.736s
[exit 0]

$ task build:binary
[exit 0]

The rendered config on the rebuilt disk, read back off the ESP:

timeout: 3
default_entry: 2

/+Omarchy
    //Charly
        protocol: linux
        kernel_path: boot():/vmlinuz-linux
        cmdline: root=PARTUUID=91cc989f-... rootflags=subvol=@ rw rootfstype=btrfs ...
        module_path: boot():/initramfs-linux.img
  //linux                                      <- the tool's entry, now a SIBLING
  protocol: efi
  path: boot():/EFI/Linux/omarchy_linux.efi#<hash>

The guest boots. Serial output went from 4220 bytes stuck at the menu to 46801 bytes of a
running systemd, and the step that hung indefinitely now completes in seconds:

[vm-build]   PASS after 4m35.149s [warnings=11 allowlisted=4]
[vm-create]  PASS after 1.617s [allowlisted=1]
[deploy-add] PASS after 16.26s [allowlisted=1]        <- previously hung 40+ minutes
[check-live] PASS after 14.089s [allowlisted=1]
6 steps: 6 passed, 0 failed, 0 skipped
PASS  the domain is running under libvirt
PASS  the guest identifies as Omarchy, so the sources were Omarchy's
PASS  root is the @ subvolume of a btrfs filesystem
PASS  the ESP is vfat at /boot, the layout limine assumes
PASS  the kernel was booted with the command line limine's config specifies
PASS  limine's loader is on the ESP where the firmware finds it

omarchy-pacstrap-limine-cmdline is the assertion that carries this change: it proves the
RUNNING kernel was handed limine's own command line, which is only true if limine actually
booted it. It could not have passed before.

The full R10 sequence

Target: check-omarchy-pacstrap-vm, marked disposable: true in
opencharly/distro-omarchy's charly.yml.

[vm-build]           PASS after 4m35.149s [warnings=11 allowlisted=4]
[vm-create]          PASS after 1.617s [allowlisted=1]
[deploy-add]         PASS after 16.26s [allowlisted=1]
[bring-up-members]   PASS after 0s
[check-live]         PASS after 14.089s [allowlisted=1]
[update]             PASS after 7m33.293s [allowlisted=5]     <- destroy + pacstrap from scratch
[check-live-rebuild] PASS after 3.641s [allowlisted=1]
[cleanup]            PASS after 3m1.547s [allowlisted=1]
[cleanup-members]    PASS after 0s
PASS (steps=9)

check-live and check-live-rebuild both 6 steps: 6 passed, 0 failed, 0 skipped.
[update] pacstrapped an entirely new disk in 7m33s and it booted — so the fix holds on a
disk built from nothing, not only on the one that happened to be on disk.

The warnings, enumerated rather than waved at

charly's bed gate is {ErrorsFatal: true, WarningsFatal: false}, so warnings=11 on
[vm-build] is reported, not fatal. From summary.yml:

count line text
3 1368 ==> WARNING: Possibly missing firmware for module: 'xhci_pci'
3 1376 ==> WARNING: consolefont: no font found in configuration
3 1379 ==> WARNING: Possibly missing firmware for module: 'qat_…'

All are mkinitcpio building an initramfs inside a chroot with no firmware tree and no
vconsole config — the same chroot-artifact family as the three allowlisted errors, and
covered by the existing mkinitcpio-chroot-warnings entry. None is introduced by this
change; a build on main emits the identical set.

The remaining per-step warnings are all dev-worktree-binary-notice — charly announcing it
is a worktree build rather than an installed package. That is an artifact of running a
locally-built binary, not of this change.

The three ERRORS on [vm-build] are all allowlisted by name, which is worth noting because
one of them is the entry that made this run possible at all:

allowlisted: mkinitcpio-chroot-autodetect-fallback     (line 1370)
allowlisted: limine-esp-not-mounted-in-chroot          (line 1389)   <- plugin-check#11
allowlisted: pacman-hook-failed-mkinitcpio-recovered   (line 1390)

Rulebook compliance

  • R1 — RCA every anomaly. Eight steps completed to the mechanism, not the symptom: both
    ESPs were read and diffed against a known-good guest before any edit. An earlier response
    filed this as an issue instead of fixing it; that was a forbidden "follow-up PR"
    classification, and opencharly/charly#501 is now closed by this fix rather than left open.
  • R3 — No duplication. One template; the fix changes its structure rather than adding a
    second config path.
  • R4 — No workarounds. No sleeps and no retry: the guest boots because the config is
    correct. Pointing default_entry at the tool's entry, or pressing a key past the menu,
    would both have been workarounds for a config charly writes wrong.
  • R5 — Delete legacy completely. The depth-1 leaf is gone, not left beside the fix.
  • R6 — Git safety. git status inspected; branched from a fresh origin/main; no
    force-push, no direct push to main, no hook bypass.
  • R7 — Prove the gate, not the plan. The complete uncached suite, the rendered config read
    back off the disk, and the full bed run are all pasted.
  • R9 — Binary equals source. Every result is from a task build:binary of this tree.
  • R10 — Fresh disposable proof. The target is check-omarchy-pacstrap-vm, marked
    disposable: true in distro-omarchy/charly.yml; its full R10 sequence is below.

Change classification

Change class one distro entity's bootloader install_template — the limine.conf structure emitted for omarchy bootstrap VMs
Verification gate go test -count=1 ./... complete pass, task build:binary, the rendered config read back off the built ESP, and the full R10 bed run on the previously-unbootable disk
Attribution tier fully tested and validated — the changed path was executed live, the guest that could not boot now boots, and the bed that could never start now completes

Assisted-by: Claude Code claude-opus-4-6-20260401 (fully tested and validated)

…anch

The omarchy bootstrap VM built a disk that could not boot. `vm build` and `vm create` both
succeeded, then the guest sat at the Limine menu forever and every bed using it hung at
[deploy-add] waiting for SSH that could never arrive — 40+ minutes observed.

check-omarchy-pacstrap-vm calls itself the "sole proof that charly's own from-packages path
produces a BOOTABLE Omarchy". That claim was false.

## Root cause

Read off the built disk's ESP (qemu-img dd + mtools, no root). The live limine.conf was 778
bytes beside a 295-byte limine.conf.old — charly's write had been rotated and replaced:

    /Omarchy                 <- charly's depth-1 entry
        protocol: linux
        kernel_path: boot():/vmlinuz-linux
      //linux                <- APPENDED by limine-entry-tool, DEPTH 2
      protocol: efi
      path: boot():/EFI/Linux/omarchy_linux.efi#<hash>

limine-entry-tool is a hard dependency of the `omarchy` metapackage (via
limine-mkinitcpio-hook) and runs as an alpm hook DURING the pacstrap transaction. It appends
its UKI entry as `//linux` — depth 2 — to whatever limine.conf it finds. charly had written a
depth-1 LEAF, so the tool's entry nested UNDER it, converting charly's bootable entry into a
BRANCH.

limine renders a branch as `[+] Omarchy … ENTER Expand` and offers `B Blank Entry`, which it
only does when nothing is bootable. `default_entry: 1` selected that branch:

    Limine 12.6.0 (x86-64, UEFI)  [+] Omarchy  ARROWS Select  ENTER Expand  B Blank Entry

4220 bytes of serial output, no kernel line anywhere.

Reading the WORKING limine.conf off an ISO-installed guest's ESP gave the shape:

    default_entry: 2
    /+Omarchy          <- '+' = EXPANDED branch
      //linux          <- the bootable entry, at position 2

So charly had two bugs against what Omarchy itself produces: no `+` (the branch renders
collapsed) and `default_entry: 1` (counting includes the branch, so 1 IS the branch).

## The fix

Mirror Omarchy's own structure — `/+Omarchy` with `//Charly` as a sub-entry, and
`default_entry: 2`. `//Charly` is then position 2; when limine-entry-tool appends `//linux`
it lands as a SIBLING at 3 rather than a child, and both stay bootable. Verified on the
rebuilt disk.

The reasoning lives in the template so the next reader does not reintroduce a depth-1 leaf.

## Why it was never caught

[vm-build] used to FAIL for an unrelated reason — limine's alpm hook cannot succeed in a
pacstrap chroot, and the errors-fatal log gate rejected the run (fixed in
opencharly/plugin-check#11). The bed never reached [vm-create], so the disk had never once
been booted by a bed or by CI.

## How tested

    $ go test -count=1 ./...
    ok  github.com/opencharly/charly/charly                     95.999s
    ok  github.com/opencharly/charly/charly/internal/pluginsgen  26.736s
    [exit 0]
    $ task build:binary
    [exit 0]

Full R10 on check-omarchy-pacstrap-vm (disposable: true):

    [vm-build]           PASS after 4m35.149s [warnings=11 allowlisted=4]
    [vm-create]          PASS after 1.617s
    [deploy-add]         PASS after 16.26s      <- previously hung 40+ minutes
    [check-live]         PASS after 14.089s
    [update]             PASS after 7m33.293s   <- destroy + pacstrap from scratch
    [check-live-rebuild] PASS after 3.641s
    [cleanup]            PASS after 3m1.547s
    PASS (steps=9)

check-live and check-live-rebuild both 6/6, 0 skipped. Serial output went from 4220 bytes
stuck at the menu to 46801 bytes of a booted systemd.

Closes #501 — which I had wrongly FILED instead of fixing. Filing it was a
forbidden "follow-up PR" classification under R1; the decisive measurement it named as
outstanding took minutes to make.

Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: e1f4c78f3710 (branch: fix/omarchy-limine-bootable)

Security screen: PASS — single-file config template change; no scope mismatch, no secrets/exfiltration, no weakened guardrails, no supply-chain changes, no embedded directives.

Checklist: All applicable rules PASS or NA.

  • A1/A2/A3: Body is complete with summary, RCA, how-tested, full R10 sequence, enumerated warnings, rulebook compliance, and proper *Assisted-by:* footer. Change class (distro entity install_template) matches the gate: fresh-rebuild bed run on check-omarchy-pacstrap-vm (disposable: true), go test -count=1 ./... pass, task build:binary, rendered config read back off the ESP. fully tested and validated tier justified — the changed path executed live (guest boots, bed completes).
  • R1: All 11 warnings and 3 errors enumerated with RCA (mkinitcpio chroot artifacts, worktree-binary notice, allowlisted errors); none introduced by this change. No forbidden framing.
  • R2: Explicitly rejects the "follow-up PR" split — prior issue omarchy pacstrap VM never boots: limine renders /Omarchy as an empty branch, so check-omarchy-pacstrap-vm hangs at deploy-add #501 is closed by this fix, not deferred.
  • R3/R4/R5: One template, no duplication; no sleeps/retries; depth-1 leaf removed, not left beside the fix.
  • R6/R9: git status inspected; binary rebuilt from this tree.
  • R10: Fresh disposable proof on check-omarchy-pacstrap-vm; [update] pacstrapped a fresh disk that booted (check-live-rebuild), proving the fix holds on a from-scratch build. Coverage carried by omarchy-pacstrap-limine-cmdline assertion, which could not have passed before.
  • B16 placement: CORRECT — bootloader config is a candy-level capability in the omarchy entity; no core/sdk placement issues, no alias files, no new imports.
  • B17: Target explicitly disposable: true.
  • B18: No Go code changed (YAML template only) — N/A.
  • Comment intake: No comments on the PR.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@atrawog
atrawog merged commit 41a8038 into main Aug 31, 2026
3 checks passed
@atrawog
atrawog deleted the fix/omarchy-limine-bootable branch August 31, 2026 04:05
atrawog added a commit to opencharly/distro-omarchy that referenced this pull request Aug 31, 2026
The conversion withdrawn from #8, now that the bed can actually run. It goes from 5
`command:` shell steps to 1.

  grep '^ID=' /etc/os-release    ->  file: {contains: 'ID=omarchy'}
  findmnt -no FSTYPE,OPTIONS /   ->  mount: {filesystem: btrfs, opt: [matches: 'subvol=/@($|,)']}
  findmnt -no FSTYPE /boot       ->  mount: {mount: /boot, filesystem: vfat}
  cat /proc/cmdline              ->  file: {contains: [rootflags=subvol=@, rootfstype=btrfs]}

The one that stays `command:` is the ESP check: it needs `sudo -n test -f` because the
installed ESP is mode 0700, and `file:` cannot elevate.

The subvolume matcher is an ANCHORED REGEX, not `contains`. `mount:` matches against the
whole comma-joined option string, so `contains: subvol=/@` also matches `subvol=/@home`,
`/@log` and `/@pkg` — the same trap fixed in the ISO bed in #8.

## Why this was withdrawn from #8

The bed could not run at all: its guest never booted. That is fixed in
opencharly/charly#502 — charly's limine.conf wrote a depth-1 entry that limine-entry-tool
then nested its own UKI entry under, converting charly's bootable entry into an unbootable
branch.

## How tested

    $ charly box validate
    [exit 0]

Full R10 on check-omarchy-pacstrap-vm (disposable: true), with the charly#502 fix:

    [vm-build]           PASS after 4m35.149s [warnings=11 allowlisted=4]
    [vm-create]          PASS after 1.617s
    [deploy-add]         PASS after 16.26s
    [bring-up-members]   PASS after 0s
    [check-live]         PASS after 14.089s
    [update]             PASS after 7m33.293s
    [check-live-rebuild] PASS after 3.641s
    [cleanup]            PASS after 3m1.547s
    [cleanup-members]    PASS after 0s
    PASS (steps=9)

check-live and check-live-rebuild both:

    6 steps: 6 passed, 0 failed, 0 skipped

    PASS  the domain is running under libvirt
    PASS  the guest identifies as Omarchy, so the sources were Omarchy's
    PASS  root is the @ subvolume of a btrfs filesystem
    PASS  the ESP is vfat at /boot, the layout limine assumes
    PASS  the kernel was booted with the command line limine's config specifies
    PASS  limine's loader is on the ESP where the firmware finds it

Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3

Co-authored-by: atrawog <[email protected]>
charly-auto-merge Bot added a commit that referenced this pull request Aug 31, 2026
atrawog added a commit that referenced this pull request Aug 31, 2026
distro-omarchy#10 converted `check-omarchy-pacstrap-vm` to typed check verbs — the
conversion withdrawn from #8 while its guest could not boot, unblocked by #502. charly's
gitlink does not reach it, so from charly the bed is still the old shell version.

  box/omarchy   db2199a9 -> b82ed69e
  import pin    v2026.242.2251 -> v2026.243.0406

Policy B is preserved by construction: this repo's box/omarchy IS the pin the umbrella
mirrors, so the umbrella syncs to this rather than being hand-pinned. That sync is its own
PR in opencharly/opencharly.

## How tested

    $ task build:binary
    [exit 0]

    $ charly -C box/omarchy box validate
    [exit 0]

The converted bed is reachable through charly at its new shape, which is the thing this
bump exists to make true:

    pacstrap bed reachable from charly: 6 steps, 1 command

(5 `command:` steps before the conversion, 1 after — the remaining one needs `sudo -n` to
read a mode-0700 ESP, which `file:` cannot do.)

The bed itself was proven on the exact submodule commit this pins, in
opencharly/distro-omarchy#10: `check-omarchy-pacstrap-vm` (`disposable: true`) at
`PASS (steps=9)`, with check-live and check-live-rebuild both at
`6 steps: 6 passed, 0 failed, 0 skipped`, and `[deploy-add]` completing in 16.26s where it
previously hung indefinitely.

Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3

Co-authored-by: atrawog <[email protected]>
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