From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1U7tqX-000291-61 for mharc-grub-devel@gnu.org; Tue, 19 Feb 2013 15:31:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7tqT-00028b-7Z for grub-devel@gnu.org; Tue, 19 Feb 2013 15:31:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7tqR-0000eD-8u for grub-devel@gnu.org; Tue, 19 Feb 2013 15:31:21 -0500 Received: from mail-bk0-f44.google.com ([209.85.214.44]:32926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7tqQ-0000dx-U1 for grub-devel@gnu.org; Tue, 19 Feb 2013 15:31:19 -0500 Received: by mail-bk0-f44.google.com with SMTP id j4so3247545bkw.17 for ; Tue, 19 Feb 2013 12:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type; bh=VYf+j3vlHgG2dKBYekhjqNNdlQ2lNFBKrC9H9pSiT+Q=; b=VC6YZaOuB/ZSq+WfG9C3ui3oPq3lb+IOD2zaOkoz7T2M+/fcxNc5DqMTholG7KjP7R mFxoNNkcKUiT/rp1GRPGYRonF6BVv/BBwW17WrEp3jWq+4uMtNCL5uDG9nz9FsJJbHz6 ObOHtSX8uLiqc1rhlmAbkbB6uUv7gvhdv9nebf+2akDwDS2HQ+37pW4gdxavXmkPci3U Eft78mm7845Yrgsxfx5nLv46XaGiIMOiL+/tC4AEPNUhINVYHha9Nl6jWmK4n+9Acse8 aRvwFTfx1tb1nZqQvbhn8KebcKGEESrb6qr1/NJd1yIoR7lZfFGroc2K/q0bxbe0zHAL dBQA== X-Received: by 10.204.130.22 with SMTP id q22mr7178243bks.44.1361305877136; Tue, 19 Feb 2013 12:31:17 -0800 (PST) Received: from localhost (iskon4081.duo.carnet.hr. [31.147.111.241]) by mx.google.com with ESMTPS id fw3sm6433147bkc.9.2013.02.19.12.31.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 19 Feb 2013 12:31:16 -0800 (PST) Message-ID: <5123E112.8050009@gmail.com> Date: Tue, 19 Feb 2013 21:31:14 +0100 From: poma User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Community support for Fedora users Subject: Re: at boot-time echoed kernel is older that started kernel References: <51209386.7070600@alice.it> <5120A3F8.4050702@rhrk.uni-kl.de> <5120AA9E.20709@alice.it> <5122903E.8060601@netspace.net.au> <5122919B.3040607@thelounge.net> In-Reply-To: <5122919B.3040607@thelounge.net> Content-Type: multipart/mixed; boundary="------------080302050301050305060403" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.214.44 Cc: Prarit Bhargava , The development of GNU GRUB , Reindl Harald 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: Tue, 19 Feb 2013 20:31:23 -0000 This is a multi-part message in MIME format. --------------080302050301050305060403 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 02/18/13 21:39, Reindl Harald wrote: […] > i would be thankful if even "grub2-mkconfig" would not create > this "advanced" submenu at all > Actually there is a patch proposal at 'grub-devel' by Prarit Bhargava, for such a case - disable submenu[1][2]. >From this I made ​​two for testing directly without compiling the entire grub's trunk repository[3][4]. Those who would do such test should make a backup of the corresponding files: patch --backup /usr/sbin/grub2-mkconfig < grub2-mkconfig-disable-submenu.patch patch --backup /etc/grub.d/10_linux < 10_linux-disable-submenu.patch chmod -x /etc/grub.d/10_linux.orig /etc/default/grub: # submenu disabled GRUB_DISABLE_SUBMENU=true # submenu enabled #GRUB_DISABLE_SUBMENU=false -- cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig /usr/sbin/grub2-mkconfig --output=/boot/grub2/grub.cfg Cheers, poma [1] http://lists.gnu.org/archive/html/grub-devel/2013-01/msg00126.html [2] grub2-disable-submenu.patch [3] 10_linux-disable-submenu.patch [4] grub2-mkconfig-disable-submenu.patch --------------080302050301050305060403 Content-Type: text/x-patch; name="grub2-mkconfig-disable-submenu.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="grub2-mkconfig-disable-submenu.patch" --- /usr/sbin/grub2-mkconfig.bkp 2013-02-19 19:31:16.810839275 +0100 +++ /usr/sbin/grub2-mkconfig 2013-02-19 18:31:31.465890499 +0100 @@ -216,7 +216,8 @@ GRUB_INIT_TUNE \ GRUB_SAVEDEFAULT \ GRUB_ENABLE_CRYPTODISK \ - GRUB_BADRAM + GRUB_BADRAM \ + GRUB_DISABLE_SUBMENU if test "x${grub_cfg}" != "x"; then rm -f "${grub_cfg}.new" --------------080302050301050305060403 Content-Type: text/x-patch; name="grub2-disable-submenu.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="grub2-disable-submenu.patch" === modified file 'util/grub-mkconfig.in' --- util/grub-mkconfig.in 2012-12-28 07:21:17 +0000 +++ util/grub-mkconfig.in 2013-01-29 19:14:01 +0000 @@ -215,7 +215,8 @@ GRUB_INIT_TUNE \ GRUB_SAVEDEFAULT \ GRUB_ENABLE_CRYPTODISK \ - GRUB_BADRAM + GRUB_BADRAM \ + GRUB_DISABLE_SUBMENU if test "x${grub_cfg}" != "x"; then rm -f "${grub_cfg}.new" === modified file 'util/grub.d/10_hurd.in' --- util/grub.d/10_hurd.in 2012-09-18 11:04:06 +0000 +++ util/grub.d/10_hurd.in 2013-01-29 19:14:01 +0000 @@ -156,14 +156,15 @@ for kernel in ${kernels} do - if [ "x$is_first_entry" = xtrue ]; then + if [ "x${GRUB_DISABLE_SUBMENU}" = x ]; then + if [ "x$is_first_entry" = xtrue ]; then hurd_entry "$kernel" simple submenu_indentation="$grub_tab" # TRANSLATORS: %s is replaced with an OS name echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnuhurd-advanced-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {" + fi fi - hurd_entry "$kernel" advanced hurd_entry "$kernel" recovery is_first_entry=false @@ -171,8 +172,10 @@ # If at least one kernel was found, then we need to # add a closing '}' for the submenu command. -if [ x"$is_first_entry" != xtrue ]; then - echo '}' +if [ "x${GRUB_DISABLE_SUBMENU}" = x ]; then + if [ x"$is_first_entry" != xtrue ]; then + echo '}' + fi fi echo "$title_correction_code" === modified file 'util/grub.d/10_kfreebsd.in' --- util/grub.d/10_kfreebsd.in 2013-01-03 22:19:19 +0000 +++ util/grub.d/10_kfreebsd.in 2013-01-29 19:14:01 +0000 @@ -211,15 +211,17 @@ module_dir_rel=$(make_system_path_relative_to_its_root $module_dir) fi - if [ "x$is_first_entry" = xtrue ]; then - kfreebsd_entry "${OS}" "${version}" simple - submenu_indentation="$grub_tab" - - if [ -z "$boot_device_id" ]; then + if [ "x${GRUB_DISABLE_SUBMENU}" = x ]; then + if [ "x$is_first_entry" = xtrue ]; then + kfreebsd_entry "${OS}" "${version}" simple + submenu_indentation="$grub_tab" + + if [ -z "$boot_device_id" ]; then boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" - fi - # TRANSLATORS: %s is replaced with an OS name - echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'kfreebsd-advanced-$boot_device_id' {" + fi + # TRANSLATORS: %s is replaced with an OS name + echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'kfreebsd-advanced-$boot_device_id' {" + fi fi kfreebsd_entry "${OS}" "${version}" advanced @@ -233,8 +235,10 @@ # If at least one kernel was found, then we need to # add a closing '}' for the submenu command. -if [ x"$is_first_entry" != xtrue ]; then - echo '}' +if [ "x${GRUB_DISABLE_SUBMENU}" = x ]; then + if [ x"$is_first_entry" != xtrue ]; then + echo '}' + fi fi echo "$title_correction_code" === modified file 'util/grub.d/10_linux.in' --- util/grub.d/10_linux.in 2012-09-18 11:04:06 +0000 +++ util/grub.d/10_linux.in 2013-01-29 19:14:01 +0000 @@ -226,18 +226,20 @@ linux_root_device_thisversion=${GRUB_DEVICE} fi - if [ "x$is_first_entry" = xtrue ]; then - linux_entry "${OS}" "${version}" simple \ - "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + if [ "x${GRUB_DISABLE_SUBMENU}" = x ]; then + if [ "x$is_first_entry" = xtrue ]; then + linux_entry "${OS}" "${version}" simple \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" - submenu_indentation="$grub_tab" + submenu_indentation="$grub_tab" - if [ -z "$boot_device_id" ]; then - boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" + if [ -z "$boot_device_id" ]; then + boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" + fi + # TRANSLATORS: %s is replaced with an OS name + echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {" fi - # TRANSLATORS: %s is replaced with an OS name - echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {" - fi +fi linux_entry "${OS}" "${version}" advanced \ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" @@ -252,8 +254,9 @@ # If at least one kernel was found, then we need to # add a closing '}' for the submenu command. -if [ x"$is_first_entry" != xtrue ]; then - echo '}' +if [ "x${GRUB_DISABLE_SUBMENU}" = x ]; then + if [ x"$is_first_entry" != xtrue ]; then + echo '}' + fi fi - echo "$title_correction_code" === modified file 'util/grub.d/10_netbsd.in' --- util/grub.d/10_netbsd.in 2012-10-28 10:55:22 +0000 +++ util/grub.d/10_netbsd.in 2013-01-29 19:14:01 +0000 @@ -157,15 +157,17 @@ gettext_printf "Found NetBSD kernel: %s\n" "$k" >&2 - if [ "x$is_first_entry" = xtrue ]; then - netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}" - submenu_indentation="$grub_tab" + if [ "x${GRUB_DISABLE_SUBMENU}" = x ]; then + if [ "x$is_first_entry" = xtrue ]; then + netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}" + submenu_indentation="$grub_tab" - if [ -z "$boot_device_id" ]; then - boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" + if [ -z "$boot_device_id" ]; then + boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")" + fi + # TRANSLATORS: %s is replaced with an OS name + echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'netbsd-advanced-$boot_device_id' {" fi - # TRANSLATORS: %s is replaced with an OS name - echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'netbsd-advanced-$boot_device_id' {" fi netbsd_entry "knetbsd" "$k" advanced "${GRUB_CMDLINE_NETBSD_DEFAULT}" @@ -179,8 +181,10 @@ # If at least one kernel was found, then we need to # add a closing '}' for the submenu command. -if [ x"$is_first_entry" != xtrue ]; then - echo '}' +if [ "x${GRUB_DISABLE_SUBMENU}" = x ]; then + if [ x"$is_first_entry" != xtrue ]; then + echo '}' + fi fi echo "$title_correction_code" --------------080302050301050305060403 Content-Type: text/x-patch; name="10_linux-disable-submenu.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="10_linux-disable-submenu.patch" --- /etc/grub.d/10_linux.bkp 2013-02-19 19:33:20.674283559 +0100 +++ /etc/grub.d/10_linux 2013-02-19 19:25:03.473633983 +0100 @@ -240,9 +240,10 @@ linux_root_device_thisversion=${GRUB_DEVICE} fi - if [ "x$is_first_entry" = xtrue ]; then - linux_entry "${OS}" "${version}" simple \ - "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + if [ "x${GRUB_DISABLE_SUBMENU}" = xfalse ]; then + if [ "x$is_first_entry" = xtrue ]; then + linux_entry "${OS}" "${version}" simple \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" submenu_indentation="\t" @@ -251,6 +252,7 @@ fi # TRANSLATORS: %s is replaced with an OS name echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {" + fi fi linux_entry "${OS}" "${version}" advanced \ @@ -266,8 +268,9 @@ # If at least one kernel was found, then we need to # add a closing '}' for the submenu command. -if [ x"$is_first_entry" != xtrue ]; then - echo '}' +if [ "x${GRUB_DISABLE_SUBMENU}" = xfalse ]; then + if [ x"$is_first_entry" != xtrue ]; then + echo '}' + fi fi - echo "$title_correction_code" --------------080302050301050305060403--