forked from pool/grub2
ef0ef13ff0
- Fix inappropriately including commented lines in crypttab (bsc#1206279) * 0010-templates-import-etc-crypttab-to-grub.cfg.patch - Make grub.cfg invariant to efi and legacy platforms (bsc#1205200) - Removed patch linuxefi * grub2-secureboot-provide-linuxefi-config.patch * grub2-secureboot-use-linuxefi-on-uefi-in-os-prober.patch * grub2-secureboot-use-linuxefi-on-uefi.patch - Rediff * grub2-btrfs-05-grub2-mkconfig.patch * grub2-efi-xen-cmdline.patch * grub2-s390x-05-grub2-mkconfig.patch * grub2-suse-remove-linux-root-param.patch OBS-URL: https://build.opensuse.org/request/show/1045798 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=434
76 lines
1.9 KiB
Diff
76 lines
1.9 KiB
Diff
--- a/util/grub-mkconfig.in
|
|
+++ b/util/grub-mkconfig.in
|
|
@@ -296,7 +296,8 @@
|
|
GRUB_DISABLE_SUBMENU \
|
|
GRUB_CMDLINE_LINUX_RECOVERY \
|
|
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
|
|
@@ -74,7 +74,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;;
|
|
@@ -85,6 +85,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
|
|
@@ -98,7 +98,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;;
|
|
@@ -109,6 +109,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;
|
|
}
|