Skip to content

Commit

Permalink
Fix check for biosboot partition in GRUB2.check
Browse files Browse the repository at this point in the history
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.

Resolves: RHEL-56591
  • Loading branch information
vojtechtrefny committed Sep 26, 2024
1 parent 5e48f0d commit bcfe4f1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pyanaconda/modules/storage/bootloader/grub2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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") \
Expand Down

0 comments on commit bcfe4f1

Please sign in to comment.