Skip to contentSkip to conversation

: Add GRUB_DISABLE_SUBMENU option

PATCH In review Prarit Bhargava 4 participants 15 messages Jan 29, 2013 – Nov 10, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Add GRUB_DISABLE_SUBMENU option

I'm not sure what the proper patch posting protocol is on this list and I've never used bzr before. If this is incorrect, please email me and let me know what I've done wrong.

Thanks,

P.

------------------------------------------------------------
revno: 4686
committer: Prarit Bhargava <[email protected]>
branch nick: grub
timestamp: Tue 2013-01-29 14:14:01 -0500
message:
Add GRUB_DISABLE_MENU option

When doing kernel development it is often advantageous to do the following:

  1.  Select a kernel to boot with grub2-reboot
  2.  Reboot, capture output from bad kernel.
  3.  On subsequent reboot, boot known good or "default" kernel.

The problem is that the submenus get in the way of doing this. grub2-reboot does not allow one to set a reboot to a specific kernel.

I *could* write a rule to be executed on the existing grub.cfg to remove the submenu entries, however, given that a google search for "grub2 remove submenus" leads to many many hits, I think a better approach is to make GRUB_DISABLE_SUBMENU a generally available option.

Please note I have only tested this on Linux (specifically Fedora 17 and Fedora 18).

diff:
=== modified file 'util/grub-mkconfig.in'

grub-mkconfig.in +2 -1
@@ -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'

grub.d/10_hurd.in +7 -4
@@ -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'

grub.d/10_kfreebsd.in +14 -10
@@ -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'

grub.d/10_linux.in +15 -12
@@ -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'

grub.d/10_netbsd.in +13 -9
@@ -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"
#1 lore raw
Quoted 3 lines

The problem is that the submenus get in the way of doing this. grub2-reboot does not allow one to set a reboot to a specific kernel.

It does.

sudo /usr/sbin/grub2-reboot 'Advanced options for openSUSE 12.2>openSUSE 12.2, with Linux 3.4.6-2.10-desktop (recovery mode)'

better is to use menuentry id, but this works too.

#2 lore raw
Quoted 9 lines · Andrey Borzenkov
Quoted 3 lines

The problem is that the submenus get in the way of doing this. grub2-reboot does not allow one to set a reboot to a specific kernel.

It does.

sudo /usr/sbin/grub2-reboot 'Advanced options for openSUSE 12.2>openSUSE 12.2, with Linux 3.4.6-2.10-desktop (recovery mode)'

better is to use menuentry id, but this works too.

Hi Andrey,

Interesting :), and I'm not going to deny I could code a script to do that.

However, given the large number of requests for disabling the submenus (google "grub2 disable submenus") it would still be preferable to myself and others (from just a general debug point of view) to be able to have the entries in a single list so that I can use the numeric feature of grub2-reboot.

ie) /usr/sbin/grub2-reboot 2

is always easier than having to type

/usr/sbin/grub2-reboot 'Advanced options for openSUSE 12.2>openSUSE 12.2, with Linux 3.4.6-2.10-desktop (recovery mode)'

which requires me to grep through grub.cfg, figure out what submenu I'm under, and figure out what the entry is.

Again, I could script that out, but there seems to be enough momentum behind disabling the submenus that I think the patch may still have some merit.

Alternatively, would you object to me to adding some additional functionality to grub2-reboot that would grep grub.cfg and display a menu of entries so that 'grub2-reboot #number' would work with submenus?

P.

#3 lore raw

В Tue, 29 Jan 2013 18:33:00 -0500
Prarit Bhargava <[email protected]> пишет:

Quoted 22 lines · Andrey Borzenkov
Quoted 9 lines
Quoted 3 lines

The problem is that the submenus get in the way of doing this. grub2-reboot does not allow one to set a reboot to a specific kernel.

It does.

sudo /usr/sbin/grub2-reboot 'Advanced options for openSUSE 12.2>openSUSE 12.2, with Linux 3.4.6-2.10-desktop (recovery mode)'

better is to use menuentry id, but this works too.

Hi Andrey,

Interesting :), and I'm not going to deny I could code a script to do that.

