grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/5] add GRUB_CMDLINE_LINUX_RECOVERY for recovery mode


From: Jiri Slaby
Subject: [PATCH 5/5] add GRUB_CMDLINE_LINUX_RECOVERY for recovery mode
Date: Mon, 9 Jul 2012 22:02:30 +0200

From: Michael Chang <address@hidden>

We, in suse, do not use single user mode but with specific kernel
command line options decided in YaST. These command line could be
applied to grub2's recovery mode via the new setting
GRUB_CMDLINE_LINUX_RECOVERY.

The same holds for debian and the script is actually adapted from
there.

Signed-off-by: Jiri Slaby <address@hidden>
---
 util/grub-mkconfig.in   |    6 +++++-
 util/grub.d/10_linux.in |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 516be86..82917d7 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -140,6 +140,9 @@ GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device 
${GRUB_DEVICE_BOOT} --target=fs_u
 # choosing Hurd filesystem module.
 GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || 
echo unknown`"
 
+# Not everyone uses single as recovery, let them override.
+GRUB_CMDLINE_LINUX_RECOVERY="single"
+
 if test -f ${sysconfdir}/default/grub ; then
   . ${sysconfdir}/default/grub
 fi
@@ -216,7 +219,8 @@ export GRUB_DEFAULT \
   GRUB_INIT_TUNE \
   GRUB_SAVEDEFAULT \
   GRUB_ENABLE_CRYPTODISK \
-  GRUB_BADRAM
+  GRUB_BADRAM \
+  GRUB_CMDLINE_LINUX_RECOVERY
 
 if test "x${grub_cfg}" != "x"; then
   rm -f "${grub_cfg}.new"
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 14402e8..6066d32 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -243,7 +243,7 @@ while [ "x$list" != "x" ] ; do
               "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
   if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
     linux_entry "${OS}" "${version}" recovery \
-                "single ${GRUB_CMDLINE_LINUX}"
+                "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_RECOVERY}"
   fi
 
   list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
-- 
1.7.10.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]