Repository navigation
composefs: Write Type 1 boot entries in one place - #2645
Merged
Merged
Conversation
setup_composefs_bls_boot() and write_systemd_uki_config() each had their own copy of writing a deployment's Type 1 entry: into loader/entries on install, or, when staging, into a fresh loader/entries.staged next to the booted deployment's entry. The UKI copy only started clearing the earlier staged entries in bootc-dev#2630, after the BLS one had done so since bootc-dev#1861. Move it into write_type1_entries(), which both now call, so the two can't drift apart again. It also fsyncs the entries directory it wrote to for UKIs too, where it used to fsync the ESP's root. Assisted-by: AI Signed-off-by: Kristof Imeri <kristof@lanth.me>
krissedout
force-pushed
the
composefs-type1-entries
branch
from
November 11, 2026 17:13
64352af to
3a51d2f
Compare
Contributor
Author
|
@Johan-Liebert1 could you merge this when you get the chance? Thanks! |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the consolidated Type 1 boot-entry writing change.
No open issues 🎉
What changed in this PR
Centralizes composefs Type 1 boot-entry writing so kernel/initrd and UKI deployments share the same installation and staging logic, reducing the risk of fixes diverging between them.
Changes:
- Extracts
write_type1_entries()and uses it from both boot-configuration paths. - Preserves replacement of earlier staged entries alongside the booted deployment’s entry.
- Changes UKI synchronization to fsync the entries directory rather than the ESP root.
| File | Description |
|---|---|
crates/lib/src/bootc_composefs/boot.rs |
Consolidates Type 1 entry writing and updates UKI directory synchronization. |
Review effort: Balanced
cgwalters
approved these changes
Nov 13, 2026
cgwalters
left a comment
Member
There was a problem hiding this comment.
This looks like a really nice cleanup!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setup_composefs_bls_boot() and write_systemd_uki_config() each had their own copy of writing a deployment's Type 1 entry, into loader/entries on install, or when staging into a fresh loader/entries.staged next to the booted deployment's entry. The UKI copy only started clearing earlier staged entries in #2630, long after the BLS one did in #1861, which is how that bug happened.
This moves it into write_type1_entries(), which both call now. The one behaviour change is that for UKIs it fsyncs the entries directory it wrote to, instead of the ESP's root.
Follow-up to the review on #2630. cargo fmt, clippy and cargo test -p bootc-lib pass, and test-composefs-gc-uki.nu covers the staging path.
Assisted-by: AI