However, given the large number of requests for disabling the submenus (google "grub2 disable submenus") it would still be preferable to myself and others (from just a general debug point of view) to be able to have the entries in a single list so that I can use the numeric feature of grub2-reboot.

Quoted 7 lines

ie) /usr/sbin/grub2-reboot 2

is always easier than having to type

/usr/sbin/grub2-reboot 'Advanced options for openSUSE 12.2>openSUSE 12.2, with Linux 3.4.6-2.10-desktop (recovery mode)'

That's what good command line completion is for. Really :)

How is user going to know which number to type? Open grub.cfg and count?

Quoted 6 lines

which requires me to grep through grub.cfg, figure out what submenu I'm under, and figure out what the entry is.

Again, I could script that out, but there seems to be enough momentum behind disabling the submenus that I think the patch may still have some merit.

Actually I have patch to disable submenu somewhere around as well. So I can well understand your feelings, I just think this is unrelated to grub-reboot.

Quoted 4 lines

Alternatively, would you object to me to adding some additional functionality to grub2-reboot that would grep grub.cfg and display a menu of entries so that 'grub2-reboot #number' would work with submenus?

I think something like "grub-reboot --select" would be interesting, yes. But it is not for me to decide :)

#4 lore raw
Quoted 7 lines
Quoted 5 lines

/usr/sbin/grub2-reboot 'Advanced options for openSUSE 12.2>openSUSE 12.2, with Linux 3.4.6-2.10-desktop (recovery mode)'

That's what good command line completion is for. Really :)

Heh :) Fair enough :)

Quoted 2 lines

How is user going to know which number to type? Open grub.cfg and count?

This is what I used to do in grub1 ... I wrote a nice little script that dumped the contents of grub config and enumerated the entries so that I could select which one I wanted.

FWIW, I could do *exactly* the same thing with grub2, but I'm wondering if there is a "better" way so that the kernel debugging users of grub2 could all benefit.

Quoted 3 lines

Actually I have patch to disable submenu somewhere around as well. So I can well understand your feelings, I just think this is unrelated to grub-reboot.

You're right, and I'm not saying it is :) I like to provide a decent use-case scenario with a patch so people who read it later understand _why_ I've made a change.

Quoted 8 lines
Quoted 5 lines

Alternatively, would you object to me to adding some additional functionality to grub2-reboot that would grep grub.cfg and display a menu of entries so that 'grub2-reboot #number' would work with submenus?

I think something like "grub-reboot --select" would be interesting, yes. But it is not for me to decide :)

I've talked with a few other kernel engineers, and they like the idea of just adding GRUB_DISABLE_SUBMENU="true" to /etc/default/grub ... IMO it still seems like the easiest approach.

Beyond the grub-reboot stuff, do you have any objections to the patch going in?

Thanks for your input (and the info!) Andrey. That was really helpful :)

P.

#5 lore raw
In reply to Prarit Bhargava

I've committed a patch introducing the same option but more compact and accepting GRUB_DISABLE_SUBMENU=n

Quoted 225 lines · Prarit Bhargava

I'm not sure what the proper patch posting protocol is on this list and I've never used bzr before. If this is incorrect, please email me and let me know what I've done wrong.

Thanks,

P.

------------------------------------------------------------
revno: 4686
committer: Prarit Bhargava <[email protected]>
branch nick: grub
timestamp: Tue 2013-01-29 14:14:01 -0500
message:
Add GRUB_DISABLE_MENU option

When doing kernel development it is often advantageous to do the following:

  1.  Select a kernel to boot with grub2-reboot
  2.  Reboot, capture output from bad kernel.
  3.  On subsequent reboot, boot known good or "default" kernel.

The problem is that the submenus get in the way of doing this. grub2-reboot does not allow one to set a reboot to a specific kernel.

I *could* write a rule to be executed on the existing grub.cfg to remove the submenu entries, however, given that a google search for "grub2 remove submenus" leads to many many hits, I think a better approach is to make GRUB_DISABLE_SUBMENU a generally available option.

Please note I have only tested this on Linux (specifically Fedora 17 and Fedora 18).

diff:
=== modified file 'util/grub-mkconfig.in'

grub-mkconfig.in +2 -1
@@ -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'

