1 Star 0 Fork 83

MerlinDust / grub2_euler

forked from src-openEuler / grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
grub2-suse-remove-linux-root-param.patch 1.87 KB
AI 代码解读
一键复制 编辑 原始数据 按行查看 历史
zhangqiumiao 提交于 2024-03-04 03:17 . update to 2.12
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -299,7 +299,8 @@
GRUB_OS_PROBER_SKIP_LIST \
GRUB_DISABLE_SUBMENU \
SUSE_BTRFS_SNAPSHOT_BOOTING \
- SUSE_CMDLINE_XENEFI
+ SUSE_CMDLINE_XENEFI \
+ SUSE_REMOVE_LINUX_ROOT_PARAM
if test "x${grub_cfg}" != "x"; then
rm -f "${grub_cfg}.new"
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -76,7 +76,7 @@
else
rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}"
- if [ "x${rootsubvol}" != x ]; then
+ if [ "x${rootsubvol}" != x ] && [ "x$SUSE_REMOVE_LINUX_ROOT_PARAM" != "xtrue" ]; then
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi
fi;;
@@ -87,6 +87,10 @@
;;
esac
+if [ "x$SUSE_REMOVE_LINUX_ROOT_PARAM" = "xtrue" ]; then
+ LINUX_ROOT_DEVICE=""
+fi
+
title_correction_code=
hotkey=1
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -100,7 +100,7 @@
else
rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}"
- if [ "x${rootsubvol}" != x ]; then
+ if [ "x${rootsubvol}" != x ] && [ "x$SUSE_REMOVE_LINUX_ROOT_PARAM" != "xtrue" ]; then
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi
fi;;
@@ -111,6 +111,10 @@
;;
esac
+if [ "x$SUSE_REMOVE_LINUX_ROOT_PARAM" = "xtrue" ]; then
+ LINUX_ROOT_DEVICE=""
+fi
+
title_correction_code=
grub2_unquote ()
--- a/util/s390x/zipl2grub.pl.in
+++ b/util/s390x/zipl2grub.pl.in
@@ -384,9 +384,13 @@
} else {
$v = "";
}
- if ($k eq "GRUB_DEVICE" && $v !~ /^UUID/ && ! -e $v) {
- s{root=\@$k\@}{}g;
- next;
+ if ($k eq "GRUB_DEVICE") {
+ if (($v !~ /^UUID/ && ! -e $v) ||
+ (exists( $C{SUSE_REMOVE_LINUX_ROOT_PARAM}) &&
+ $C{SUSE_REMOVE_LINUX_ROOT_PARAM} eq "true")) {
+ s{root=\@$k\@}{}g;
+ next;
+ }
}
s{\@$k\@}{$v}g;
}
1
https://gitee.com/DustMerlin/grub2_euler.git
git@gitee.com:DustMerlin/grub2_euler.git
DustMerlin
grub2_euler
grub2_euler
master

搜索帮助