From 5c305105b53b2db5fd6398499c74fb7f8abc4334 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 29 Sep 2023 14:50:26 -0400 Subject: [PATCH] install: Do use zipl on s390x This pairs with https://github.com/ostreedev/ostree/pull/3059/commits/e3d93a85713dbc4728d6271ecd23e05c88cf54f3 What we need to add is something more like `ostree admin init-fs --edition=2023` that flips on modern defaults. Signed-off-by: Colin Walters --- lib/src/install.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/src/install.rs b/lib/src/install.rs index bfa1299e2..3291b393d 100644 --- a/lib/src/install.rs +++ b/lib/src/install.rs @@ -465,7 +465,17 @@ async fn initialize_ostree_root_from_self( ["admin", "init-fs", "--modern", rootfs.as_str()], )?; - for (k, v) in [("sysroot.bootloader", "none"), ("sysroot.readonly", "true")] { + // Default to avoiding grub2-mkconfig etc., but we need to use zipl on s390x. + // TODO: Lower this logic into ostree proper. + let bootloader = if cfg!(target_arch = "s390x") { + "zipl" + } else { + "none" + }; + for (k, v) in [ + ("sysroot.bootloader", bootloader), + ("sysroot.readonly", "true"), + ] { Task::new("Configuring ostree repo", "ostree") .args(["config", "--repo", "ostree/repo", "set", k, v]) .cwd(rootfs_dir)?