diff --git a/lib/src/install.rs b/lib/src/install.rs index beeadb7c4..185c7f63d 100644 --- a/lib/src/install.rs +++ b/lib/src/install.rs @@ -967,6 +967,15 @@ pub(crate) async fn install_to_filesystem(opts: InstallToFilesystemOpts) -> Resu // for GRUB (BIOS) and in the future zipl (I think). let backing_device = { let mut dev = inspect.source; + // Hack: trim bind mount information from source + if dev.contains('[') { + dev = inspect + .sources + .into_iter() + .flatten() + .next() + .ok_or_else(|| anyhow!("Expected `sources` in findmnt output"))?; + } loop { tracing::debug!("Finding parents for {dev}"); let mut parents = crate::blockdev::find_parent_devices(&dev)?.into_iter(); diff --git a/lib/src/mount.rs b/lib/src/mount.rs index 0eac55ad2..a2a780f3c 100644 --- a/lib/src/mount.rs +++ b/lib/src/mount.rs @@ -25,7 +25,7 @@ pub(crate) struct Findmnt { pub(crate) fn inspect_filesystem(path: &Utf8Path) -> Result { tracing::debug!("Inspecting {path}"); let o = Command::new("findmnt") - .args(["-J", "--output-all", path.as_str()]) + .args(["-J", "-v", "--output-all", path.as_str()]) .output()?; let st = o.status; if !st.success() {