Skip to content

Commit 9da140b

Browse files
committed
composefs: Skip boot binary dedup check during fresh install
find_vmlinuz_initrd_duplicates() reads the host's /sysroot/state/deploy to find existing deployments with matching boot digests. During a fresh install (not an upgrade), the host's own deployment data matches the boot digest, but the target disk has no existing boot entries yet. This caused "Shared boot binaries not found" when installing outside a container on a composefs+grub system. Fix by only performing the duplicate check during upgrades, where shared boot binaries on the target actually exist. Assisted-by: Claude Code (Opus 4) Signed-off-by: ckyrouac <ckyrouac@redhat.com>
1 parent 3efea1e commit 9da140b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • crates/lib/src/bootc_composefs

crates/lib/src/bootc_composefs/boot.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,14 @@ pub(crate) fn setup_composefs_bls_boot(
705705
options: Some(cmdline_refs),
706706
});
707707

708-
match find_vmlinuz_initrd_duplicates(&boot_digest)? {
708+
// Only check for shared boot binaries during upgrades. During a
709+
// fresh install the target has no existing entries, and the host's
710+
// /sysroot/state/deploy would incorrectly match.
711+
match if is_upgrade {
712+
find_vmlinuz_initrd_duplicates(&boot_digest)?
713+
} else {
714+
None
715+
} {
709716
Some(shared_entries) => {
710717
// Multiple deployments could be using the same kernel + initrd, but there
711718
// would be only one available

0 commit comments

Comments
 (0)