From 71f2a64aecdae832be359724ee597046c38616ad Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Thu, 12 Sep 2024 15:46:49 +0200 Subject: [PATCH] Fix check for biosboot partition in GRUB2.check For partitions scheduled to be created the PARTITION_BIOS_GRUB flag is not yet set so we can't use it to check for the biosboot partition presence. --- pyanaconda/modules/storage/bootloader/grub2.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyanaconda/modules/storage/bootloader/grub2.py b/pyanaconda/modules/storage/bootloader/grub2.py index 6adde7f364e..6d986094583 100644 --- a/pyanaconda/modules/storage/bootloader/grub2.py +++ b/pyanaconda/modules/storage/bootloader/grub2.py @@ -480,13 +480,12 @@ def check(self): # If the first partition starts too low and there is no biosboot partition show an error. error_msg = None biosboot = False - parts = self.stage1_disk.format.parted_disk.partitions - for p in parts: - if p.getFlag(PARTITION_BIOS_GRUB): + for p in self.stage1_disk.children: + if p.format.type == "biosboot" or p.parted_partition.getFlag(PARTITION_BIOS_GRUB): biosboot = True break - start = p.geometry.start * p.disk.device.sectorSize + start = p.parted_partition.geometry.start * p.parted_partition.disk.device.sectorSize if start < min_start: error_msg = _("%(deviceName)s may not have enough space for grub2 to embed " "core.img when using the %(fsType)s file system on %(deviceType)s") \