Skip to content

Commit 9e5d015

Browse files
jbtrystramjmarrero
authored andcommitted
install/ostree: Set zipl as the bootloader for s390x
`zipl` cannot dynamically read BLS config at boot, and requires the MBR to be updated before. So we set `zipl` as the bootloader for s390x by default. Otherwise, s390x systems cannot reboot into new deployments. We set the ostree parameter after the initial ostree deployement because it fails if called during it. See https://github.com/coreos/coreos-assembler/blob/99bb23e7dfbfa8f1ae8b9bfaca9ff2e6d98c6cba/src/osbuild-manifests/build.common.ipp.yaml#L160-L163 Fixes #2151 Signed-off-by: jbtrystram <jbtrystram@redhat.com>
1 parent db955ed commit 9e5d015

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

crates/lib/src/install.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,6 +2053,24 @@ async fn install_to_filesystem_impl(
20532053
}
20542054
} else {
20552055
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.try_clone()?)
2071+
.run_capture_stderr()
2072+
.context("Setting bootloader config to zipl")?;
2073+
}
20562074
}
20572075

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

0 commit comments

Comments
 (0)