Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/lib/src/bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ pub(crate) fn install_via_bootupd(
device: &PartitionTable,
rootfs: &Utf8Path,
configopts: &crate::install::InstallConfigOpts,
deployment_path: &str,
) -> Result<()> {
let verbose = std::env::var_os("BOOTC_BOOTLOADER_DEBUG").map(|_| "-vvvv");
// bootc defaults to only targeting the platform boot method.
let bootupd_opts = (!configopts.generic_image).then_some(["--update-firmware", "--auto"]);

let srcroot = rootfs.join(deployment_path);
let devpath = device.path();
let args = ["backend", "install", "--write-uuid"]
.into_iter()
.chain(verbose)
.chain(bootupd_opts.iter().copied().flatten())
.chain(["--src-root", srcroot.as_str()])
.chain(["--device", devpath.as_str(), rootfs.as_str()]);
Task::new("Running bootupctl to install bootloader", "bootupctl")
.args(args)
Expand Down
5 changes: 4 additions & 1 deletion crates/lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ async fn install_with_sysroot(
) -> Result<()> {
// And actually set up the container in that root, returning a deployment and
// the aleph state (see below).
let (_deployment, aleph) = install_container(state, rootfs, &sysroot, has_ostree).await?;
let (deployment, aleph) = install_container(state, rootfs, &sysroot, has_ostree).await?;
// Write the aleph data that captures the system state at the time of provisioning for aid in future debugging.
rootfs
.physical_root
Expand All @@ -1356,6 +1356,8 @@ async fn install_with_sysroot(
})
.context("Writing aleph version")?;

let deployment_path = sysroot.deployment_dirpath(&deployment);

if cfg!(target_arch = "s390x") {
// TODO: Integrate s390x support into install_via_bootupd
crate::bootloader::install_via_zipl(&rootfs.device_info, boot_uuid)?;
Expand All @@ -1364,6 +1366,7 @@ async fn install_with_sysroot(
&rootfs.device_info,
&rootfs.physical_root_path,
&state.config_opts,
&deployment_path.as_str(),
)?;
}
tracing::debug!("Installed bootloader");
Expand Down