umount modules before switch_root

This commit is contained in:
Mikaël Cluseau
2026-04-18 20:07:32 +02:00
parent ba0a304095
commit 8596389970
5 changed files with 26 additions and 15 deletions
+3
View File
@@ -144,6 +144,9 @@ pub async fn run() {
warn!("failed to copy {INIT_LOG} to system: {e}");
}
if let Err(e) = nix::mount::umount2("/modules", nix::mount::MntFlags::MNT_DETACH) {
warn!("failed to umount /modules: {e}");
}
retry(async || switch_root("/system").await).await;
}