1 Star 1 Fork 107

ctyunsystem/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-Always-specify-the-boot-disk.patch 2.15 KB
一键复制 编辑 原始数据 按行查看 历史
xuxiaolong 提交于 2021-04-02 10:25 . sync 49 fixbug from github
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ctyunsystem/anaconda.git
git@gitee.com:ctyunsystem/anaconda.git
ctyunsystem
anaconda
anaconda
master

搜索帮助