Skip to content

Commit 2924cc6

Browse files
committed
fixup! install/bootloader bind-mount rootfs to /run before chrooting
1 parent 7d2f8ff commit 2924cc6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

crates/lib/src/bootloader.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,18 @@ pub(crate) fn install_via_bootupd(
108108

109109
// Clean up the mounts after ourselves
110110
if let Some(target_root) = abs_deployment_path {
111-
let mut unmount_res = Ok(());
112111
for dir in bind_mount_dirs {
113112
let mount = target_root
114113
.join(dir.strip_prefix("/").unwrap())
115114
.into_std_path_buf();
116115
if let Err(e) = rustix::mount::unmount(&mount, UnmountFlags::DETACH) {
116+
// let's not propagate the error up because in some cases we can't unmount
117+
// e.g. when running `to-existing-root`
117118
tracing::warn!("Error unmounting {}: {e}", mount.display());
118-
unmount_res = Err(e.into());
119119
}
120120
}
121-
install_result.and(unmount_res)
122-
} else {
123-
install_result
124121
}
122+
install_result
125123
}
126124

127125
#[context("Installing bootloader")]

0 commit comments

Comments
 (0)