Skip to content

composefs: Put systemd-boot entries and UKIs on XBOOTLDR - #27

Draft
cgwalters-bot wants to merge 2 commits into
mainfrom
bot/composefs-xbootldr
Draft

cgwalters-bot wants to merge 2 commits into
mainfrom
bot/composefs-xbootldr

Conversation

@cgwalters-bot

@cgwalters-bot cgwalters-bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

With systemd-boot, the composefs backend now puts the Type #1 entries, kernels and UKIs on an XBOOTLDR partition when the ESP's disk has one (GPT, or MBR type 0xea, formatted as FAT, which is all systemd-boot can read), keeping only systemd-boot and loader.conf on the ESP, per the Boot Loader Specification. GRUB is unchanged. A booted system only uses XBOOTLDR if the booted deployment's entry is there, so existing systems with an unused XBOOTLDR keep using the ESP.

This is the first slice of the "single ESP, no XBOOTLDR" composefs limitation. Multiple ESPs (e.g. mirrored for RAID1) are left for a follow-up.

Rebased onto main b06e0b0 (after bootc-dev#2483 and the bootc-dev#2508 docs restructure); the rebase was clean, and the bootloaders.md edit now lives in bootc-bootloaders.7.md. Retested at 24519d0 on a 16-core devspace (cgwalters-devspace-36601734885, CentOS Stream 10 base): just validate, just unit-tests (467 passed) and plan-55-composefs-xbootldr on composefs systemd-boot BLS (ext4, unsealed) all passed.

Before the rebase, tested on a 16-core RHEL 10 devspace (cgwalters-devspace-36213499802):

  • just validate and just unit-tests (with new unit tests for XBOOTLDR discovery, including MBR, and selection);
  • composefs systemd-boot BLS (ext4, unsealed): the new plan-55-composefs-xbootldr and plan-24-image-upgrade-reboot both pass.

plan-55 installs with bootc install to-filesystem onto a loop device that has an XBOOTLDR partition, then splits the VM's own ESP into an ESP and an XBOOTLDR partition, moves the entries there, and reboots through a switch, a rollback and a second switch, after which GC must have removed the first derived image's kernel from XBOOTLDR. Before moving the entries, it checks that bootc keeps using the ESP while XBOOTLDR has no entry for the booted deployment. bcvk can't leave free space on the VM's disk (its base disk is sized to --root-size), which is why the booted part doesn't come from a real install. The tmt test skips UKI images; the UKI paths share the partition selection with BLS but weren't booted with XBOOTLDR.

Caveats:

  • This conflicts trivially with composefs: Support boot counting for new systemd-boot deployments #25 (boot counting) in boot.rs and the generated tmt plans.
  • systemd-bless-boot renames entries on $BOOT, so with XBOOTLDR it needs XBOOTLDR mounted at /boot (systemd-gpt-auto-generator does that when there's no fstab entry); the SELinux dosfs_t caveat for renaming entries on the ESP applies there too.

Related: bootc-dev#1929, bootc-dev#1953

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


Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.

  • Upstream: bootc-dev/bootc, base main
  • Board item: PVTI_lADOE9oHIs4BlJLczg9kESk
  • Fork CI: off; the devspace testing described above is this PR's CI, and upstream CI runs once it is opened there

To review:

  • Approve, or comment /promote on a line of its own, to open it upstream, ready for review. Either covers only the commits pushed so far.
  • If upstream requires DCO, approving also signs off: promote adds Signed-off-by: Colin Walters <walters@verbum.org> to the commits lacking it (the bot's and yours; anyone else's only if you ask), with you as committer.
  • Add a /draft line (in the same comment or before) to open it upstream as a draft (/ready undoes that).
  • Close to drop it.
  • Edit the title and description freely: they become the upstream PR's. Review comments are squashed into the commits they concern, with a reply here.

Prep for putting composefs systemd-boot entries on XBOOTLDR. Per the
Boot Loader Specification, systemd-boot only looks for XBOOTLDR on the
disk it booted the ESP from, so look for it in the same partition table
as the ESP rather than on any backing disk.

Without udev, also backfill the filesystem type from blkid, since
systemd-boot can only use a FAT XBOOTLDR partition.

Generated-by: AI
Use XBOOTLDR beside the ESP for systemd-boot entries, kernels and UKIs so small ESPs need not hold multiple deployments. Keep loader.conf and systemd-boot on the ESP, and preserve ESP use on existing installations whose booted entry is not on XBOOTLDR. GRUB is unchanged.

Generated-by: AI
@cgwalters-bot cgwalters-bot moved this to In Review in Composefs Stable Sep 26, 2026
@cgwalters-bot
cgwalters-bot force-pushed the bot/composefs-xbootldr branch 2 times, most recently from 01dd597 to 24519d0 Compare September 29, 2026 19:21
@cgwalters-bot

cgwalters-bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator Author

✅ dispatch ended well. Result: #27

@cgwalters-bot

cgwalters-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Fix round 1 of 2 for 24519d0e451a: run.

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

@cgwalters-bot
cgwalters-bot force-pushed the bot/composefs-xbootldr branch from 24519d0 to d40d963 Compare October 31, 2026 19:21
@cgwalters-bot cgwalters-bot added the needs-human The poll stopped here; a person decides what is next label Oct 31, 2026
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

The poll stopped following this pull request: a draft with no checkpoint; mark it ready if the work is complete. It is labelled needs-human; remove the label to have the poll start again on it, with fresh fix rounds.

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

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

Labels

needs-human The poll stopped here; a person decides what is next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant