diff --git a/Cargo.lock b/Cargo.lock index ff86a79b04..0277b52b55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -783,8 +783,7 @@ checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335" [[package]] name = "composefs" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d7e1513737dcf10ea93c116fe1de51f5160d782cdb78cd4399895069338f47b" +source = "git+https://github.com/mattmoor/composefs-rs?branch=pull-platform#9e7d19bebe35b4d32246a9710980feaeec5e3d6b" dependencies = [ "anyhow", "composefs-ioctls", @@ -811,8 +810,7 @@ dependencies = [ [[package]] name = "composefs-boot" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cae88df3ad0f69be4b615b4921fd639c6a1fd1519209f780fd61a8c692fa5ca" +source = "git+https://github.com/mattmoor/composefs-rs?branch=pull-platform#9e7d19bebe35b4d32246a9710980feaeec5e3d6b" dependencies = [ "anyhow", "composefs", @@ -827,8 +825,7 @@ dependencies = [ [[package]] name = "composefs-ctl" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0bf6a54f7f6e3db14b83f035a2f8625ad9826de188c861be5c9307e3e503314" +source = "git+https://github.com/mattmoor/composefs-rs?branch=pull-platform#9e7d19bebe35b4d32246a9710980feaeec5e3d6b" dependencies = [ "anyhow", "cap-std-ext", @@ -857,8 +854,7 @@ dependencies = [ [[package]] name = "composefs-fuse" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d031d10f125a677778f3c359295e5046b19a96cb7cf64915a79b24b2da12a7" +source = "git+https://github.com/mattmoor/composefs-rs?branch=pull-platform#9e7d19bebe35b4d32246a9710980feaeec5e3d6b" dependencies = [ "anyhow", "composefs", @@ -873,8 +869,7 @@ dependencies = [ [[package]] name = "composefs-ioctls" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1e1dbf64a4a2dda8db3cbdb3109d29274b0cbeedc1ee68fdc8ccfdefc17cb9" +source = "git+https://github.com/mattmoor/composefs-rs?branch=pull-platform#9e7d19bebe35b4d32246a9710980feaeec5e3d6b" dependencies = [ "rustix", "thiserror 2.0.21", @@ -883,8 +878,7 @@ dependencies = [ [[package]] name = "composefs-oci" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6402e698c01b839294a2787128a2357c47886054d6d249136a54c80693fdad22" +source = "git+https://github.com/mattmoor/composefs-rs?branch=pull-platform#9e7d19bebe35b4d32246a9710980feaeec5e3d6b" dependencies = [ "anyhow", "async-compression", @@ -919,8 +913,7 @@ dependencies = [ [[package]] name = "composefs-splitdirfdstream" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d9847c8dd85e017d2615c41c46b9af9e7ce3e4f4021b841c6603cc62e184083" +source = "git+https://github.com/mattmoor/composefs-rs?branch=pull-platform#9e7d19bebe35b4d32246a9710980feaeec5e3d6b" dependencies = [ "openssl", "rand 0.10.3", @@ -933,8 +926,7 @@ dependencies = [ [[package]] name = "composefs-storage" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390fac98c3953f41ec4e65aefc303b1a3e5a2c0e739898471b9ea0cc478f5152" +source = "git+https://github.com/mattmoor/composefs-rs?branch=pull-platform#9e7d19bebe35b4d32246a9710980feaeec5e3d6b" dependencies = [ "anyhow", "base64 0.23.0", @@ -2440,8 +2432,7 @@ dependencies = [ [[package]] name = "ocidir" version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a778b15397a580c0b7343969fd4b2a26abc5de08cdfd713d36f65b94803c9226" +source = "git+https://github.com/mattmoor/ocidir-rs?branch=platform-selection#7239adfb45df8d7f84ce69b85bf2d79164e5bf57" dependencies = [ "camino", "canon-json", diff --git a/Cargo.toml b/Cargo.toml index f6b256827f..fe80788eb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -132,3 +132,17 @@ todo = "deny" needless_borrow = "allow" needless_borrows_for_generic_args = "allow" + +# Image platform selection for --target-arch is not yet in released +# composefs-rs or ocidir. All composefs crates come from the same branch +# so their types stay compatible. +[patch.crates-io] +composefs = { git = "https://github.com/mattmoor/composefs-rs", branch = "pull-platform" } +composefs-boot = { git = "https://github.com/mattmoor/composefs-rs", branch = "pull-platform" } +composefs-ctl = { git = "https://github.com/mattmoor/composefs-rs", branch = "pull-platform" } +composefs-fuse = { git = "https://github.com/mattmoor/composefs-rs", branch = "pull-platform" } +composefs-ioctls = { git = "https://github.com/mattmoor/composefs-rs", branch = "pull-platform" } +composefs-oci = { git = "https://github.com/mattmoor/composefs-rs", branch = "pull-platform" } +composefs-splitdirfdstream = { git = "https://github.com/mattmoor/composefs-rs", branch = "pull-platform" } +composefs-storage = { git = "https://github.com/mattmoor/composefs-rs", branch = "pull-platform" } +ocidir = { git = "https://github.com/mattmoor/ocidir-rs", branch = "platform-selection" } diff --git a/crates/lib/src/bootc_composefs/boot.rs b/crates/lib/src/bootc_composefs/boot.rs index 8b0917cb0b..2d66a0798c 100644 --- a/crates/lib/src/bootc_composefs/boot.rs +++ b/crates/lib/src/bootc_composefs/boot.rs @@ -2693,6 +2693,14 @@ fn install_composefs_bootloader( if bootloader == Bootloader::None { return Ok(()); } + // Only systemd-boot installs from the image's own binaries; the other + // paths name or run the host's. + let target_arch = state.config_opts.target_arch(); + ensure!( + target_arch.is_host() || (bootloader == Bootloader::Systemd && target_arch.uses_efi()), + "Installing for {target_arch} from {} requires systemd-boot, not {bootloader:?}", + crate::install::target_arch::TargetArch::host() + ); let mounted_root = MountedImageRoot::new(composefs_mnt_fd, &root_setup.device_info)?; if bootloader == Bootloader::Ukiboot { diff --git a/crates/lib/src/bootc_composefs/repo.rs b/crates/lib/src/bootc_composefs/repo.rs index d933c922d8..5c9a2fa36c 100644 --- a/crates/lib/src/bootc_composefs/repo.rs +++ b/crates/lib/src/bootc_composefs/repo.rs @@ -268,6 +268,19 @@ pub(crate) async fn pull_install_composefs_repository( // ostree/bootc/storage depend on this link. crate::store::ensure_composefs_bootc_link(rootfs_dir)?; + // Select the target's manifest only when it differs from the host's, so + // a native install resolves exactly as it always has. + let platform = if state.config_opts.is_cross_arch() { + anyhow::ensure!( + !use_unified, + "Installing for {} does not support unified storage", + state.config_opts.target_arch() + ); + Some(state.config_opts.target_arch().oci_platform()?) + } else { + None + }; + let pull_result = if use_unified { // Unified path: first into containers-storage on the target // rootfs, then cstor zero-copy into composefs. This ensures the image @@ -297,7 +310,7 @@ pub(crate) async fn pull_install_composefs_repository( } else { // Direct path: pull directly into composefs via skopeo, without // containers-storage as intermediary. - pull_composefs_direct(&repo, &imgref, false, ProgressWriter::default()).await? + pull_composefs_direct(&repo, &imgref, false, ProgressWriter::default(), platform).await? }; Ok(pull_result) @@ -406,6 +419,7 @@ async fn pull_composefs_direct( imgref: &containers_image_proxy::ImageReference, quiet: bool, prog: ProgressWriter, + platform: Option, ) -> Result> { let imgref_str = imgref.to_string(); tracing::info!("Direct pull: fetching {imgref_str} into composefs repository"); @@ -422,6 +436,7 @@ async fn pull_composefs_direct( PullOptions { img_proxy_config: Some(config), progress: Some(reporter), + platform, ..Default::default() }, ) @@ -594,7 +609,7 @@ pub(crate) async fn pull_composefs_repo( pull_composefs_unified(&imgstore, &storage_path, &repo, &imgref, quiet, prog).await? } else { - pull_composefs_direct(&repo, &imgref, quiet, prog).await? + pull_composefs_direct(&repo, &imgref, quiet, prog, None).await? }; // Tag the manifest as a bootc-owned GC root. diff --git a/crates/lib/src/bootloader.rs b/crates/lib/src/bootloader.rs index a081c520ed..3232bdb364 100644 --- a/crates/lib/src/bootloader.rs +++ b/crates/lib/src/bootloader.rs @@ -38,6 +38,10 @@ const KERNEL_INSTALL_CONF_ROOT: &str = "/tmp"; /// See: const BOOTCTL_RANDOM_SEED_MIN_VERSION: u32 = 257; +/// First systemd release whose `bootctl install` accepts `--all-architectures` +/// and `--install-source`. +const BOOTCTL_CROSS_ARCH_MIN_VERSION: u32 = 252; + /// Mount the first ESP found among backing devices at /boot/efi. /// /// This is used by the install-alongside path to clean stale bootloader @@ -308,6 +312,21 @@ pub(crate) fn install_systemd_boot( } } + if configopts.is_cross_arch() { + // bootctl installs only binaries named for its own EFI architecture, + // so on another architecture's root it finds none and installs + // nothing. Take every architecture the image ships (a single-arch + // image ships only its own), and only from the image, never the + // host's. + let systemd_version = systemd_version()?; + anyhow::ensure!( + systemd_version >= BOOTCTL_CROSS_ARCH_MIN_VERSION, + "Installing systemd-boot for {} requires systemd >= {BOOTCTL_CROSS_ARCH_MIN_VERSION}, found {systemd_version}", + configopts.target_arch() + ); + bootctl_args.extend(["--all-architectures", "--install-source=image"]); + } + Command::new("bootctl") .args(bootctl_args) // Skip partition-type GUID validation because e.g. osbuild diff --git a/crates/lib/src/install.rs b/crates/lib/src/install.rs index c972c0f226..51d18ca274 100644 --- a/crates/lib/src/install.rs +++ b/crates/lib/src/install.rs @@ -146,6 +146,9 @@ pub(crate) mod completion; pub(crate) mod config; mod osbuild; pub(crate) mod osconfig; +pub(crate) mod target_arch; + +use target_arch::TargetArch; use std::collections::HashMap; use std::io::Write; @@ -393,6 +396,27 @@ pub(crate) struct InstallConfigOpts { #[clap(long)] #[serde(default)] pub(crate) bootloader: Option, + + /// The architecture of the image being installed. Defaults to the + /// architecture bootc runs on. Installing for another architecture is + /// supported for `install to-disk` with the composefs backend and + /// systemd-boot, and needs a systemd whose `bootctl install` supports + /// `--install-source`. + #[clap(long)] + #[serde(default)] + pub(crate) target_arch: Option, +} + +impl InstallConfigOpts { + /// The architecture this install targets. + pub(crate) fn target_arch(&self) -> TargetArch { + self.target_arch.unwrap_or_else(TargetArch::host) + } + + /// Whether this install targets an architecture other than the host's. + pub(crate) fn is_cross_arch(&self) -> bool { + !self.target_arch().is_host() + } } #[derive(Debug, Default, Clone, clap::Parser, Serialize, Deserialize, PartialEq, Eq)] diff --git a/crates/lib/src/install/baseline.rs b/crates/lib/src/install/baseline.rs index 91c517d6c7..538987a442 100644 --- a/crates/lib/src/install/baseline.rs +++ b/crates/lib/src/install/baseline.rs @@ -36,6 +36,7 @@ use super::RW_KARG; use super::RootSetup; use super::State; use super::config::Filesystem; +use super::target_arch::FirmwareBootPartition; use crate::bootloader::systemd_version; use crate::task::Task; use bootc_blockdev::dps::BIOS_BOOT; @@ -895,6 +896,7 @@ fn sfdisk( root_size: Option, composefs_backend: bool, requires_bootpart: bool, + target_arch: super::TargetArch, ) -> Result { // Generate partitioning spec as input to sfdisk let mut partno = 0; @@ -902,28 +904,29 @@ fn sfdisk( writeln!(partitioning_buf, "label: gpt")?; let random_label = uuid::Uuid::new_v4(); writeln!(&mut partitioning_buf, "label-id: {random_label}")?; - if cfg!(target_arch = "x86_64") { - partno += 1; - writeln!( - &mut partitioning_buf, - r#"size=1MiB, bootable, type=21686148-6449-6E6F-744E-656564454649, name="BIOS-BOOT""# - )?; - } else if cfg!(target_arch = "powerpc64") { - // PowerPC-PReP-boot - partno += 1; - let label = PREPBOOT_LABEL; - let uuid = PREPBOOT_GUID; - writeln!( - &mut partitioning_buf, - r#"size=4MiB, bootable, type={uuid}, name="{label}""# - )?; - } else if cfg!(any(target_arch = "aarch64", target_arch = "s390x")) { + match target_arch.firmware_boot_partition()? { + Some(FirmwareBootPartition::BiosBoot) => { + partno += 1; + writeln!( + &mut partitioning_buf, + r#"size=1MiB, bootable, type=21686148-6449-6E6F-744E-656564454649, name="BIOS-BOOT""# + )?; + } + Some(FirmwareBootPartition::PrepBoot) => { + // PowerPC-PReP-boot + partno += 1; + let label = PREPBOOT_LABEL; + let uuid = PREPBOOT_GUID; + writeln!( + &mut partitioning_buf, + r#"size=4MiB, bootable, type={uuid}, name="{label}""# + )?; + } // No bootloader partition is necessary - } else { - anyhow::bail!("Unsupported architecture: {}", std::env::consts::ARCH); + None => {} } - let esp_partno = if super::ARCH_USES_EFI { + let esp_partno = if target_arch.uses_efi() { let esp_guid = bootc_blockdev::dps::ESP; partno += 1; @@ -959,7 +962,7 @@ fn sfdisk( let root_size = root_size .map(|v| Cow::Owned(format!("size={v}MiB, "))) .unwrap_or_else(|| Cow::Borrowed("")); - let rootpart_uuid = uuid::Uuid::parse_str(bootc_blockdev::dps::this_arch_root())?; + let rootpart_uuid = uuid::Uuid::parse_str(target_arch.root_partition_type())?; writeln!( &mut partitioning_buf, r#"{root_size}type={rootpart_uuid}, name="root""# @@ -1050,13 +1053,21 @@ pub(crate) fn install_create_rootfs( let serial = device.serial.as_deref().unwrap_or(""); let model = device.model.as_deref().unwrap_or(""); let discoverable = state.aboot_disk_layout.is_none() && use_discoverable_partitions(state); + let target_arch = state.config_opts.target_arch(); + // systemd-repart lays out partitions for the architecture it runs on, so + // only the sfdisk path can lay a disk out for another one. + anyhow::ensure!( + target_arch.is_host() || (state.aboot_disk_layout.is_none() && !use_systemd_repart), + "Installing for {target_arch} from {} is not supported with systemd-repart partitioning", + super::TargetArch::host() + ); if let Some(layout) = state.aboot_disk_layout { anyhow::ensure!( block_setup == BlockSetup::Direct, "{layout:?} aboot layout requires --block-setup direct" ); anyhow::ensure!( - layout != AbootDiskLayout::Ukiboot || super::ARCH_USES_EFI, + layout != AbootDiskLayout::Ukiboot || target_arch.uses_efi(), "ukiboot disk layout requires x86_64 or aarch64" ); anyhow::ensure!( @@ -1125,6 +1136,7 @@ pub(crate) fn install_create_rootfs( root_size, state.composefs_options.composefs_backend, block_setup.requires_bootpart(), + target_arch, )? }; @@ -1168,7 +1180,7 @@ pub(crate) fn install_create_rootfs( let root_device = device.find_device_by_partno(layout.rootpn)?; // Verify the partition type matches the DPS root partition type for this architecture - let expected_parttype = bootc_blockdev::dps::this_arch_root(); + let expected_parttype = target_arch.root_partition_type(); if !root_device .parttype .as_ref() diff --git a/crates/lib/src/install/target_arch.rs b/crates/lib/src/install/target_arch.rs new file mode 100644 index 0000000000..03acf706c1 --- /dev/null +++ b/crates/lib/src/install/target_arch.rs @@ -0,0 +1,162 @@ +//! The architecture an installation targets. +//! +//! An install normally targets the architecture bootc itself runs on, and +//! that remains the default. Building a disk image for another architecture +//! only needs the decisions below to follow the image rather than the host: +//! none of them executes code from the target. + +use std::fmt; + +use anyhow::Result; +use clap::ValueEnum; +use ocidir::oci_spec::image::{Arch, Os, Platform, PlatformBuilder}; +use serde::{Deserialize, Serialize}; + +/// An architecture bootc can install for. +#[derive(ValueEnum, Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub(crate) enum TargetArch { + #[value(name = "x86_64")] + #[serde(rename = "x86_64")] + X86_64, + #[value(name = "aarch64")] + #[serde(rename = "aarch64")] + Aarch64, + #[value(name = "s390x")] + #[serde(rename = "s390x")] + S390x, + #[value(name = "powerpc64")] + #[serde(rename = "powerpc64")] + Powerpc64, + #[value(name = "powerpc64le")] + #[serde(rename = "powerpc64le")] + Powerpc64le, + #[value(name = "riscv64")] + #[serde(rename = "riscv64")] + Riscv64, + #[value(name = "arm")] + #[serde(rename = "arm")] + Arm, +} + +#[cfg(target_arch = "x86_64")] +const HOST: TargetArch = TargetArch::X86_64; +#[cfg(target_arch = "aarch64")] +const HOST: TargetArch = TargetArch::Aarch64; +#[cfg(target_arch = "s390x")] +const HOST: TargetArch = TargetArch::S390x; +#[cfg(all(target_arch = "powerpc64", target_endian = "big"))] +const HOST: TargetArch = TargetArch::Powerpc64; +#[cfg(all(target_arch = "powerpc64", target_endian = "little"))] +const HOST: TargetArch = TargetArch::Powerpc64le; +#[cfg(target_arch = "riscv64")] +const HOST: TargetArch = TargetArch::Riscv64; +#[cfg(target_arch = "arm")] +const HOST: TargetArch = TargetArch::Arm; + +/// The partition, before the ESP, that an architecture's firmware boots from. +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub(crate) enum FirmwareBootPartition { + /// A BIOS boot partition for GRUB on legacy-BIOS x86. + BiosBoot, + /// A PReP boot partition for OpenFirmware on PowerPC. + PrepBoot, +} + +impl TargetArch { + /// The architecture bootc was built for. + pub(crate) const fn host() -> Self { + HOST + } + + /// Whether this architecture is the one bootc runs on. + pub(crate) fn is_host(self) -> bool { + self == Self::host() + } + + /// The Discoverable Partitions root partition type for this architecture. + pub(crate) const fn root_partition_type(self) -> &'static str { + use bootc_blockdev::dps; + match self { + Self::X86_64 => dps::ROOT_X86_64, + Self::Aarch64 => dps::ROOT_ARM64, + Self::S390x => dps::ROOT_S390X, + Self::Powerpc64 => dps::ROOT_PPC64, + Self::Powerpc64le => dps::ROOT_PPC64_LE, + Self::Riscv64 => dps::ROOT_RISCV64, + Self::Arm => dps::ROOT_ARM, + } + } + + /// Whether this architecture boots through an EFI system partition. + pub(crate) const fn uses_efi(self) -> bool { + matches!(self, Self::X86_64 | Self::Aarch64) + } + + /// The firmware boot partition this architecture needs ahead of the ESP, + /// if any. Errors for an architecture whose disk layout bootc does not + /// know. + pub(crate) fn firmware_boot_partition(self) -> Result> { + match self { + Self::X86_64 => Ok(Some(FirmwareBootPartition::BiosBoot)), + Self::Powerpc64 | Self::Powerpc64le => Ok(Some(FirmwareBootPartition::PrepBoot)), + Self::Aarch64 | Self::S390x => Ok(None), + Self::Riscv64 | Self::Arm => anyhow::bail!("Unsupported architecture: {self}"), + } + } + + /// The OCI platform whose image this install reads. + pub(crate) fn oci_platform(self) -> Result { + let arch = match self { + Self::X86_64 => Arch::Amd64, + Self::Aarch64 => Arch::ARM64, + Self::S390x => Arch::s390x, + Self::Powerpc64 => Arch::PowerPC64, + Self::Powerpc64le => Arch::PowerPC64le, + Self::Riscv64 => Arch::RISCV64, + Self::Arm => Arch::ARM, + }; + Ok(PlatformBuilder::default() + .architecture(arch) + .os(Os::Linux) + .build()?) + } +} + +impl fmt::Display for TargetArch { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.to_possible_value().unwrap().get_name().fmt(f) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn host_matches_build_target() { + assert_eq!( + TargetArch::host().root_partition_type(), + bootc_blockdev::dps::this_arch_root() + ); + assert!(TargetArch::host().is_host()); + } + + #[test] + fn cross_layouts() { + assert_eq!( + TargetArch::Aarch64.root_partition_type(), + bootc_blockdev::dps::ROOT_ARM64 + ); + assert_eq!(TargetArch::Aarch64.firmware_boot_partition().unwrap(), None); + assert_eq!( + TargetArch::X86_64.firmware_boot_partition().unwrap(), + Some(FirmwareBootPartition::BiosBoot) + ); + assert!(TargetArch::Aarch64.uses_efi()); + assert!(!TargetArch::S390x.uses_efi()); + assert_eq!( + TargetArch::Aarch64.oci_platform().unwrap().architecture(), + &Arch::ARM64 + ); + } +} diff --git a/docs/src/man/bootc-install-to-disk.8.md b/docs/src/man/bootc-install-to-disk.8.md index 0d59dc4244..8e93b69f9f 100644 --- a/docs/src/man/bootc-install-to-disk.8.md +++ b/docs/src/man/bootc-install-to-disk.8.md @@ -181,6 +181,19 @@ set `discoverable-partitions = true` in their install configuration - ukiboot - none +**--target-arch**=*TARGET_ARCH* + + The architecture of the image being installed. Defaults to the architecture bootc runs on. Installing for another architecture is supported for `install to-disk` with the composefs backend and systemd-boot, and needs a systemd whose `bootctl install` supports `--install-source` + + Possible values: + - x86_64 + - aarch64 + - s390x + - powerpc64 + - powerpc64le + - riscv64 + - arm + **--via-loopback** Instead of targeting a block device, write to a file via loopback diff --git a/docs/src/man/bootc-install-to-existing-root.8.md b/docs/src/man/bootc-install-to-existing-root.8.md index ff70594221..c816c43155 100644 --- a/docs/src/man/bootc-install-to-existing-root.8.md +++ b/docs/src/man/bootc-install-to-existing-root.8.md @@ -208,6 +208,19 @@ of migrating the fstab entries. See the "Injecting kernel arguments" section abo - ukiboot - none +**--target-arch**=*TARGET_ARCH* + + The architecture of the image being installed. Defaults to the architecture bootc runs on. Installing for another architecture is supported for `install to-disk` with the composefs backend and systemd-boot, and needs a systemd whose `bootctl install` supports `--install-source` + + Possible values: + - x86_64 + - aarch64 + - s390x + - powerpc64 + - powerpc64le + - riscv64 + - arm + **--acknowledge-destructive** Accept that this is a destructive action and skip a warning timer diff --git a/docs/src/man/bootc-install-to-filesystem.8.md b/docs/src/man/bootc-install-to-filesystem.8.md index e476808a17..41f98726a4 100644 --- a/docs/src/man/bootc-install-to-filesystem.8.md +++ b/docs/src/man/bootc-install-to-filesystem.8.md @@ -125,6 +125,19 @@ is currently expected to be empty by default. - ukiboot - none +**--target-arch**=*TARGET_ARCH* + + The architecture of the image being installed. Defaults to the architecture bootc runs on. Installing for another architecture is supported for `install to-disk` with the composefs backend and systemd-boot, and needs a systemd whose `bootctl install` supports `--install-source` + + Possible values: + - x86_64 + - aarch64 + - s390x + - powerpc64 + - powerpc64le + - riscv64 + - arm + **--composefs-backend** Use the composefs backend instead of ostree. This is the default for images with a UKI, and for images with /usr/lib/composefs/setup-root-conf.toml and no ostree prepare-root.conf