-
Notifications
You must be signed in to change notification settings - Fork 149
install: Fix DPS support #1772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
install: Fix DPS support #1772
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly addresses an issue with Discoverable Partition Specification (DPS) support by distinguishing between filesystem UUIDs and partition type UUIDs. The changes ensure that a random UUID is generated for the root filesystem, while the partition type is correctly set to the architecture-specific DPS GUID. I appreciate the removal of the root= kernel argument for composefs images to enable auto-discovery by systemd-gpt-auto-generator. The addition of integration tests to verify this behavior and the documentation updates are excellent. The code is clean and the fix is well-implemented. I have one minor suggestion to make a test more robust.
This fixes bootc's use of the Discoverable Partition Specification (DPS) to properly support systemd-gpt-auto-generator. Previously, bootc was incorrectly setting filesystem UUIDs to the DPS partition type UUID value, which caused UUID collisions and prevented proper DPS functionality. It's still a TODO on our side to support systemd-repart in this flow. Note we go back to using random filesystem UUIDs with this, but per above we should likely reinitialize them on boot via repart. Note we remove root= parameter from kernel cmdline for composefs sealed images, allowing systemd-gpt-auto-generator to auto-discover the root partition and we test this. Fixes: bootc-dev#1771 Assisted-by: Claude Code (Sonnet 4.5) Signed-off-by: Colin Walters <walters@verbum.org>
| Utf8PathBuf::from("/sysroot"), | ||
| get_esp_partition(&sysroot_parent)?.0, | ||
| Cmdline::from(format!( | ||
| "root=UUID={} {RW_KARG} {COMPOSEFS_CMDLINE}={id_hex}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would still require this for grub
|
|
||
| let (root_path, esp_device, cmdline_refs, fs, bootloader) = match setup_type { | ||
| BootSetupType::Setup((root_setup, state, fs)) => { | ||
| // root_setup.kargs has [root=UUID=<UUID>, "rw"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On first install, we still get root= karg. Again, would require it for grub
Tested the install flow once, and found few issues
This fixes bootc's use of the Discoverable Partition Specification (DPS) to properly support systemd-gpt-auto-generator. Previously, bootc was incorrectly setting filesystem UUIDs to the DPS partition type UUID value, which caused UUID collisions and prevented proper DPS functionality.
It's still a TODO on our side to support systemd-repart in this flow.
Note we go back to using random filesystem UUIDs with this, but per above we should likely reinitialize them on boot via repart.
Note we remove root= parameter from kernel cmdline for composefs sealed images, allowing systemd-gpt-auto-generator to auto-discover the root partition and we test this.
Fixes: #1771
Assisted-by: Claude Code (Sonnet 4.5)