summaryrefslogtreecommitdiffstats
path: root/partitions.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-06-09 20:25:49 +0000
committerJeremy Katz <katzj@redhat.com>2006-06-09 20:25:49 +0000
commite16aec2d0892f391da7cfb8d2474602b5e924698 (patch)
tree4d2ada37c0599e306ef8f607cfff564364b3d61b /partitions.py
parente22389a8eb7fbfbe81bac961bc86775ff7347205 (diff)
downloadanaconda-e16aec2d0892f391da7cfb8d2474602b5e924698.tar.gz
anaconda-e16aec2d0892f391da7cfb8d2474602b5e924698.tar.xz
anaconda-e16aec2d0892f391da7cfb8d2474602b5e924698.zip
2006-06-09 Jeremy Katz <katzj@redhat.com>
* 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.
Diffstat (limited to 'partitions.py')
-rw-r--r--partitions.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/partitions.py b/partitions.py
index 00d4631a7..618fe52ac 100644
--- a/partitions.py
+++ b/partitions.py
@@ -6,7 +6,7 @@
# Mike Fulbright <msf@redhat.com>
# Harald Hoyer <harald@redhat.de>
#
-# 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: