Skip to content

composefs: Name Type 1 boot directories by boot digest - #103

Draft
cgwalters-bot wants to merge 1 commit into
cgwalters-forge:mainfrom
cgwalters-bot:dispatch/implement/agent-run-42227968956
Draft

cgwalters-bot wants to merge 1 commit into
cgwalters-forge:mainfrom
cgwalters-bot:dispatch/implement/agent-run-42227968956

Conversation

@cgwalters-bot

Copy link
Copy Markdown
Collaborator

Executive summary

On composefs, the Type 1 kernel path on the ESP was /EFI/Linux/bootc_composefs-<128 hex verity>/vmlinuz, which is 163 characters. HP G10 firmware hangs loading a kernel from that path (bootc-dev#2585). New directories are now named after the sha256 boot digest of the vmlinuz and initrd they hold, which bootc already computes, so the path is 99 characters.

GC, status and the BLS parsers already treat the part of the name after the prefix as opaque, so existing verity-named directories stay valid. GC removes them once no entry references them. On upgrade, an existing directory with the same kernel and initrd is still reused, even if it has an old verity name. This means existing installs only get the short path once the kernel or initrd changes. Rollback to bootc older than 1.17.0 is unsafe, because its GC compared directory names against the verity. Type 1 entries on /boot (GRUB) get the shorter names too. UKIs are not changed.

More detail

Verified with cargo test -p bootc-lib --lib (334 passed, including a new path-length test) and cargo fmt --check. I updated the tmt GC test to expect digest-named directories, but did not run it. Nobody has tested this on the affected hardware.

There was one review pass, with no blockers. Follow-ups it left open:

  • The "Inconsistent state" guard in GC compares directory names with the booted verity, so it can no longer fire for digest-named directories. It should also compare against the booted boot_digest.
  • find_vmlinuz_initrd_duplicate could look up bootc_composefs-<digest> by name before falling back to hashing every directory.
  • The testutils.rs fixture still names directories by verity. Moving it to digest naming would let the GC unit tests cover the new layout and upgrades from the old one.
  • UKI paths (/EFI/Linux/bootc/bootc_composefs-<128 hex>.efi, 165 characters) are still long.

Part of #102

Generated by dispatch · ◷

HP G10 firmware hangs on the 163-character Type 1 kernel path. Name
new directories by the kernel and initrd digest to bring the path down
to 99 characters, while keeping existing directories reusable.

See bootc-dev#2585

Unit tests and formatting pass; container checks hit the same Podman
runtime failure on unchanged main.

Part of cgwalters-forge#102

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

cgwalters-bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Rebase round 1 of 2 for 918667e2528d: run.

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

@cgwalters-bot

cgwalters-bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

✅ dispatch ended well. Result: #103

@cgwalters-bot

cgwalters-bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Rebase round 2 of 2 for 918667e2528d: run.

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

@cgwalters-bot
cgwalters-bot force-pushed the dispatch/implement/agent-run-42227968956 branch from 918667e to 5475232 Compare December 2, 2026 01:56
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Fix run report:

One independent review pass found no blockers; four non-blocking follow-ups were left open.

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

Generated by dispatch · ◷

@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

✅ dispatch ended well. Result: #103

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.

2 participants