grub.d/10_hurd.in +7 -4
@@ -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'

grub.d/10_kfreebsd.in +14 -10
@@ -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'

grub.d/10_linux.in +15 -12
@@ -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'

grub.d/10_netbsd.in +13 -9
@@ -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"

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#6 lore raw

PATCH 1/1 document GRUB_DISABLE_SUBMENU

---
 docs/grub.texi | 8 ++++++++
 1 file changed, 8 insertions(+)
docs/grub.texi +8 -0
index fced603..fbabea8 100644
@@ -1450,6 +1450,14 @@ Normally, @command{grub-mkconfig} will try to use the external
 systems installed on the same system and generate appropriate menu entries
 for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_DISABLE_SUBMENU
+Normally, @command{grub-mkconfig} will generate top level menu entry for
+the kernel with highest version number and put all other found kernels
+or alternative menu entries for recovery mode in submenu. For entries returned
+by @command{os-prober} first entry will be put on top level and all others
+in submenu. If this option is set to @samp{y}, flat menu with all entries
+on top level will be generated instead.
+
 @item GRUB_ENABLE_CRYPTODISK
 If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
 check for encrypted disks and generate additional commands needed to access
Signature · 1 line
tg: (6750892..) u/grub_disable_submenu (depends on: master)
#7 lore raw

Re: [PATCH] document GRUB_DISABLE_SUBMENU

docs/grub.texi Normally, @command{grub-mkconfig} will try to use the external · line 1460

Quoted 8 lines

+@item GRUB_DISABLE_SUBMENU

docs/grub.texi +7 -0
+Normally, @command{grub-mkconfig} will generate top level menu entry for
+the kernel with highest version number and put all other found kernels
+or alternative menu entries for recovery mode in submenu. For entries returned
+by @command{os-prober} first entry will be put on top level and all others
+in submenu. If this option is set to @samp{y}, flat menu with all entries
+on top level will be generated instead.
+

Could you add that toggling this requires changing default/GRUB_DEFAULT and saved default?

#8 lore raw

Re: [PATCH] document GRUB_DISABLE_SUBMENU

В Mon, 04 Nov 2013 14:15:40 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 4 lines

Could you add that toggling this requires changing default/GRUB_DEFAULT and saved default?

Like this?

From: Andrey Borzenkov <[email protected]>
To: [email protected]
Subject: [PATCH] document GRUB_DISABLE_SUBMENU

---
 docs/grub.texi | 9 +++++++++
 1 file changed, 9 insertions(+)
docs/grub.texi +9 -0
index fced603..bb9d50a 100644
@@ -1450,6 +1450,15 @@ Normally, @command{grub-mkconfig} will try to use the external
 systems installed on the same system and generate appropriate menu entries
 for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_DISABLE_SUBMENU
+Normally, @command{grub-mkconfig} will generate top level menu entry for
+the kernel with highest version number and put all other found kernels
+or alternative menu entries for recovery mode in submenu. For entries returned
+by @command{os-prober} first entry will be put on top level and all others
+in submenu. If this option is set to @samp{y}, flat menu with all entries
+on top level will be generated instead. Changing this option may require
+changing value of default boot entry.
+
 @item GRUB_ENABLE_CRYPTODISK
 If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
 check for encrypted disks and generate additional commands needed to access
Signature · 1 line
tg: (46522fb..) u/grub_disable_submenu (depends on: master)
#9 lore raw

Re: [PATCH] document GRUB_DISABLE_SUBMENU

Quoted 9 lines · Andrey Borzenkov

В Mon, 04 Nov 2013 14:15:40 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 4 lines

Could you add that toggling this requires changing default/GRUB_DEFAULT and saved default?

Like this?

I think it should be "will" not "may". And also explicit mention of default, fallback, GRUB_DEFAULT and grub-reboot/grub-set-default with links would be helpful

Quoted 38 lines

From: Andrey Borzenkov <[email protected]>
To: [email protected]
Subject: [PATCH] document GRUB_DISABLE_SUBMENU

---
 docs/grub.texi | 9 +++++++++
 1 file changed, 9 insertions(+)
