代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。