Skip to content

Commit f53aa17

Browse files
committed
install: inject kernel arguments for seperate /boot during installation
Signed-off-by: Huijing Hei <[email protected]>
1 parent b5c58a1 commit f53aa17

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

crates/lib/src/install.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,23 @@ async fn install_container(
970970
}
971971
}
972972

973+
// For seperate /boot filesystem, the better workaround is
974+
// to inject kernel arguments during installation.
975+
// See discussion in https://github.com/bootc-dev/bootc/issues/1388
976+
if let Some(boot) = root_setup.boot.as_ref() {
977+
if !boot.source.is_empty() {
978+
let mount_extra = format!(
979+
"systemd.mount-extra={}:{}:{}:{}",
980+
boot.source,
981+
boot.target,
982+
boot.fstype,
983+
boot.options.as_deref().unwrap_or("defaults")
984+
);
985+
kargs.extend(&Cmdline::from(mount_extra.as_str()));
986+
tracing::debug!("Add {mount_extra} to kargs");
987+
}
988+
}
989+
973990
// Finally map into &[&str] for ostree_container
974991
let kargs_strs: Vec<&str> = kargs.iter_str().collect();
975992

0 commit comments

Comments
 (0)