Grub 2 1.97 Beta 4 Hidden Menu No Longer Works

Bug #444495 reported by drs305
108
This bug affects 19 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: grub-pc

grub-pc Version: 1.97~beta3-1ubuntu6

The hidden menu feature of Grub 2 no longer works. It worked in either Beta 1 or 2 but now the entries in /etc/default/grub no longer seem to have any effect. The menu displays regardless of the following settings. Mine are currently set to:
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=5
GRUB_HIDDEN_TIMEOUT_QUIET=true
#GRUB_TIMEOUT="4"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

To confirm this, I have tried it with te GRUB_TIMEOUT line commented out and not. This has no effect.

This script, named as /etc/grub.d/06_hidden_menu, is reported to work, from UF thread http://ubuntuforums.org/showthread.php?p=7731488&highlight=press+esc+menu#post7731488#116

#!/bin/sh
echo "Adding hidden menu" >&2
cat << EOF
echo -n "Press ESC for the menu... "
if sleep --verbose --interruptible ${GRUB_TIMEOUT} ; then
set timeout=0
else
set timeout=-1
fi
EOF

ProblemType: Bug
Architecture: i386
Date: Tue Oct 6 07:46:32 2009
DistroRelease: Ubuntu 9.10
Package: grub-pc 1.97~beta3-1ubuntu6
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-11.36-generic
SourcePackage: grub2
Uname: Linux 2.6.31-11-generic i686

Revision history for this message
drs305 (drs305) wrote :
Revision history for this message
drs305 (drs305) wrote :

This is no longer an issue.
Grub2 Version: 1.97~beta3-1ubuntu8

Revision history for this message
cheesypoof (cheesypoof-deactivatedaccount) wrote :

With version 1.97~beta3-1ubuntu8 I am still not seeing it fixed.

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=3
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT="3"

There is still no evidence of any hidden timeout settings being imported into '/boot/grub/grub.cfg' and testing confirmed no difference in behavior. drs305 if this supposedly works for you, then post the evidence of the settings from your grub.cfg file. On a side note, commenting out the timeout line simply defaults the setting to 5.

Revision history for this message
drs305 (drs305) wrote :

Turns out the ONLY way I can hide the menu is with the one setting I was using after the latest grub update.

I test booted about 25 times with various settings and the only one which would hide the menu during boot was the one with this line included:

GRUB_DISABLE_OS-PROBER="true"

Making the value "false" or commenting the line does not work. Of course, I can hide my menu but with this line I lose my ability to probe for kernels on other partitions unless I put it in a custom script.

So the 'hidden' feature is still broken.

Still getting all the messages onscreen after grub and prior to the logon splash too, by the way.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
cheesypoof (cheesypoof-deactivatedaccount) wrote :

Problem still present in 1.97~beta4-1ubuntu1.

summary: - Grub 2 1.97 Beta 3 Hidden Menu No Longer Works
+ Grub 2 1.97 Beta 4 Hidden Menu No Longer Works
Revision history for this message
Jim Popovitch (jimpop) wrote :

Yes, problem still exists.

Revision history for this message
andypiper (andypiperuk) wrote :

This was working fine for me, but one of the latest nightly updates may have broken it - the grub menu is now appearing on boot, which is weird.

Revision history for this message
Jonathan Blackhall (johnny-one-eye) wrote :

Just curious, but for people who are unable to have a hidden menu, do you have more than 1 OS on your computer? It seems like update-grub is not correctly pulling the value of GRUB_HIDDEN_TIMEOUT into grub.cfg. Is anyone with only Karmic installed on their machine experiencing this bug of not being able to hide the Grub menu?

Revision history for this message
Jim Popovitch (jimpop) wrote :

Yep, 2 OSes configured. Honestly, it's NOT that big of a deal... but it is still a bug. Don't let it hold up the release :-)

Revision history for this message
drs305 (drs305) wrote :

Jonathan,

I run a 64-bit desktop with only Ubuntu releases and a 32-bit laptop with XP and Karmic. The Desktop hides the menu fine, the laptop hidden menu still doesn't work.

The only difference in the setups other than 32/64 bit is that the one which refuses to hide the menu is dual booting with XP. So anecdotally at least this supports your suspicion.

Loving Grub 2,

drs305
Dave

Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote :

Yes, I've always seen the grub2 menu here, since installing the alpha, right up to date.

I *do* have another OS installed; the Windows XP the machine originally came with (that I never use, but it *is* there...)

Also there's a pile of menu entries for most if not all of the past kernel versions since the original install.

I got the impression that the script responsible for this is in /etc/grub.d/00_header; but a quick look through there shows me that it doesn't even reference GRUB_HIDDEN_TIMEOUT. It is in 03_os_prober though, so I'm going to try the tip given above to turn that off.

Presumably that means I lose the WinXP menu entry (when I do view the menu?)

Will report back in a mo with what happened...

Revision history for this message
Rachel Greenham (rachel-strangenoises) wrote :

Yes, doing that worked, but with the (little-lamented) loss of my WinXP boot menu entry. In any case an easy way to get that back was to re-enable the os-prober, run update-grub, then copy the winxp menu entry to the end of /etc/grub.d/40_custom. That's just my workaround for now; ideally we want 30_os_prober to do its stuff, add the menu entries, but still offer no menu if that's what the user wants.

