Accepting request 555192 from home:michael-chang:branches:Base:System

-  Filter out autofs and securityfs from /proc/self/mountinfo to speed
   up nfsroot test in large number of autofs mounts (bsc#1069094)
  * modified grub2-pass-corret-root-for-nfsroot.patch

OBS-URL: https://build.opensuse.org/request/show/555192
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=286
This commit is contained in:
Michael Chang 2017-12-11 04:47:09 +00:00 committed by Git OBS Bridge
parent 650ed6cb6c
commit ab2abe9cbe
2 changed files with 27 additions and 17 deletions

View File

@ -3,7 +3,7 @@ From: Michael Chang <mchang@suse.com>
Date: Thu, 30 Aug 2012 15:43:17 +0800 Date: Thu, 30 Aug 2012 15:43:17 +0800
Subject: [PATCH] Pass corret root= for nfsroot Subject: [PATCH] Pass corret root= for nfsroot
References: bnc#774548 References: bnc#774548, bsc#1069094
Patch-Mainline: no Patch-Mainline: no
Fix / is mounted on nfs. The fix is to pass kernel parameters Fix / is mounted on nfs. The fix is to pass kernel parameters
@ -11,15 +11,18 @@ with correct root= for nfs. However since grub2 doesn't support
nfs file system module, the /boot on nfs is not possible and nfs file system module, the /boot on nfs is not possible and
grub2-probe not work in probing nfs mounted path. The fix is merely grub2-probe not work in probing nfs mounted path. The fix is merely
on the script level and not use grub2-probe for above reasons. on the script level and not use grub2-probe for above reasons.
v2: Filter out autofs and securityfs from /proc/self/mountinfo (bsc#1069094)
--- ---
util/grub-mkconfig.in | 37 ++++++++++++++++++++++++++++++------- util/grub-mkconfig.in | 37 ++++++++++++++++++++++++++++++-------
1 files changed, 30 insertions(+), 7 deletions(-) 1 files changed, 30 insertions(+), 7 deletions(-)
Index: grub-2.02~beta2/util/grub-mkconfig.in Index: grub-2.02/util/grub-mkconfig.in
=================================================================== ===================================================================
--- grub-2.02~beta2.orig/util/grub-mkconfig.in --- grub-2.02.orig/util/grub-mkconfig.in
+++ grub-2.02~beta2/util/grub-mkconfig.in +++ grub-2.02/util/grub-mkconfig.in
@@ -128,22 +128,47 @@ else @@ -131,22 +131,47 @@ else
exit 1 exit 1
fi fi
@ -47,9 +50,9 @@ Index: grub-2.02~beta2/util/grub-mkconfig.in
+ return + return
+ fi + fi
+ done + done
+} </proc/self/mountinfo +}
+ +
+NFSROOT_DEVICE="`probe_nfsroot_device`" +NFSROOT_DEVICE="`awk '($9!="autofs")&&($9!="securityfs")' /proc/self/mountinfo | probe_nfsroot_device`"
-# Filesystem for the device containing our userland. Used for stuff like -# Filesystem for the device containing our userland. Used for stuff like
-# choosing Hurd filesystem module. -# choosing Hurd filesystem module.
@ -78,11 +81,11 @@ Index: grub-2.02~beta2/util/grub-mkconfig.in
if test -f ${sysconfdir}/default/grub ; then if test -f ${sysconfdir}/default/grub ; then
. ${sysconfdir}/default/grub . ${sysconfdir}/default/grub
fi fi
Index: grub-2.02~beta2/util/grub.d/10_linux.in Index: grub-2.02/util/grub.d/10_linux.in
=================================================================== ===================================================================
--- grub-2.02~beta2.orig/util/grub.d/10_linux.in --- grub-2.02.orig/util/grub.d/10_linux.in
+++ grub-2.02~beta2/util/grub.d/10_linux.in +++ grub-2.02/util/grub.d/10_linux.in
@@ -74,6 +74,12 @@ linux_entry () @@ -76,6 +76,12 @@ linux_entry ()
type="$3" type="$3"
args="$4" args="$4"
@ -95,7 +98,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
if [ -z "$boot_device_id" ]; then if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi fi
@@ -129,7 +135,7 @@ linux_entry () @@ -131,7 +137,7 @@ linux_entry ()
message="$(gettext_printf "Loading Linux %s ..." ${version})" message="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)' echo '$(echo "$message" | grub_quote)'
@ -104,11 +107,11 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in
EOF EOF
if test -n "${initrd}" ; then if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated. # TRANSLATORS: ramdisk isn't identifier. Should be translated.
Index: grub-2.02~beta2/util/grub.d/20_linux_xen.in Index: grub-2.02/util/grub.d/20_linux_xen.in
=================================================================== ===================================================================
--- grub-2.02~beta2.orig/util/grub.d/20_linux_xen.in --- grub-2.02.orig/util/grub.d/20_linux_xen.in
+++ grub-2.02~beta2/util/grub.d/20_linux_xen.in +++ grub-2.02/util/grub.d/20_linux_xen.in
@@ -89,6 +89,11 @@ linux_entry () @@ -91,6 +91,11 @@ linux_entry ()
type="$4" type="$4"
args="$5" args="$5"
xen_args="$6" xen_args="$6"
@ -120,7 +123,7 @@ Index: grub-2.02~beta2/util/grub.d/20_linux_xen.in
if [ -z "$boot_device_id" ]; then if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi fi
@@ -128,7 +133,7 @@ linux_entry () @@ -130,7 +135,7 @@ linux_entry ()
fi fi
multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts}
echo '$(echo "$lmessage" | grub_quote)' echo '$(echo "$lmessage" | grub_quote)'

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Dec 8 09:30:46 UTC 2017 - mchang@suse.com
- Filter out autofs and securityfs from /proc/self/mountinfo to speed
up nfsroot test in large number of autofs mounts (bsc#1069094)
* modified grub2-pass-corret-root-for-nfsroot.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Nov 28 09:35:48 UTC 2017 - mchang@suse.com Tue Nov 28 09:35:48 UTC 2017 - mchang@suse.com