From e16aec2d0892f391da7cfb8d2474602b5e924698 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Fri, 9 Jun 2006 20:25:49 +0000 Subject: 2006-06-09 Jeremy Katz * partitions.py (Partitions.sanityCheckAllRequests): Sanity check to ensure /boot on the mactels is on one of the first 4 parts * partedUtils.py (DiskSet.savePartitions): Use gptsync to sync gpt->mbr on mactels (archLabels): Allow gpt on i386, x86_64 * bootloader.py (bootloaderSetupChoices): mactels need their bootloader on the partition. --- partitions.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'partitions.py') diff --git a/partitions.py b/partitions.py index 00d4631a7..618fe52ac 100644 --- a/partitions.py +++ b/partitions.py @@ -6,7 +6,7 @@ # Mike Fulbright # Harald Hoyer # -# Copyright 2002-2005 Red Hat, Inc. +# Copyright 2002-2006 Red Hat, Inc. # # This software may be freely redistributed under the terms of the GNU # library public license. @@ -810,6 +810,25 @@ class Partitions: "megabytes which is usually too small to " "install %s.") % (productName,)) + if rhpl.getArch() in ("i386", "x86_64") and iutil.isMactel(): + # mactel checks. + bootreqs = self.getBootableRequest() or [] + # FIXME: missing a check to ensure this is gpt. + for br in bootreqs: + dev = br.device + # simplified getDiskPart() for sata only + if dev[-2] in string.digits: + num = dev[-2:] + elif dev[-1] in string.digits: + num = dev[-1] + else: + continue # we should never get here, but you never know... + if int(num) > 4: + print dev, num + errors.append(_("Your boot partition isn't on one of " + "the first four partitions and thus " + "won't be bootable.")) + if rhpl.getArch() == "ia64": bootreq = self.getRequestByMountPoint("/boot/efi") if not bootreq or bootreq.getActualSize(self, diskset) < 50: -- cgit