Anyway, to be specific, as the note above which suggested the os-prober had a typo, the "fix" was to append the following line to /etc/default/grub:

GRUB_DISABLE_OS_PROBER="true"

(not OS-PROBER)

Then run update-grub

The text "Grub Loading..." still flashes up momentarily. Can we get rid of that next? :-)

Revision history for this message
BarisBlaq (barisblaq) wrote :

I have the same problem.

I had a fresh install of Karmic RC, and the menu was hidden out of the box. Then I edited /etc/default/grub (to add acpi=off) and now I can't get rid of the menu no matter what. GRUB_DISABLE_OS_PROBER didn't work for me.

My current settings are:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="acpi=off"
GRUB_DISABLE_OS_PROBER="true"

I guess it is the "update-grub" to blame, for I only added "acpi-off" on a fresh install (which hid the menu successfully) and when I update-grub the menu sticks..

Revision history for this message
EricDHH (ericdhh) wrote :

Confirmed, only one little change on the /etc/default/grub file force the menu without configurable timeout settings. I tried 0 and 1 as timeout here.

GRUB_DEFAULT=0
GRUB_TIMEOUT=1
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=noop"
GRUB_CMDLINE_LINUX=""

Version grub-pc: 1.97~beta4-1ubuntu4

Eric

Revision history for this message
EricDHH (ericdhh) wrote :

Second machine affected by this problem, found the reason in synaptic!

Update 4.11.2009: grub-common (1.97~beta4-1ubuntu3) to 1.97~beta4-1ubuntu4

Eric

Revision history for this message
drs305 (drs305) wrote :

Version grub-pc: 1.97~beta4-1ubuntu4

Grub2 would not hide menu with normal hidden settings (First section, attch grub.examples)
Added "GRUB_DISABLE_OS_PROBER=true" to /etc/default/grub, which allows hidden menu and hidden timeout (Second section, attch grub.examples)
By adding the "GRUB_DISABLE_OS_PROBER=true", it adds the following lines to grub.cfg, which I presume allow the menu to be hidden:
### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if sleep --verbose --interruptible 180 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/30_os-prober ###

So far, disabling the 30_os-prober is the only method I can use to hide the menu on this laptop (32-bit, Karmic 9.10, general release iso, fresh install)

Both sections of the attachment "grub.examples" contain the grub and grub.cfg contents.

Revision history for this message
ScottHW (publicw) wrote :

Lengthy description on the forums....
http://ubuntuforums.org/showthread.php?t=1319672

While we didn't figure out the actual root cause of this problem, drs305 has pretty well diagnosed all the symptoms and has a near-perfect working solution. I'll let him tell you all about it.

I would say that since the code does NOT perform as designed, and described in the documentation (RTFM)
https://help.ubuntu.com/community/Grub2

This should be considered a bug, even if the overall effects are small. After upgrading to GRUB 2, I just wanted to get the exact same user interaction behavior as I had with GRUB (legacy), and this bug prevents that from being the case.

Revision history for this message
drs305 (drs305) wrote :

Here is some more info for people still unable to hide the menu via the normal entries in /etc/default/grub.

Earlier I suggested adding "GRUB_DISABLE_OS_PROBER=true"

I've now found a way to keep os-prober active and to get the hidden menu and hidden timeout features.

Open /etc/grub.d/00_header as root:

Add this to the end of the file. "18" in this sample will hide the menu for 18 seconds:
Quote:
### BEGIN Hidden Menu Test ###
cat << EOF
if [ ${timeout} != -1 ]; then
if sleep --verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
set timeout=${GRUB_HIDDEN_TIMEOUT}
fi
fi
EOF
### END Hidden Menu Test ###
Save the file and run update-grub

1. The menu will be hidden for 18 seconds. Change the value as you wish. In this hack GRUB_HIDDEN_TIMEOUT prefers a blank to "0" if you don't want to hide the menu, although 0 will also work.
2. The GRUB_TIMEOUT value in /etc/default/grub will be honored. If and when the menu is displayed, it will be displayed for the value of this line and then boot the default OS.
3. The GRUB_HIDDEN_TIMEOUT line will be used.
4. The GRUB_HIDDEN_TIMEOUT_QUIET line will be honored.
5. You do not need the "GRUB_DISABLE_OS_PROBER" line in /etc/default/grub, so the menu will be hidden and it will search for other OS's.

This is just a hack to get the menu to hide. It is not a long term or even 'pretty' solution.

Revision history for this message
Pete (pete123) wrote :

A quick work-around is to change the line in /etc/grub.d/30_os-prober at ~line 28 that says
  if [ "x${found_other_os}" = "x" ] ; then

to

  if [ true ] ; then

Probably the better method would be to create a new option in /etc/default/grub so it's easy to enable the menu if dual booters wish to see it by default,

Add the following to /etc/default/grub
GRUB_FORCE_HIDDEN=true

Then in /etc/grub.d/30_os-osprober
find the line
  if [ "x${found_other_os}" = "x" ] ; then

(around line 28)

and change it to
   if [ "x${found_other_os}" = "x" ] || [ "x${GRUB_FORCE_HIDDEN}" = "xtrue" ] ; then

Which checks if GRUB_FORCE_HIDDEN is true, otherwise continue with the default behavior. This allows you to re-enable the menu by changing GRUB_FORCE_HIDDEN to false if you wish to see the menu again.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.