Skip to content

Commit

Permalink
Explicitly place biosboot partition only on stage1 disk
Browse files Browse the repository at this point in the history
When multiple disks are specified for "new_partition" blivet can
choose a wrong one because it doesn't know which device was
chosen by Anaconda for bootloader/stage1.

Resolves: RHEL-61143
  • Loading branch information
vojtechtrefny committed Nov 5, 2024
1 parent 71c260c commit 2f84b8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyanaconda/modules/storage/partitioning/automatic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ def schedule_partitions(storage, disks, implicit_devices, scheme, requests, encr
# First pass is for partitions only. We'll do LVs later.
#
for request in requests:
use_disks = disks[:]
if request.lv and scheme in (AUTOPART_TYPE_LVM, AUTOPART_TYPE_LVM_THINP):
continue

Expand Down Expand Up @@ -389,6 +390,9 @@ def schedule_partitions(storage, disks, implicit_devices, scheme, requests, encr
log.debug("%s", stage1_device)
continue

log.debug("making sure biosboot is placed on %s", stage1_device.name)
use_disks = [stage1_device]

if request.size > all_free[0]:
# no big enough free space for the requested partition
raise NotEnoughFreeSpaceError(_("No big enough free space on disks for "
Expand All @@ -407,7 +411,7 @@ def schedule_partitions(storage, disks, implicit_devices, scheme, requests, encr
grow=request.grow,
maxsize=request.max_size,
mountpoint=request.mountpoint,
parents=disks)
parents=use_disks)

# schedule the device for creation
storage.create_device(dev)
Expand Down

0 comments on commit 2f84b8a

Please sign in to comment.