They might as well go on master now, since the inhibiting factor was that GRUB2 was not available with RHEL 6, but it's certainly available w/ current Fedora.
There is an accompanying blivet patch.
mulhern (1): Patches to allow /boot to be RAID1 with EFI (#791136)
pyanaconda/bootloader.py | 20 ++++++++++---------- pyanaconda/storage_utils.py | 2 +- pyanaconda/ui/gui/spokes/custom.py | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-)
Resolves: rhbz#791136
Signed-off-by: mulhern amulhern@redhat.com --- pyanaconda/bootloader.py | 20 ++++++++++---------- pyanaconda/storage_utils.py | 2 +- pyanaconda/ui/gui/spokes/custom.py | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index c0e34da..41a906f 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1713,16 +1713,9 @@ class EFIGRUB(GRUB2): ret = self._config_dir.replace('efi/', '') return "\" + ret.replace('/', '\')
- def add_efi_boot_target(self): - if self.stage1_device.type == "partition": - boot_disk = self.stage1_device.disk - boot_part_num = self.stage1_device.partedPartition.number - elif self.stage1_device.type == "mdarray": - # FIXME: I'm just guessing here. This probably needs the full - # treatment, ie: multiple targets for each member. - boot_disk = self.stage1_device.parents[0].disk - boot_part_num = self.stage1_device.parents[0].partedPartition.number - boot_part_num = str(boot_part_num) + def _add_single_efi_boot_target(self, disk): + boot_disk = disk.disk + boot_part_num = disk.partedPartition.number
rc = self.efibootmgr("-c", "-w", "-L", productName, "-d", boot_disk.path, "-p", boot_part_num, @@ -1732,6 +1725,13 @@ class EFIGRUB(GRUB2): if rc: raise BootLoaderError("failed to set new efi boot target. This is most likely a kernel bug.")
+ def add_efi_boot_target(self): + if self.stage1_device.type == "partition": + self._add_single_efi_boot_target(self.stage1_device) + elif self.stage1_device.type == "mdarray": + for parent in self.stage1_device.parents: + self._add_single_efi_boot_target(parent) + def install(self, args=None): if not flags.leavebootorder: self.remove_efi_boot_target() diff --git a/pyanaconda/storage_utils.py b/pyanaconda/storage_utils.py index fb66e8f..e6e3f70 100644 --- a/pyanaconda/storage_utils.py +++ b/pyanaconda/storage_utils.py @@ -55,7 +55,7 @@ DEVICE_TEXT_MAP = {DEVICE_TYPE_LVM: DEVICE_TEXT_LVM, DEVICE_TYPE_LVM_THINP: DEVICE_TEXT_LVM_THINP, DEVICE_TYPE_DISK: DEVICE_TEXT_DISK}
-PARTITION_ONLY_FORMAT_TYPES = ("efi", "macefi", "prepboot", "biosboot", "appleboot") +PARTITION_ONLY_FORMAT_TYPES = ("macefi", "prepboot", "biosboot", "appleboot")
MOUNTPOINT_DESCRIPTIONS = {"Swap": N_("The 'swap' area on your computer is used by the operating\n" "system when running low on memory."), diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 18c1759..83c7f1a 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -63,7 +63,7 @@ from blivet.devicelibs import raid from blivet.devices import LUKSDevice
from pyanaconda.storage_utils import ui_storage_logger, device_type_from_autopart -from pyanaconda.storage_utils import DEVICE_TEXT_PARTITION, DEVICE_TEXT_MAP +from pyanaconda.storage_utils import DEVICE_TEXT_PARTITION, DEVICE_TEXT_MAP, DEVICE_TEXT_MD from pyanaconda.storage_utils import PARTITION_ONLY_FORMAT_TYPES, MOUNTPOINT_DESCRIPTIONS from pyanaconda.storage_utils import NAMED_DEVICE_TYPES, CONTAINER_DEVICE_TYPES
@@ -617,9 +617,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): :param raid_level: instance of blivet.devicelibs.raid.RAIDLevel or None """ error = None - if device_type != DEVICE_TYPE_PARTITION and mountpoint == "/boot/efi": - error = (_("/boot/efi must be on a device of type %s") - % _(DEVICE_TEXT_PARTITION)) + if device_type not in (DEVICE_TYPE_PARTITION, DEVICE_TYPE_MD) and \ + mountpoint == "/boot/efi": + error = (_("/boot/efi must be on a device of type %s or %s") + % (_(DEVICE_TEXT_PARTITION), _(DEVICE_TEXT_MD))) elif device_type != DEVICE_TYPE_PARTITION and \ new_fs_type in PARTITION_ONLY_FORMAT_TYPES: error = (_("%(fs)s must be on a device of type %(type)s")
On 06/24/2014 02:49 PM, mulhern wrote:
Resolves: rhbz#791136
Signed-off-by: mulhern amulhern@redhat.com
pyanaconda/bootloader.py | 20 ++++++++++---------- pyanaconda/storage_utils.py | 2 +- pyanaconda/ui/gui/spokes/custom.py | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index c0e34da..41a906f 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1713,16 +1713,9 @@ class EFIGRUB(GRUB2): ret = self._config_dir.replace('efi/', '') return "\" + ret.replace('/', '\')
- def add_efi_boot_target(self):
if self.stage1_device.type == "partition":
boot_disk = self.stage1_device.disk
boot_part_num = self.stage1_device.partedPartition.number
elif self.stage1_device.type == "mdarray":
# FIXME: I'm just guessing here. This probably needs the full
# treatment, ie: multiple targets for each member.
boot_disk = self.stage1_device.parents[0].disk
boot_part_num = self.stage1_device.parents[0].partedPartition.number
boot_part_num = str(boot_part_num)
- def _add_single_efi_boot_target(self, disk):
boot_disk = disk.disk
boot_part_num = disk.partedPartition.number
Calling the partition "disk" is pretty confusing. It would be much clearer if it were named "partition" instead. Otherwise this and the blivet set look good to me.
David
rc = self.efibootmgr("-c", "-w", "-L", productName, "-d", boot_disk.path, "-p", boot_part_num,
@@ -1732,6 +1725,13 @@ class EFIGRUB(GRUB2): if rc: raise BootLoaderError("failed to set new efi boot target. This is most likely a kernel bug.")
- def add_efi_boot_target(self):
if self.stage1_device.type == "partition":
self._add_single_efi_boot_target(self.stage1_device)
elif self.stage1_device.type == "mdarray":
for parent in self.stage1_device.parents:
self._add_single_efi_boot_target(parent)
def install(self, args=None): if not flags.leavebootorder: self.remove_efi_boot_target()
diff --git a/pyanaconda/storage_utils.py b/pyanaconda/storage_utils.py index fb66e8f..e6e3f70 100644 --- a/pyanaconda/storage_utils.py +++ b/pyanaconda/storage_utils.py @@ -55,7 +55,7 @@ DEVICE_TEXT_MAP = {DEVICE_TYPE_LVM: DEVICE_TEXT_LVM, DEVICE_TYPE_LVM_THINP: DEVICE_TEXT_LVM_THINP, DEVICE_TYPE_DISK: DEVICE_TEXT_DISK}
-PARTITION_ONLY_FORMAT_TYPES = ("efi", "macefi", "prepboot", "biosboot", "appleboot") +PARTITION_ONLY_FORMAT_TYPES = ("macefi", "prepboot", "biosboot", "appleboot")
MOUNTPOINT_DESCRIPTIONS = {"Swap": N_("The 'swap' area on your computer is used by the operating\n" "system when running low on memory."), diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 18c1759..83c7f1a 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -63,7 +63,7 @@ from blivet.devicelibs import raid from blivet.devices import LUKSDevice
from pyanaconda.storage_utils import ui_storage_logger, device_type_from_autopart -from pyanaconda.storage_utils import DEVICE_TEXT_PARTITION, DEVICE_TEXT_MAP +from pyanaconda.storage_utils import DEVICE_TEXT_PARTITION, DEVICE_TEXT_MAP, DEVICE_TEXT_MD from pyanaconda.storage_utils import PARTITION_ONLY_FORMAT_TYPES, MOUNTPOINT_DESCRIPTIONS from pyanaconda.storage_utils import NAMED_DEVICE_TYPES, CONTAINER_DEVICE_TYPES
@@ -617,9 +617,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): :param raid_level: instance of blivet.devicelibs.raid.RAIDLevel or None """ error = None
if device_type != DEVICE_TYPE_PARTITION and mountpoint == "/boot/efi":
error = (_("/boot/efi must be on a device of type %s")
% _(DEVICE_TEXT_PARTITION))
if device_type not in (DEVICE_TYPE_PARTITION, DEVICE_TYPE_MD) and \
mountpoint == "/boot/efi":
error = (_("/boot/efi must be on a device of type %s or %s")
% (_(DEVICE_TEXT_PARTITION), _(DEVICE_TEXT_MD))) elif device_type != DEVICE_TYPE_PARTITION and \ new_fs_type in PARTITION_ONLY_FORMAT_TYPES: error = (_("%(fs)s must be on a device of type %(type)s")
----- Original Message -----
From: "David Lehman" dlehman@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Wednesday, June 25, 2014 9:31:25 AM Subject: Re: [anaconda:master] Patches to allow /boot to be RAID1 with EFI (#791136)
On 06/24/2014 02:49 PM, mulhern wrote:
Resolves: rhbz#791136
Signed-off-by: mulhern amulhern@redhat.com
pyanaconda/bootloader.py | 20 ++++++++++---------- pyanaconda/storage_utils.py | 2 +- pyanaconda/ui/gui/spokes/custom.py | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index c0e34da..41a906f 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1713,16 +1713,9 @@ class EFIGRUB(GRUB2): ret = self._config_dir.replace('efi/', '') return "\" + ret.replace('/', '\')
- def add_efi_boot_target(self):
if self.stage1_device.type == "partition":
boot_disk = self.stage1_device.disk
boot_part_num = self.stage1_device.partedPartition.number
elif self.stage1_device.type == "mdarray":
# FIXME: I'm just guessing here. This probably needs the full
# treatment, ie: multiple targets for each member.
boot_disk = self.stage1_device.parents[0].disk
boot_part_num =
self.stage1_device.parents[0].partedPartition.number
boot_part_num = str(boot_part_num)
- def _add_single_efi_boot_target(self, disk):
boot_disk = disk.disk
boot_part_num = disk.partedPartition.number
Calling the partition "disk" is pretty confusing. It would be much clearer if it were named "partition" instead. Otherwise this and the blivet set look good to me.
David
Fixed. Also fixed the bug number which was 788313 not 791136.
- mulhern
On 06/25/2014 08:31 AM, David Lehman wrote:
On 06/24/2014 02:49 PM, mulhern wrote:
Resolves: rhbz#791136
Signed-off-by: mulhern amulhern@redhat.com
pyanaconda/bootloader.py | 20 ++++++++++---------- pyanaconda/storage_utils.py | 2 +- pyanaconda/ui/gui/spokes/custom.py | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-)
What this enables is RAID1 /boot/efi -- not /boot. It would be good to change the commit message accordingly.
David
----- Original Message -----
From: "David Lehman" dlehman@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Wednesday, June 25, 2014 8:08:58 PM Subject: Re: [anaconda:master] Patches to allow /boot to be RAID1 with EFI (#791136)
On 06/25/2014 08:31 AM, David Lehman wrote:
On 06/24/2014 02:49 PM, mulhern wrote:
Resolves: rhbz#791136
Signed-off-by: mulhern amulhern@redhat.com
pyanaconda/bootloader.py | 20 ++++++++++---------- pyanaconda/storage_utils.py | 2 +- pyanaconda/ui/gui/spokes/custom.py | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-)
What this enables is RAID1 /boot/efi -- not /boot. It would be good to change the commit message accordingly.
David _______________________________________________ anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Done.
- mulhern
On Tue, Jun 24, 2014 at 03:49:53PM -0400, mulhern wrote:
Resolves: rhbz#791136
Signed-off-by: mulhern amulhern@redhat.com
pyanaconda/bootloader.py | 20 ++++++++++---------- pyanaconda/storage_utils.py | 2 +- pyanaconda/ui/gui/spokes/custom.py | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index c0e34da..41a906f 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1713,16 +1713,9 @@ class EFIGRUB(GRUB2): ret = self._config_dir.replace('efi/', '') return "\" + ret.replace('/', '\')
- def add_efi_boot_target(self):
if self.stage1_device.type == "partition":
boot_disk = self.stage1_device.disk
boot_part_num = self.stage1_device.partedPartition.number
elif self.stage1_device.type == "mdarray":
# FIXME: I'm just guessing here. This probably needs the full
# treatment, ie: multiple targets for each member.
boot_disk = self.stage1_device.parents[0].disk
boot_part_num = self.stage1_device.parents[0].partedPartition.number
boot_part_num = str(boot_part_num)
- def _add_single_efi_boot_target(self, disk):
boot_disk = disk.disk
boot_part_num = disk.partedPartition.number
This needs to be:
boot_part_num = str(disk.partedPartition.number)
With that change it works fine when tested on my UEFI box.
----- Original Message -----
From: "Brian C. Lane" bcl@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Wednesday, June 25, 2014 6:48:55 PM Subject: Re: [anaconda:master] Patches to allow /boot to be RAID1 with EFI (#791136)
On Tue, Jun 24, 2014 at 03:49:53PM -0400, mulhern wrote:
Resolves: rhbz#791136
Signed-off-by: mulhern amulhern@redhat.com
pyanaconda/bootloader.py | 20 ++++++++++---------- pyanaconda/storage_utils.py | 2 +- pyanaconda/ui/gui/spokes/custom.py | 9 +++++---- 3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index c0e34da..41a906f 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1713,16 +1713,9 @@ class EFIGRUB(GRUB2): ret = self._config_dir.replace('efi/', '') return "\" + ret.replace('/', '\')
- def add_efi_boot_target(self):
if self.stage1_device.type == "partition":
boot_disk = self.stage1_device.disk
boot_part_num = self.stage1_device.partedPartition.number
elif self.stage1_device.type == "mdarray":
# FIXME: I'm just guessing here. This probably needs the full
# treatment, ie: multiple targets for each member.
boot_disk = self.stage1_device.parents[0].disk
boot_part_num =
self.stage1_device.parents[0].partedPartition.number
boot_part_num = str(boot_part_num)
- def _add_single_efi_boot_target(self, disk):
boot_disk = disk.disk
boot_part_num = disk.partedPartition.number
This needs to be:
boot_part_num = str(disk.partedPartition.number)
With that change it works fine when tested on my UEFI box.
-- Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT) _______________________________________________ anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Thanks! Fixed in working copy.
- mulhern
anaconda-patches@lists.fedorahosted.org