MD array members can only be partitions and arrays must use v1.0 or older metadata. --- pyanaconda/bootloader.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index eae37a3..d62fb91 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1011,6 +1011,8 @@ class GRUB(BootLoader): # list of strings representing options for boot device types stage2_device_types = ["partition", "mdarray"] stage2_raid_levels = [mdraid.RAID1] + stage2_raid_member_types = ["partition"] + stage2_raid_metadata = ["0", "0.90", "1.0"]
packages = ["grub"]
On 08/25/2011 03:35 PM, David Lehman wrote:
MD array members can only be partitions and arrays must use v1.0 or older metadata.
pyanaconda/bootloader.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index eae37a3..d62fb91 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1011,6 +1011,8 @@ class GRUB(BootLoader): # list of strings representing options for boot device types stage2_device_types = ["partition", "mdarray"] stage2_raid_levels = [mdraid.RAID1]
stage2_raid_member_types = ["partition"]
stage2_raid_metadata = ["0", "0.90", "1.0"]
packages = ["grub"]
What happens if you do not intend to have stage2 on an array with newer metadata type? If such an array is present, will this fail a la bz 734978?
TIA
On 09/01/2011 12:10 AM, Clyde E. Kunkel wrote:
On 08/25/2011 03:35 PM, David Lehman wrote:
MD array members can only be partitions and arrays must use v1.0 or older metadata.
pyanaconda/bootloader.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index eae37a3..d62fb91 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1011,6 +1011,8 @@ class GRUB(BootLoader): # list of strings representing options for boot device types stage2_device_types = ["partition", "mdarray"] stage2_raid_levels = [mdraid.RAID1]
- stage2_raid_member_types = ["partition"]
- stage2_raid_metadata = ["0", "0.90", "1.0"]
packages = ["grub"]
What happens if you do not intend to have stage2 on an array with newer metadata type? If such an array is present, will this fail a la bz 734978?
TIA
Partial answer to my own question-- I deleted the array that had metadata type 1.1 and the same error ('MDRaidArrayDevice' object has no attribute 'metadataVersion') occurred. mdadm --examine of the former members showed no raid superblocks.
It is the year 2011. --- pyanaconda/bootloader.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index d62fb91..e8c9ff1 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1653,7 +1653,7 @@ class GRUB2(GRUB): def install(self, install_root=""): # XXX will installing to multiple drives work as expected with GRUBv2? for (stage1dev, stage2dev) in self.install_targets: - args = [self.grub_device_name(stage1dev)] + args = ["--no-floppy", self.grub_device_name(stage1dev)] if stage1dev == stage2dev: # This is hopefully a temporary hack. GRUB2 currently refuses # to install to a partition's boot block without --force.
Changes the warning to an error and also fixes two other bugs.
First, it fixes an unbound recursion issue introduced by commit e8ae9031f203b15. The check for stage2 device being the stage1 device doesn't make sense in _gpt_disk_has_bios_boot. If the stage1 device is not a disk that method will not require a bios boot partition anyway.
Second, the bios boot check was being run regardless of whether the platform requires it. Checking the weight is the only method I know of to determine this.
It also simplifies the error message so fewer people get confused by all the acronyms. --- pyanaconda/bootloader.py | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index e8c9ff1..9a3e6ff 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -1474,9 +1474,8 @@ class GRUB2(GRUB): if device is None: return ret
- if self.stage1_device == self.stage2_device: - # if we're booting from the stage2 device there's probably no - # need for a BIOS boot partition + if not self.platform.weight(fstype="biosboot"): + # this platform does not need bios boot return ret
# check that a bios boot partition is present if the stage1 device @@ -1491,10 +1490,8 @@ class GRUB2(GRUB): break
if not ret: - self.warnings.append(_("You are using a GPT bootdisk on a BIOS " - "system without a BIOS boot partition. This " - "may not work, depending on your BIOS's " - "support for booting from GPT disks.")) + self.errors.append(_("You are using a GPT bootdisk on a BIOS " + "system without a BIOS boot partition."))
log.debug("_gpt_disk_has_bios_boot(%s) returning %s" % (device.name, ret)) @@ -1502,8 +1499,7 @@ class GRUB2(GRUB):
def is_valid_stage1_device(self, device): ret = super(GRUB2, self).is_valid_stage1_device(device) - if ret: - ignored = self._gpt_disk_has_bios_boot(device) + ret = ret and self._gpt_disk_has_bios_boot(device)
log.debug("is_valid_stage1_device(%s) returning %s" % (device.name, ret))
anaconda-devel@lists.stg.fedoraproject.org