diff --git a/docs/release-notes.md b/docs/release-notes.md index d9d47d4b2..08b6ed97f 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -16,6 +16,7 @@ Minor changes: - install: Verify that Ignition config is valid JSON - install: Add long help for several options - download/install: Clarify help text for `--insecure` +- install: Run 'chreipl' only on s390x zVM Internal changes: diff --git a/src/s390x/zipl.rs b/src/s390x/zipl.rs index 4b3d8064e..1777c019c 100644 --- a/src/s390x/zipl.rs +++ b/src/s390x/zipl.rs @@ -14,9 +14,9 @@ use crate::blockdev::Mount; use crate::io::{visit_bls_entry, visit_bls_entry_options, Initrd, KargsEditor}; -use crate::runcmd; use crate::s390x::ZiplSecexMode; use crate::util::cmd_output; +use crate::{runcmd, runcmd_output}; use anyhow::{anyhow, Context, Result}; use nix::mount::MsFlags; use regex::Regex; @@ -28,6 +28,11 @@ use tempfile::{Builder, NamedTempFile}; /// Sets the boot device to `dev` using `chreipl`. pub fn chreipl>(dev: P) -> Result<()> { + if let Ok(vm) = runcmd_output!("systemd-detect-virt") { + if vm != "zvm" { + return Ok(()); + } + } eprintln!("Updating re-IPL device"); runcmd!("chreipl", dev.as_ref())?; Ok(())