anaconda/bugfix-Always-specify-the-boot-disk.patch
xuxiaolong 27667a0985 sync 49 fixbug from github
(cherry picked from commit 0cd8608199f6b9726c451e0e9fe3be4a1dbe7cca)
2021-04-27 14:12:18 +08:00

44 lines
2.1 KiB
Diff

From 6326cb3e866027a5862c0fbd0a1f0a2a86b6836b Mon Sep 17 00:00:00 2001
From: Vendula Poncova <vponcova@redhat.com>
Date: Tue, 23 Jun 2020 17:55:37 +0200
Subject: [PATCH] Always specify the boot disk
We should always specify the boot disk when we allocate partitions. Otherwise,
Blivet will choose one of the available disks that don't have to be valid.
(cherry-picked from a commit 856e011)
---
.../storage/partitioning/automatic/automatic_partitioning.py | 2 +-
.../modules/storage/partitioning/custom/custom_partitioning.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/modules/storage/partitioning/automatic/automatic_partitioning.py b/pyanaconda/modules/storage/partitioning/automatic/automatic_partitioning.py
index acceb4b4e..a88c55d4d 100644
--- a/pyanaconda/modules/storage/partitioning/automatic/automatic_partitioning.py
+++ b/pyanaconda/modules/storage/partitioning/automatic/automatic_partitioning.py
@@ -175,7 +175,7 @@ class AutomaticPartitioningTask(NonInteractivePartitioningTask):
devs = schedule_partitions(storage, disks, devs, scheme, requests, encrypted, luks_fmt_args)
# run the autopart function to allocate and grow partitions
- do_partitioning(storage)
+ do_partitioning(storage, boot_disk=storage.bootloader.stage1_disk)
schedule_volumes(storage, devs, scheme, requests, encrypted)
# grow LVs
diff --git a/pyanaconda/modules/storage/partitioning/custom/custom_partitioning.py b/pyanaconda/modules/storage/partitioning/custom/custom_partitioning.py
index 218bbe13f..754a48e2e 100644
--- a/pyanaconda/modules/storage/partitioning/custom/custom_partitioning.py
+++ b/pyanaconda/modules/storage/partitioning/custom/custom_partitioning.py
@@ -136,7 +136,7 @@ class CustomPartitioningTask(NonInteractivePartitioningTask):
self._execute_partition_data(storage, data, partition_data)
if data.partition.partitions:
- do_partitioning(storage)
+ do_partitioning(storage, boot_disk=storage.bootloader.stage1_disk)
def _execute_partition_data(self, storage, data, partition_data):
"""Execute the partition data.
--
2.23.0