From 66c8fcf008c0d80edf9c67fce34f17d27202ed2c Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 14 Mar 2008 16:04:34 -0400 Subject: Add EFI handling to the bootloader setup choices. --- bootloader.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'bootloader.py') diff --git a/bootloader.py b/bootloader.py index f3e3baf68..5d603fccd 100644 --- a/bootloader.py +++ b/bootloader.py @@ -63,6 +63,26 @@ def bootloaderSetupChoices(anaconda): pref = anaconda.id.bootloader.drivelist[:1] anaconda.id.bootloader.updateDriveList(pref) + if iutil.isEfi() and not anaconda.id.bootloader.device: + drives = anaconda.id.diskset.disks.keys() + drives.sort() + bootPart = None + for drive in drives: + disk = anaconda.id.diskset.disks[drive] + part = disk.next_partition() + while part: + if part.is_active() and partedUtils.isEfiSystemPartition(part): + bootPart = partedUtils.get_partition_name(part) + break + part = disk.next_partition(part) + if bootPart: + break + if bootPart: + anaconda.id.bootloader.setDevice(bootPart) + dev = Device() + dev.device = bootPart + anaconda.id.fsset.add(FileSystemSetEntry(dev, None, fileSystemTypeGet("efi"))) + # iSeries bootloader on upgrades if iutil.getPPCMachine() == "iSeries" and not anaconda.id.bootloader.device: drives = anaconda.id.diskset.disks.keys() -- cgit