docs/grub.texi +9 -0
index fced603..bb9d50a 100644
@@ -1450,6 +1450,15 @@ Normally, @command{grub-mkconfig} will try to use the external
 systems installed on the same system and generate appropriate menu entries
 for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_DISABLE_SUBMENU
+Normally, @command{grub-mkconfig} will generate top level menu entry for
+the kernel with highest version number and put all other found kernels
+or alternative menu entries for recovery mode in submenu. For entries returned
+by @command{os-prober} first entry will be put on top level and all others
+in submenu. If this option is set to @samp{y}, flat menu with all entries
+on top level will be generated instead. Changing this option may require
+changing value of default boot entry.
+
 @item GRUB_ENABLE_CRYPTODISK
 If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
 check for encrypted disks and generate additional commands needed to access

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#10 lore raw

Re: [PATCH] document GRUB_DISABLE_SUBMENU

В Mon, 04 Nov 2013 17:09:15 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 8 lines · Andrey Borzenkov
Quoted 7 lines

В Mon, 04 Nov 2013 14:15:40 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 4 lines

Could you add that toggling this requires changing default/GRUB_DEFAULT and saved default?

Quoted 5 lines
Quoted 2 lines

Like this?

I think it should be "will" not "may". And also explicit mention of default, fallback, GRUB_DEFAULT and grub-reboot/grub-set-default with links would be helpful

Default won't need to be changed if it already refers to top-level menu entry by ID or title (which does not change). Below is the best I could come up with without making it exceedingly large.

From: Andrey Borzenkov <[email protected]>
To: [email protected]
Subject: [PATCH] document GRUB_DISABLE_SUBMENU

---
 docs/grub.texi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
docs/grub.texi +12 -0
index ead8fbd..58e04e2 100644
@@ -1450,6 +1450,18 @@ Normally, @command{grub-mkconfig} will try to use the external
 systems installed on the same system and generate appropriate menu entries
 for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_DISABLE_SUBMENU
+Normally, @command{grub-mkconfig} will generate top level menu entry for
+the kernel with highest version number and put all other found kernels
+or alternative menu entries for recovery mode in submenu. For entries returned
+by @command{os-prober} first entry will be put on top level and all others
+in submenu. If this option is set to @samp{y}, flat menu with all entries
+on top level will be generated instead. Changing this option will require
+changing existing values of @samp{GRUB_DEFAULT}, @samp{fallback} (@pxref{fallback})
+and @samp{default} (@pxref{default}) environment variables as well as saved
+default entry using @command{grub-set-default} and value used with
+@command{grub-reboot}.
+
 @item GRUB_ENABLE_CRYPTODISK
 If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
 check for encrypted disks and generate additional commands needed to access
Signature · 1 line
tg: (9612ebc..) u/grub_disable_submenu (depends on: master)
#11 lore raw

Re: [PATCH] document GRUB_DISABLE_SUBMENU

Quoted 13 lines · Andrey Borzenkov

В Mon, 04 Nov 2013 17:09:15 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 10 lines · Andrey Borzenkov
Quoted 9 lines

В Mon, 04 Nov 2013 14:15:40 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 4 lines

Could you add that toggling this requires changing default/GRUB_DEFAULT and saved default?

Like this?

Quoted 9 lines
Quoted 3 lines

I think it should be "will" not "may". And also explicit mention of default, fallback, GRUB_DEFAULT and grub-reboot/grub-set-default with links would be helpful

Default won't need to be changed if it already refers to top-level menu entry by ID or title (which does not change). Below is the best I could come up with without making it exceedingly large.

Thank you. Go ahead.

Quoted 41 lines

From: Andrey Borzenkov <[email protected]>
To: [email protected]
Subject: [PATCH] document GRUB_DISABLE_SUBMENU

---
 docs/grub.texi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
docs/grub.texi +12 -0
index ead8fbd..58e04e2 100644
@@ -1450,6 +1450,18 @@ Normally, @command{grub-mkconfig} will try to use the external
 systems installed on the same system and generate appropriate menu entries
 for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_DISABLE_SUBMENU
