Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SoTkv-0008OF-K5 for mharc-grub-devel@gnu.org; Tue, 10 Jul 2012 02:17:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoKAI-0005GX-Lv for grub-devel@gnu.org; Mon, 09 Jul 2012 16:02:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoKAG-0006AT-H2 for grub-devel@gnu.org; Mon, 09 Jul 2012 16:02:38 -0400 Received: from mail.pripojeni.net ([178.22.112.14]:36829 helo=smtp.pripojeni.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoKAG-0006A5-Af for grub-devel@gnu.org; Mon, 09 Jul 2012 16:02:36 -0400 Received: from anemoi.localdomain ([178.22.113.142]) by smtp.pripojeni.net (Kerio Connect 7.2.2); Mon, 9 Jul 2012 22:02:32 +0200 From: Jiri Slaby To: grub-devel@gnu.org Subject: [PATCH 5/5] add GRUB_CMDLINE_LINUX_RECOVERY for recovery mode Date: Mon, 9 Jul 2012 22:02:30 +0200 Message-Id: <1341864150-9588-5-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1341864150-9588-1-git-send-email-jslaby@suse.cz> References: <1341864150-9588-1-git-send-email-jslaby@suse.cz> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 178.22.112.14 X-Mailman-Approved-At: Tue, 10 Jul 2012 02:17:03 -0400 Cc: Michael Chang , Jiri Slaby X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 20:02:42 -0000 From: Michael Chang 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 --- 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