diff --git a/lib/src/bootloader.rs b/lib/src/bootloader.rs index d73577f59..e90b365ef 100644 --- a/lib/src/bootloader.rs +++ b/lib/src/bootloader.rs @@ -9,6 +9,9 @@ use crate::task::Task; pub(crate) const EFI_DIR: &str = "efi"; pub(crate) const PREPBOOT_GUID: &str = "9E1A2D38-C612-4316-AA26-8B49521E5A8B"; pub(crate) const PREPBOOT_LABEL: &str = "PowerPC-PReP-boot"; +#[cfg(target_arch = "powerpc64")] +/// We make a best-effort to support MBR partitioning too. +pub(crate) const PREPBOOT_MBR_TYPE: &str = "41"; /// Find the device to pass to bootupd. Only on powerpc64 right now /// we explicitly find one with a specific label. @@ -20,7 +23,7 @@ fn get_bootupd_device(device: &PartitionTable) -> Result { return device .partitions .iter() - .find(|p| p.parttype.as_str() == PREPBOOT_GUID) + .find(|p| matches!(p.parttype.as_str(), PREPBOOT_GUID | PREPBOOT_MBR_TYPE)) .ok_or_else(|| { anyhow::anyhow!("Failed to find PReP partition with GUID {PREPBOOT_GUID}") })