FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 08-10-2011, 11:12 PM
"Brian C. Lane"
 
Default Reuse existing /boot/efi and ignore vfat on non-boot devices (#723976)

From: "Brian C. Lane" <bcl@redhat.com>

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")

--
1.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 08-11-2011, 01:54 PM
David Cantrell
 
Default Reuse existing /boot/efi and ignore vfat on non-boot devices (#723976)

Ack.

On 08/10/2011 07:12 PM, Brian C. Lane wrote:

From: "Brian C. Lane"<bcl@redhat.com>

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@redhat.com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Westford, MA | EST5EDT

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org