install/flat: Use composefs pipeline for rootfs#2028
install/flat: Use composefs pipeline for rootfs#2028ericcurtin wants to merge 1 commit intobootc-dev:mainfrom
Conversation
|
Not complete, wanted to see what shape the builds are in |
There was a problem hiding this comment.
Code Review
This pull request introduces an experimental --flat mode for bootc install to-filesystem, which performs a traditional-style OS installation from a container image. The implementation is well-structured, adding new functions for each step of the flat installation process and integrating it into the existing installation flow. The changes also include a new unit test for BLS entry creation.
My review focuses on potential improvements in memory efficiency and code maintainability. I've suggested using streaming copies for kernel and initramfs files to reduce memory usage and pointed out an opportunity to refactor duplicated bootloader installation logic into a shared function.
7d6dce9 to
71e1152
Compare
49a5d13 to
04154c1
Compare
|
This is admittedly quite basic, it's just copy stuff in the right place, but it's a start |
|
What I am thinking the next step here is: For /usr, /bin, /lib, etc.: do a Rust-written equivalent of |
Request: Please don't use "regular" (or worse "normal") in that way, it implies other things are "irregular" (or worse "abnormal"). In this case I'd say "mutable" (or just non-bootc) as you did. Anyways on the implementation side, I think it'd be really nice if we actually did create a composefs repo but then from there we did a reflink based copy out. There are several huge advantages to that, among them we'd be reusing the selinux labeling support in composefs(-rs) for example, and the kernel installation flow. Further it makes it way easier to then convert the image to immutable/bootc style later on. And anyone who doesn't want the extra metadata overhead can just I think we should not regenerate the initramfs client side by default. |
Apologies, you've mentioned this before and I completely understand the logic.
All fair points. |
5d01837 to
2a9712c
Compare
10e3e87 to
949d5a9
Compare
cgwalters
left a comment
There was a problem hiding this comment.
I haven't even looked at install.rs changes yet and no promises on this one in the review queue in general, but I also don't want to block experimentation on it.
Speaking of even if we were to land this for sure it'd need to be an experimental feature (much like its close cousin in #1969 )
1a7c3cf to
36eb457
Compare
- Use composefs-rs for SELinux labeling and kernel installation - Implement streaming copy for kernel/initramfs files - Consolidate bootloader installation logic - Add /usr overlay status tracking - Various test and documentation updates Note: blockdev.rs and ADOPTERS.md changes moved to separate PRs per review feedback Assisted-by: Claude Code (Opus) Signed-off-by: Eric Curtin <eric.curtin@docker.com>
--flat install implementation will go through the composefs
repository. This gives several advantages:
labels from the image's file_contexts rather than inheriting the
running container's labels.
(get_boot_resources / UsrLibModulesVmlinuz).
easy to convert to immutable/bootc mode later. Users who don't want
the metadata overhead can rm -rf /sysroot/composefs.
with the composefs object store.
removed since we pull via the image reference, not via cp /).