diff --git a/docs/release-notes.md b/docs/release-notes.md index 3798e9fd4..478d9cfe4 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -13,7 +13,7 @@ Minor changes: Internal changes: - +- s390x: Use options and logic compatible with both C-based `genprotimg` and Rust-based `pvimg` Packaging changes: diff --git a/src/s390x/zipl.rs b/src/s390x/zipl.rs index d7bdd3ab6..709cade9f 100644 --- a/src/s390x/zipl.rs +++ b/src/s390x/zipl.rs @@ -281,16 +281,23 @@ fn generate_sdboot( // finally, Secure Execution sd-boot image let sdboot = mountpoint.join("sdboot"); + + // C 'genprotimg' tool no longer exists and was replaced by symlink to Rust 'pvimg create', + // which by default doesn't overwrite the output image. + // For backward compatibility let's silently remove the 'sdboot'. + let _ = std::fs::remove_file(&sdboot); + + // FIXME: in F42/el10 switch to 'pvimg create' with '--overwrite' flag. let mut cmd = Command::new("genprotimg"); - cmd.arg("-V") - .arg("-i") + cmd.arg("--verbose") + .arg("--image") .arg(kernel) - .arg("-r") + .arg("--ramdisk") .arg(initrd) - .arg("-p") + .arg("--parmfile") .arg(cmdline.path()) .arg("--no-verify") - .arg("-o") + .arg("--output") .arg(&sdboot); for k in hostkeys { cmd.arg("-k").arg(k);