Skip to content

Commit ee11428

Browse files
authored
Merge pull request #745 from cgwalters/ppc64le-handle-mbr
install/ppc64le: Also handle MBR partitions
2 parents 0610971 + b3aa898 commit ee11428

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/src/bootloader.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ use crate::task::Task;
99
pub(crate) const EFI_DIR: &str = "efi";
1010
pub(crate) const PREPBOOT_GUID: &str = "9E1A2D38-C612-4316-AA26-8B49521E5A8B";
1111
pub(crate) const PREPBOOT_LABEL: &str = "PowerPC-PReP-boot";
12+
#[cfg(target_arch = "powerpc64")]
13+
/// We make a best-effort to support MBR partitioning too.
14+
pub(crate) const PREPBOOT_MBR_TYPE: &str = "41";
1215

1316
/// Find the device to pass to bootupd. Only on powerpc64 right now
1417
/// we explicitly find one with a specific label.
@@ -20,7 +23,7 @@ fn get_bootupd_device(device: &PartitionTable) -> Result<Utf8PathBuf> {
2023
return device
2124
.partitions
2225
.iter()
23-
.find(|p| p.parttype.as_str() == PREPBOOT_GUID)
26+
.find(|p| matches!(p.parttype.as_str(), PREPBOOT_GUID | PREPBOOT_MBR_TYPE))
2427
.ok_or_else(|| {
2528
anyhow::anyhow!("Failed to find PReP partition with GUID {PREPBOOT_GUID}")
2629
})

0 commit comments

Comments
 (0)