Hey folks, whats wrong? This BUG exists for nearly 11 months now, the fix isn't brain crunching at all and done with 6 lines of shell scripting.
Might any of the maintainers take over that task before the bug sees it's first birthday maybe? This "feature" is really annoying, especially having the grub GFXTERM at a high resolution where it takes 5 seconds to draw the menu itself. Also how can you call submenus a feature if a) the change was introduced silently (yeah i know the changelog talks about it)… b) there is no way to control the behaviour, since a feature should be something the user might or might not use? The upstream BUG lists 101 votes and i guess there are more people fed up with this submenu brainfuck and it should be worth to spent some minutes getting rid of it instead of waiting for someone else to fix it which did not happen in an appropriate time span! So lets see… we got all the things needed already… mkdir build && cd build apt-get source grub2 # takes a second cp -da grub2-2.00{,-orig} $EDITOR grub2-2.00/debian/default/grub $EDITOR grub2-2.00/util/grub.d/10_linux.in $EDITOR grub2-2.00/util/grub-mkconfig.in # wow fixed up 6 lines of code and a line of comment! diff -rup grub2-2.00-orig grub2-2.00 \ > grub2_disable_submenu.patch cd grub2-2.00 apt-get build-dep grub2 # leaves time for brewing coffee dch # oh we need to type numbers & letters here dpkg-source --commit # uh typing + copy & paste needed again dpkg-buildpackage # fetch the coffe and enjoy cd .. dpkg -i grub2_2.00-18+1_amd64.deb \ grub2-common_2.00-18+1_amd64.deb \ grub-pc_2.00-18+1_amd64.deb \ grub-pc-bin_2.00-18+1_amd64.deb \ grub-common_2.00-18+1_amd64.deb That ain't been to hard and i really, really enjoyed my cup of coffe!
diff -rup old/grub2-2.00/debian/default/grub new/grub2-2.00/debian/default/grub --- old/debian/default/grub 2013-01-29 07:31:57.000000000 +0100 +++ new/debian/default/grub 2013-08-31 16:34:26.508401840 +0200 @@ -28,5 +28,8 @@ GRUB_CMDLINE_LINUX="" # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" +# Uncomment to disable generation of submenu entries and list all kernels +#GRUB_DISABLE_SUBMENU="true" + # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" diff -rup old/grub2-2.00/util/grub.d/10_linux.in new/grub2-2.00/util/grub.d/10_linux.in --- old/util/grub.d/10_linux.in 2013-08-31 16:28:38.000000000 +0200 +++ new/util/grub.d/10_linux.in 2013-08-31 16:38:06.869413573 +0200 @@ -256,17 +256,19 @@ while [ "x$list" != "x" ] ; do 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}" != "xtrue" ]; then + if [ "x$is_first_entry" = xtrue ]; then + linux_entry "${OS}" "${version}" simple \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" - submenu_indentation="\t" + submenu_indentation="\t" - 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 linux_entry "${OS}" "${version}" advanced \ @@ -285,10 +287,12 @@ while [ "x$list" != "x" ] ; do is_first_entry=false done -# 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}" != "xtrue" ]; then + # 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 '}' + fi fi echo "$title_correction_code" diff -rup old/grub2-2.00/util/grub-mkconfig.in new/grub2-2.00/util/grub-mkconfig.in --- old/util/grub-mkconfig.in 2013-08-31 16:28:38.000000000 +0200 +++ new/util/grub-mkconfig.in 2013-08-31 16:33:14.157397988 +0200 @@ -228,7 +228,8 @@ export GRUB_DEFAULT \ 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"