Skip to content

Conversation

@ckyrouac
Copy link
Collaborator

When the root filesystem spans multiple backing devices (e.g., LVM across multiple disks), discover all parent devices and find ESP partitions on each. For bootupd/GRUB, install the bootloader to all devices with an ESP partition, enabling boot from any disk in a multi-disk setup. systemd-boot and zipl only support single-device configurations.

This adds a new integration test validating both single-ESP and dual-ESP multi-device scenarios.

Fixes: #481

Assisted-by: Claude Code (Opus 4.5)

@github-actions github-actions bot added the area/install Issues related to `bootc install` label Jan 14, 2026
@bootc-bot bootc-bot bot requested a review from cgwalters January 14, 2026 19:54
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 successfully enables installing to multi-device parent filesystems, such as LVM spanning multiple disks. It correctly discovers all parent devices and, for bootupd/GRUB, installs the bootloader to all devices with an ESP partition. For bootloaders that only support single-device configurations like systemd-boot and zipl, the implementation correctly defaults to using the first available device. The changes are well-architected, adapting data structures and logic to handle multiple devices. A new, thorough integration test validates both single and dual ESP scenarios. Overall, this is a solid enhancement with good error handling and logging. I have one suggestion to further improve the robustness of ESP detection.

cgwalters
cgwalters previously approved these changes Jan 15, 2026
let devpath = dev.path();
println!("Installing bootloader via bootupd to {devpath}");
Command::new("bootupctl")
.args(["backend", "install", "--write-uuid"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will lead to a kind of last-one wins behavior for bootupd.json - but in the end they should be identical I guess?

cc @HuijingHei

We probably want to document the right way to do multi-device installs there. (and have man pages in general)

Alternatively it might be nicer to explicitly support this in bootupd by just passing each device?

Copy link
Contributor

@HuijingHei HuijingHei Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will lead to a kind of last-one wins behavior for bootupd.json - but in the end they should be identical I guess?

Agree, but we need this like RAID.

Alternatively it might be nicer to explicitly support this in bootupd by just passing each device?

That will be cleaner, and we could do this only if we make bootupd not fail if the passed device does not have the esp device.

@ckyrouac ckyrouac force-pushed the multiple-backing-devices branch from f2a175a to f7b1892 Compare January 15, 2026 20:26
@ckyrouac ckyrouac marked this pull request as draft January 15, 2026 20:26
@ckyrouac
Copy link
Collaborator Author

waiting to merge until the patch release goes out

@ckyrouac ckyrouac force-pushed the multiple-backing-devices branch 3 times, most recently from 77b65cb to d03c6fa Compare January 16, 2026 17:31
@HuijingHei
Copy link
Contributor

Maybe this PR could help to consider #1916 ? @ckyrouac

@cgwalters cgwalters force-pushed the multiple-backing-devices branch from d03c6fa to 9b1c313 Compare January 21, 2026 13:08
@ckyrouac ckyrouac force-pushed the multiple-backing-devices branch from 9b1c313 to 6802697 Compare January 22, 2026 15:11
When the root filesystem spans multiple backing devices (e.g., LVM
across multiple disks), discover all parent devices and find ESP
partitions on each. For bootupd/GRUB, install the bootloader to all
devices with an ESP partition, enabling boot from any disk in a
multi-disk setup. systemd-boot and zipl only support single-device
configurations.

This adds a new integration test validating both single-ESP and dual-ESP
multi-device scenarios.

Fixes: bootc-dev#481

Assisted-by: Claude Code (Opus 4.5)
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
@ckyrouac ckyrouac force-pushed the multiple-backing-devices branch from 6802697 to 081f3b2 Compare January 22, 2026 15:29
@ckyrouac ckyrouac marked this pull request as ready for review January 22, 2026 19:28
@bootc-bot bootc-bot bot requested a review from jeckersb January 22, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bootc install to-existing-root fails with multiple backing devices

3 participants