Skip to content

Commit fffc668

Browse files
committed
WIP: set bootloader option after the ostree deployement
1 parent f71e408 commit fffc668

1 file changed

Lines changed: 18 additions & 16 deletions

File tree

crates/lib/src/install.rs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -957,22 +957,6 @@ async fn initialize_ostree_root(state: &State, root_setup: &RootSetup) -> Result
957957
.run_capture_stderr()?;
958958
}
959959

960-
// For s390x, we set zipl as the bootloader
961-
if cfg!(target_arch = "s390x") {
962-
Command::new("ostree")
963-
.args([
964-
"config",
965-
"--repo",
966-
"ostree/repo",
967-
"set",
968-
"sysroot.bootloader",
969-
"zipl",
970-
])
971-
.cwd_dir(rootfs_dir.try_clone()?)
972-
.run_capture_stderr()
973-
.context("Setting bootloader config to zipl")?;
974-
}
975-
976960
let sysroot = {
977961
let path = format!(
978962
"/proc/{}/fd/{}",
@@ -2069,6 +2053,24 @@ async fn install_to_filesystem_impl(
20692053
}
20702054
} else {
20712055
ostree_install(state, rootfs, cleanup).await?;
2056+
2057+
// For s390x, we set zipl as the bootloader
2058+
// this needs to be done after the ostree commit is deployed,
2059+
// as we don't want zipl to run during the initial ostree deployement.
2060+
if cfg!(target_arch = "s390x") {
2061+
Command::new("ostree")
2062+
.args([
2063+
"config",
2064+
"--repo",
2065+
"ostree/repo",
2066+
"set",
2067+
"sysroot.bootloader",
2068+
"zipl",
2069+
])
2070+
.cwd_dir(rootfs.physical_root_path.try_clone()?)
2071+
.run_capture_stderr()
2072+
.context("Setting bootloader config to zipl")?;
2073+
}
20722074
}
20732075

20742076
// As the very last step before filesystem finalization, do a full SELinux

0 commit comments

Comments
 (0)