Skip to content

Commit 198016e

Browse files
committed
install: Trim bind mount information
I'm seeing this appear when targeting from a container image.
1 parent 6c0b7f3 commit 198016e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/src/install.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,15 @@ pub(crate) async fn install_to_filesystem(opts: InstallToFilesystemOpts) -> Resu
967967
// for GRUB (BIOS) and in the future zipl (I think).
968968
let backing_device = {
969969
let mut dev = inspect.source;
970+
// Hack: trim bind mount information from source
971+
if dev.contains('[') {
972+
dev = inspect
973+
.sources
974+
.into_iter()
975+
.flatten()
976+
.next()
977+
.ok_or_else(|| anyhow!("Expected `sources` in findmnt output"))?;
978+
}
970979
loop {
971980
tracing::debug!("Finding parents for {dev}");
972981
let mut parents = crate::blockdev::find_parent_devices(&dev)?.into_iter();

0 commit comments

Comments
 (0)