You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
composefs: bootc status/upgrade/switch use the first ESP on the disk instead of the one the system booted from (dual-boot with Windows) #2554
On a dual-boot machine (Windows + bootc composefs, systemd-boot), every storage-touching verb fails:
$ sudo bootc status
error: Status: Prepending custom prefix to EFI and BLS entries: Getting sorted Type1 boot entries: No such file or directory (os error 2)
The system itself boots fine from the correct ESP.
p5 contains the expected bootc layout (loader/entries/bootc_debian-13-1.conf, EFI/Linux/bootc_composefs-<digest>/{vmlinuz,initrd}), matching the booted composefs= karg. p1 has no loader/ directory.
Trace
$ sudo RUST_LOG=trace bootc status
...
TRACE exec: "lsblk" "-J" "-b" "-O" "/dev/nvme0n1"
TRACE exec: "findmnt" "-J" "-v" "--output=SOURCE,TARGET,MAJ:MIN,FSTYPE,OPTIONS,UUID"
DEBUG find_mount_target_by_source: no mount found for source /dev/nvme0n1p1; ...
error: Status: Prepending custom prefix to EFI and BLS entries: Getting sorted Type1 boot entries: No such file or directory (os error 2)
bootc selects /dev/nvme0n1p1 (the Windows ESP). Mounting p5 at /boot, /sysroot/boot or /sysroot/boot/efi beforehand does not change the outcome.
Root cause
Device::find_partition_of_esp_optional() in crates/blockdev/src/blockdev.rs returns the first partition with the ESP type GUID. With more than one ESP on the disk, that is not necessarily the one in use. This still appears to be the case on main.
On a running UEFI system, prefer the ESP identified by the LoaderDevicePartUUID EFI variable (set by systemd-boot and other loaders implementing the Boot Loader Interface), and fall back to the first ESP only when that variable is absent. Optionally also honour an ESP mounted at /boot, /efi or /boot/efi.
Workaround
Changing the Windows ESP's partition type away from "EFI System" would presumably make bootc pick p5 (as reported in #1929), but that risks breaking Windows boot, so it isn't a real option for dual-boot users.
Activity
Johan-Liebert1 commentedon Oct 8, 2026
Thanks for filing this. We're not really testing dual booted systems and yeah the current code just picks up the very first ESP it finds
store: Select the booted ESP via LoaderDevicePartUUID
store: Select the booted ESP via LoaderDevicePartUUID
store: Select the booted ESP via LoaderDevicePartUUID