diff --git a/platform.py b/platform.py index 2291150..802d37d 100644 --- a/platform.py +++ b/platform.py @@ -596,6 +596,19 @@ class X86(EFI): else: return Platform.setDefaultPartitioning(self) + def bestDiskLabelType(self, device): + if self.isEfi: + return "gpt" + + labeltype = self.diskLabelTypes[0] + for lt in self.diskLabelTypes: + if l = parted.freshDisk(device=device.partedDevice, ty=lt) + if l.maxPartitionStartSector < device.partedDevice.length: + labelType = lt + break + + return labelType + def getPlatform(anaconda): """Check the architecture of the system and return an instance of a Platform subclass to match. If the architecture could not be determined,