+Normally, @command{grub-mkconfig} will generate top level menu entry for
+the kernel with highest version number and put all other found kernels
+or alternative menu entries for recovery mode in submenu. For entries returned
+by @command{os-prober} first entry will be put on top level and all others
+in submenu. If this option is set to @samp{y}, flat menu with all entries
+on top level will be generated instead. Changing this option will require
+changing existing values of @samp{GRUB_DEFAULT}, @samp{fallback} (@pxref{fallback})
+and @samp{default} (@pxref{default}) environment variables as well as saved
+default entry using @command{grub-set-default} and value used with
+@command{grub-reboot}.
+
 @item GRUB_ENABLE_CRYPTODISK
 If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
 check for encrypted disks and generate additional commands needed to access

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#12 lore raw

Re: [PATCH] document GRUB_DISABLE_SUBMENU

Quoted 60 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 13 lines · Andrey Borzenkov

В Mon, 04 Nov 2013 17:09:15 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 10 lines · Andrey Borzenkov
Quoted 9 lines

В Mon, 04 Nov 2013 14:15:40 +0100
Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]> пишет:

Quoted 4 lines

Could you add that toggling this requires changing default/GRUB_DEFAULT and saved default?

Like this?

Quoted 9 lines
Quoted 3 lines

I think it should be "will" not "may". And also explicit mention of default, fallback, GRUB_DEFAULT and grub-reboot/grub-set-default with links would be helpful

Default won't need to be changed if it already refers to top-level menu entry by ID or title (which does not change). Below is the best I could come up with without making it exceedingly large.

Thank you. Go ahead.

Quoted 36 lines

From: Andrey Borzenkov <[email protected]>
To: [email protected]
Subject: [PATCH] document GRUB_DISABLE_SUBMENU

---
  docs/grub.texi | 12 ++++++++++++
  1 file changed, 12 insertions(+)
docs/grub.texi +12 -0
index ead8fbd..58e04e2 100644
@@ -1450,6 +1450,18 @@ Normally, @command{grub-mkconfig} will try to use the external
  systems installed on the same system and generate appropriate menu entries
  for them.  Set this option to @samp{true} to disable this.
 
+@item GRUB_DISABLE_SUBMENU
+Normally, @command{grub-mkconfig} will generate top level menu entry for
+the kernel with highest version number and put all other found kernels
+or alternative menu entries for recovery mode in submenu. For entries returned
+by @command{os-prober} first entry will be put on top level and all others
+in submenu. If this option is set to @samp{y}, flat menu with all entries
+on top level will be generated instead. Changing this option will require
+changing existing values of @samp{GRUB_DEFAULT}, @samp{fallback} (@pxref{fallback})
+and @samp{default} (@pxref{default}) environment variables as well as saved
+default entry using @command{grub-set-default} and value used with
+@command{grub-reboot}.
+
  @item GRUB_ENABLE_CRYPTODISK
  If set to @samp{y}, @command{grub-mkconfig} and @command{grub-install} will
  check for encrypted disks and generate additional commands needed to access
Quoted 14 lines
Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

Is it not inconsistent to use y/n for GRUB_DISABLE_SUBMENU when all other variables accept true/false ?

#13 lore raw

Re: [PATCH] document GRUB_DISABLE_SUBMENU

В Sun, 10 Nov 2013 13:59:45 +0000
Barry Jackson <[email protected]> пишет:

Quoted 4 lines

Is it not inconsistent to use y/n for GRUB_DISABLE_SUBMENU when all other variables accept true/false ?

GRUB_ENABLE_CRYPTODISK is y/n as well. Both were not officially documented up to now so I'm fine with changing it. Feel free to submit a patch :)

#14 lore raw

Re: [PATCH] document GRUB_DISABLE_SUBMENU

Quoted 4 lines · Andrey Borzenkov

В Sun, 10 Nov 2013 13:59:45 +0000
Barry Jackson <[email protected]> пишет:

Quoted 1 line
Quoted 8 lines
Quoted 3 lines

Is it not inconsistent to use y/n for GRUB_DISABLE_SUBMENU when all other variables accept true/false ?

GRUB_ENABLE_CRYPTODISK is y/n as well. Both were not officially documented up to now so I'm fine with changing it. Feel free to submit a patch :)

For cryptodisk we need backwards-ompatible acceptance. For disable_submenu it's not necessary

Quoted 5 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel