Ack. On 08/10/2011 07:12 PM, Brian C. Lane wrote:
From: "Brian C. Lane"<bcl@xxxxxxxxxx> Set the size of new /boot/efi partition requests to the minimum size instead of a size that is too small. Use the drivelist to set the device to use for pre-existing /boot/efi partitions. Only one /boot/efi is needed on the boot device, set it when skipping unneeded ones. Resolves: rhbz#723976 NOTE: Tested on EFI with USB source, DVD source, extra USB vfat and KVM x86_64. --- platform.py | 21 ++++++++++++--------- storage/devicetree.py | 1 - storage/partitioning.py | 1 + 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/platform.py b/platform.py index bdb2357..22dbb03 100644 --- a/platform.py +++ b/platform.py @@ -207,15 +207,18 @@ class EFI(Platform): _minBootPartSize = 50 def bootDevice(self): - bootDev = None - + """ + Return the boot device. The bootloader.drivelist is used to + set the precedence in cases where multiple partitions are + available from multiple devices. + """ + drive = self.anaconda.id.bootloader.drivelist[0] for part in self.anaconda.id.storage.partitions: - if part.format.type == "efi" and self.validBootPartSize(part.size): - bootDev = part - # if we're only picking one, it might as well be the first - break - - return bootDev + if part.disk and part.disk.name == drive \ + and part.format.type == "efi" \ + and self.validBootPartSize(part.size): + return part + return None def bootloaderChoices(self, bl): bootDev = self.bootDevice() @@ -271,7 +274,7 @@ class EFI(Platform): def setDefaultPartitioning(self): ret = Platform.setDefaultPartitioning(self) - ret.append(PartSpec(mountpoint="/boot/efi", fstype="efi", size=20, + ret.append(PartSpec(mountpoint="/boot/efi", fstype="efi", size=self._minBootPartSize, maxSize=200, grow=True, weight=self.weight(fstype="efi"))) return ret diff --git a/storage/devicetree.py b/storage/devicetree.py index e9ff36a..723cab5 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -1857,7 +1857,6 @@ class DeviceTree(object): efi = formats.getFormat("efi") if efi.minSize<= device.size<= efi.maxSize: args[0] = "efi" - kwargs['mountpoint'] = "/boot/efi" elif format_type == "hfs": # apple bootstrap magic if isinstance(device, PartitionDevice) and device.bootable: diff --git a/storage/partitioning.py b/storage/partitioning.py index d9a9dc9..dc06920 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -113,6 +113,7 @@ def _schedulePartitions(anaconda, disks): anaconda.id.bootloader.drivelist[0] == bootdev.disk.name): log.info("partitioning: skipping a EFI System " "Partition request on %s" % bootdev.disk.name) + bootdev.format.mountpoint = "/boot/efi" continue log.debug("partitioning: allowing a EFI System Partition request")
-- David Cantrell <dcantrell@xxxxxxxxxx> Supervisor, Installer Engineering Team Red Hat, Inc. | Westford, MA | EST5EDT _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list