1 Star 0 Fork 23

庞庆/anaconda_8

forked from src-anolis-os/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0007-install-fix-anolis-bootloader.patch 2.83 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2022-05-13 16:47 . install: fix anolis bootloader
From 52898ee23f89948201dce8a4d78d0799ea90d3e0 Mon Sep 17 00:00:00 2001
From: yangxiaoxuan <yangxiaoxuan@openanolis.org>
Date: Thu, 21 Apr 2022 03:46:10 -0400
Subject: [PATCH 7/7] install: fix anolis bootloader
modify the path of execInSysroot
del bootargs and enable grub-submenu
---
pyanaconda/modules/storage/bootloader/efi.py | 2 +-
pyanaconda/modules/storage/bootloader/grub2.py | 2 --
tests/nosetests/pyanaconda_tests/product_test.py | 6 ++++++
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py
index 1aed536..d83ed2e 100644
--- a/pyanaconda/modules/storage/bootloader/efi.py
+++ b/pyanaconda/modules/storage/bootloader/efi.py
@@ -183,7 +183,7 @@ class LOONGARCHEFIGRUB(EFIGRUB):
boot_disk = partition.disk
boot_part_num = str(partition.parted_partition.number)
- rc = util.execInSysroot("cp", ["-a", "/boot/efi/EFI/centos/" + self._efi_binary, "/boot/efi/EFI/BOOT/" + "BOOTLOONGARCH.EFI"])
+ rc = util.execInSysroot("cp", ["-a", "/boot/efi/EFI/anolis/" + self._efi_binary, "/boot/efi/EFI/BOOT/" + "BOOTLOONGARCH.EFI"])
if rc:
raise BootLoaderError("Failed to set new efi boot target. This is most "
"likely a kernel or firmware bug.")
diff --git a/pyanaconda/modules/storage/bootloader/grub2.py b/pyanaconda/modules/storage/bootloader/grub2.py
index 57cfd95..b5f8ddf 100644
--- a/pyanaconda/modules/storage/bootloader/grub2.py
+++ b/pyanaconda/modules/storage/bootloader/grub2.py
@@ -256,8 +256,6 @@ class GRUB2(BootLoader):
defaults.write("GRUB_TIMEOUT=%d\n" % self.timeout)
defaults.write("GRUB_DISTRIBUTOR=\"$(sed 's, release .*$,,g' /etc/system-release)\"\n")
defaults.write("GRUB_DEFAULT=saved\n")
- defaults.write("GRUB_DISABLE_SUBMENU=true\n")
- defaults.write("GRUB_CMDLINE_LINUX_DEFAULT=' rhgb quiet '\n")
if self.console and self.has_serial_console:
defaults.write("GRUB_TERMINAL=\"serial console\"\n")
defaults.write("GRUB_SERIAL_COMMAND=\"%s\"\n" % self.serial_command)
diff --git a/tests/nosetests/pyanaconda_tests/product_test.py b/tests/nosetests/pyanaconda_tests/product_test.py
index fb0c33e..18597de 100644
--- a/tests/nosetests/pyanaconda_tests/product_test.py
+++ b/tests/nosetests/pyanaconda_tests/product_test.py
@@ -265,6 +265,12 @@ class ProductConfigurationTestCase(unittest.TestCase):
["rhel.conf", "centos-stream.conf", "centos.conf"],
WORKSTATION_PARTITIONING
)
+ self._check_default_product(
+ "Anolis",
+ ["rhel.conf", "anolis.conf"]
+ )
+ WORKSTATION_PARTITIONING
+
self._check_default_product(
"Red Hat Virtualization", "",
["rhel.conf", "rhev.conf"],
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pang-qing/anaconda_8.git
git@gitee.com:pang-qing/anaconda_8.git
pang-qing
anaconda_8
anaconda_8
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385