Skip to content

bootupd: write a grub-bls conformance marker (entries.srel) and dispatch on it #252

Open

Description

@cgwalters-bot

From cgwalters on bootc-dev/bootc#2515 (bootc-dev/bootc#2515): instead of probing the bootloader offline, have bootupd write the Boot Loader Specification standard-conformance marker (https://uapi-group.org/specifications/specs/boot_loader_specification/#standard-conformance-marker-file) with grub-bls for GRUB, so tools know whether the bootloader implements the spec conformantly, and have bootc's install mount (default-entry selection, incl. GRUB's reverse filename order, bootc#2221) dispatch on it. Blocks bootc#2515, which is now a draft and off the composefs P0.

Generated-by: https://github.com/cgwalters/#llms

Activity

  1. locked as resolved and limited conversation to collaborators on Oct 18, 2026
  2. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    ✅ dispatch ended well. Result: #252 (comment)

  3. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Still wanted, valid, not started, and it needs one decision from cgwalters before it can be planned: where the marker lives. A second, smaller block: no bootupd repository is in the dispatch bounds, so the first PR could not be dispatched today even with the design settled. Triage as of 21 Oct 2026.

    Valid and reproducible from the code

    What fixing it takes: two PRs, bootupd first

    1. bootupd: in backend install, once the EFI component is copied (efi.rs install), write loader/entries.srel on that partition with grub-bls for Grub and GrubCC and type1 for Systemd (what bootctl install writes). bootupd already knows the bootloader at that point: install in src/bootupd.rs takes it from --bootloader or the image's default and passes it to each component. Unit test on a temporary directory, and the e2e install test asserts the file. One small PR.
    2. bootc: a reader for the marker used by get_bootloader (nine call sites) and by #2515's offline probe: grub-bls means GRUB ordering, type1 means spec ordering, absent means today's probe, so systems installed before the marker keep working. Then #2515 rebases onto it. One PR.

    The decision: where the marker is written. The spec puts entries.srel beside the entries/ directory on $BOOT, the XBOOTLDR partition if there is one and otherwise the ESP, and a value other than type1 means "another spec owns loader/entries": systemd's kernel-install then stops writing Type 1 entries there (kernel-install.c, LAYOUT_OTHER), which is fine on bootc hosts but is a visible effect. GRUB's entries on bootc live in /boot/loader/entries, and that directory has two owners: on the ostree backend /boot/loader is a symlink ostree re-points at loader.0/loader.1 on every deploy (ostree-sysroot-deploy.c, swap_bootloader; only loader.N/entries is wiped), and on composefs it is a plain directory bootc writes itself. The options: (A) the ESP's loader/entries.srel, written by bootupd. It is the spec's $BOOT when there is no XBOOTLDR, bootupd already mounts and owns the ESP, bootc's install clears the ESP's loader/ before bootupd runs (clean_esp_bootloader_dirs), and it survives ostree deploys. It is not beside the entries GRUB actually reads, and BIOS-only installs have no ESP (there today's probe already says GRUB from /boot/grub2). (B) /boot/loader/entries.srel, beside the entries: bootupd would have to write it into both loader.0 and loader.1, or ostree writes it, and bootc writes it for composefs; three writers. (C) both. My recommendation is A, with bootc reading $BOOT first and the ESP second so B or C can come later. The second decision: .github/agentic-job/dispatch.toml lists cgwalters-forge/bootc but no bootupd repository, and the fork cgwalters-forge/bootupd exists (last push 7 Oct); add it, or say the bootupd PR is done by hand. With A chosen and a bootupd target allowed, the bootupd PR can be planned at once and the bootc PR right after.

    Read: this issue, bootc-dev/bootc#2515 (body, comments, reviews), bootc-dev/bootc#2221, tracker#31 and its 17 Oct triage, bootupd src/bootupd.rs, src/efi.rs, src/bootloader.rs, bootc crates/lib/src/bootc_composefs/status.rs, bootloader.rs, install.rs, spec.rs, ostree ostree-sysroot-deploy.c, systemd kernel-install.c, the Boot Loader Specification, agent-board docs/job-plans.md, and the tracker's dispatch.toml.

    Generated by dispatch · ◷

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions