grub2/grub2-suse-remove-linux-root-param.patch
Michael Chang 069a417c4f Accepting request 416645 from home:michael-chang:branches:Base:System
- grub.default: Empty GRUB_CMDLINE_LINUX_DEFAULT, the value will be fully
  taken from YaST settings. (bsc#989803)

- Add patches from Roberto Sassu <rsassu@suse.de>
- Fix grub2-10_linux-avoid-multi-device-root-kernel-argument.patch,
  device path is not tested if GRUB_DISABLE_LINUX_UUID="true"
  - added grub2-fix-multi-device-root-kernel-argument.patch
  (bsc#960776)
- grub2-zipl-setup: avoid multi-device root= kernel argument
  * added grub2-zipl-setup-fix-btrfs-multipledev.patch
  (bsc#960776)
- Add SUSE_REMOVE_LINUX_ROOT_PARAM configuration option
  to /etc/default/grub, to remove root= and rootflags= from the
  kernel command line in /boot/grub2/grub.cfg and /boot/zipl/config
  - added grub2-suse-remove-linux-root-param.patch
  (bsc#962585)

- Support HTTP Boot IPv4 and IPv6 (fate#320129)
  * 0001-misc-fix-invalid-character-recongition-in-strto-l.patch
  * 0002-net-read-bracketed-ipv6-addrs-and-port-numbers.patch
  * 0003-bootp-New-net_bootp6-command.patch
  * 0004-efinet-UEFI-IPv6-PXE-support.patch
  * 0005-grub.texi-Add-net_bootp6-doument.patch
  * 0006-bootp-Add-processing-DHCPACK-packet-from-HTTP-Boot.patch
  * 0007-efinet-Setting-network-from-UEFI-device-path.patch
  * 0008-efinet-Setting-DNS-server-from-UEFI-protocol.patch
- Fix heap corruption after dns lookup
  * 0001-dns-fix-buffer-overflow-for-data-addresses-in-recv_h.patch

OBS-URL: https://build.opensuse.org/request/show/416645
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=224
2016-08-05 07:32:20 +00:00

84 lines
2.6 KiB
Diff

Index: grub-2.02~beta2/util/grub-mkconfig.in
===================================================================
--- grub-2.02~beta2.orig/util/grub-mkconfig.in
+++ grub-2.02~beta2/util/grub-mkconfig.in
@@ -261,7 +261,8 @@ export GRUB_DEFAULT \
GRUB_CMDLINE_LINUX_RECOVERY \
GRUB_USE_LINUXEFI \
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"
Index: grub-2.02~beta2/util/grub.d/10_linux.in
===================================================================
--- grub-2.02~beta2.orig/util/grub.d/10_linux.in
+++ grub-2.02~beta2/util/grub.d/10_linux.in
@@ -66,7 +66,7 @@ case x"$GRUB_FS" in
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;;
@@ -77,6 +77,10 @@ case x"$GRUB_FS" in
;;
esac
+if [ "x$SUSE_REMOVE_LINUX_ROOT_PARAM" = "xtrue" ]; then
+ LINUX_ROOT_DEVICE=""
+fi
+
title_correction_code=
hotkey=1
Index: grub-2.02~beta2/util/grub.d/20_linux_xen.in
===================================================================
--- grub-2.02~beta2.orig/util/grub.d/20_linux_xen.in
+++ grub-2.02~beta2/util/grub.d/20_linux_xen.in
@@ -80,7 +80,7 @@ case x"$GRUB_FS" in
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;;
@@ -91,6 +91,10 @@ case x"$GRUB_FS" in
;;
esac
+if [ "x$SUSE_REMOVE_LINUX_ROOT_PARAM" = "xtrue" ]; then
+ LINUX_ROOT_DEVICE=""
+fi
+
title_correction_code=
if [ -d /sys/firmware/efi ]; then
Index: grub-2.02~beta2/util/s390x/zipl2grub.pl.in
===================================================================
--- grub-2.02~beta2.orig/util/s390x/zipl2grub.pl.in
+++ grub-2.02~beta2/util/s390x/zipl2grub.pl.in
@@ -361,9 +361,13 @@ while ( <IN> ) {
} 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;
}