summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2007-07-26 14:15:42 +0000
committerPeter Jones <pjones@redhat.com>2007-07-26 14:15:42 +0000
commit2b53dbb0a2e284f54f616f48e439cc060e7a3f46 (patch)
treed33891311055a7ff4b0d08661f037e49bbff3463 /fsset.py
parentb5b0e34ce8a389eb3c897dd9b0cdeacc044b63b8 (diff)
downloadanaconda-2b53dbb0a2e284f54f616f48e439cc060e7a3f46.tar.gz
anaconda-2b53dbb0a2e284f54f616f48e439cc060e7a3f46.tar.xz
anaconda-2b53dbb0a2e284f54f616f48e439cc060e7a3f46.zip
- Enable booting from GPT on non-EFI systems.
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/fsset.py b/fsset.py
index 7b120ace8..8bd750da4 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1392,22 +1392,26 @@ MAILADDR root
bootDev = dev.device
+ part = partedUtils.get_partition_by_name(diskset.disks, bootDev)
+ drive = partedUtils.get_partition_drive(part)
+
# on ia64, *only* /boot/efi should be marked bootable
# similarly, on pseries, we really only want the PReP partition active
if rhpl.getArch() == "ia64" \
- or (rhpl.getArch() in ("i386", "x86_64") and iutil.isEfi()) \
- or iutil.getPPCMachine() in ("pSeries", "iSeries", "PMac"):
- part = partedUtils.get_partition_by_name(diskset.disks, bootDev)
+ or iutil.getPPCMachine() in ("pSeries", "iSeries", "PMac") \
+ or (rhpl.getArch() in ("i386", "x86_64") \
+ and (iutil.isEfi() \
+ or partedUtils.hasGptLabel(diskset, drive))):
if part and part.is_flag_available(parted.PARTITION_BOOT):
part.set_flag(parted.PARTITION_BOOT, 1)
return
-
+
for drive in diskset.disks.keys():
foundActive = 0
bootPart = None
- disk = diskset.disks[drive]
- if disk.dev.disk_probe().name == "gpt":
+ if partedUtils.hasGptLabel(diskset, drive):
continue
+ disk = diskset.disks[drive]
part = disk.next_partition()
while part:
if not part.is_active():