1 Star 0 Fork 50

Sevever/grub2_an

forked from src-anolis-os/grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0579-Regenerate-kernelopts-if-missing-on-ppc.patch 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
From 8c74431327e0c7d7fe47462b0e69fcbe3bbac56e Mon Sep 17 00:00:00 2001
From: Marta Lewandowska <[email protected]>
Date: Fri, 24 Mar 2023 09:14:29 -0400
Subject: [PATCH] Regenerate kernelopts if missing on ppc
Signed-off-by: Marta Lewandowska <[email protected]>
---
util/grub.d/10_linux_bls.in | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/util/grub.d/10_linux_bls.in b/util/grub.d/10_linux_bls.in
index 855dbdd..f2281bc 100644
--- a/util/grub.d/10_linux_bls.in
+++ b/util/grub.d/10_linux_bls.in
@@ -117,6 +117,18 @@ cat <<EOF
# This section was generated by a script. Do not modify the generated file - all changes
# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
+# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
+# entries populated from BootLoaderSpec files that use this variable work correctly even
+# without a grubenv file, define a fallback kernelopts variable if this has not been set.
+#
+# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
+# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
+# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
+# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
+if [ -z "\${kernelopts}" ]; then
+ set kernelopts="root=${linux_root_device_thisversion} ro ${args}"
+fi
+
EOF
}
--
2.39.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sevever/grub2_an.git
[email protected]:sevever/grub2_an.git
sevever
grub2_an
grub2_an
a8

搜索帮助