7

The hidden menu option isn't working. I want the menu to remain hidden during boot but show up when I press a button.

I have /etc/default/grub configured as follows:

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

With the settings:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=10
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0

The menu doesn't appear if I press nothing, and I can tell the computer is waiting 10 seconds to boot. The problem is no matter what I press (Esc, Tab, Shift, Enter) and no matter when I press it or if/when I hold it, I can't get the menu to come up. The only thing that appears is the text: Grub Loading...

Any suggestions would be greatly appreciated!

karel
  • 114,770
Eric
  • 71

2 Answers2

5

This solution by Bolodya @ bugs.launchapd.net worked for me:

I had the same problem - cant access to grub menu by esc or shift keys during boot if I tried to hide it (I have windows and ubuntu on one disk).

The reason is one strange condition in /etc/grub.d/30_os-prober script. it bloks hidden menu part of grub.cfg if os-probber found any other os.

So for me works the following:

  1. In the file /etc/grub.d/30_os-prober

    • comment line 33: if [ "x${found_other_os}" = "x" ] ; then
    • and comment closing it "fi" at line 67
  2. Sudo update-grub

After that if you have GRUB_HIDDEN_TIMEOUT >=1 then you can access to grub menu by esc key during this timeout, if you have GRUB_HIDDEN_TIMEOUT =0 then you can access to grub menu if you press "shift" during grub startup, and no hidden menu if GRUB_HIDDEN_TIMEOUT =-1.

For me the lines were 32 and 66 respectively

copycat
  • 51
0

The line that says
GRUB_HIDDEN_TIMEOUT_QUIET=true is right.
I think you also need to change GRUB_TIMEOUT=0 instead of 5 and GRUB_HIDDEN_TIMEOUT=10 to make the menu not show up unless the Shift key is held during boot.

You may want to set a time smaller than 10 seconds (3-5 works for me) or you'll be waiting a while before GRUB boots the kernel.

Let me know if this is still not working for you!

reference

Mark Paskal
  • 2,900
  • I think that the OP want to hide the post. – Lucio Mar 17 '13 at 04:56
  • @Lucio thank-you, I edited my answer – Mark Paskal Mar 17 '13 at 14:29
  • I should have clarified my question. With this configuration: GRUB_TIMEOUT=0 and GRUB_HIDDEN_TIMEOUT=0 I can't access the menu at all. I also tried to set GRUB_HIDDEN_TIMEOUT=10 and other combinations but I can't get the menu to hide at first, but appear if I press esc, shift, tab, enter, etc. My goal is to make the menu hidden by default, but if I press a button, the menu to appear. Thanks again. – Eric Mar 17 '13 at 23:41
  • @Eric GRUB_HIDDEN_TIMEOUT=10 should do the trick, then. I'm pretty sure you need to hold down the shift key during boot (after the BIOS / logo screen) and then the menu should show up. – Mark Paskal Mar 18 '13 at 22:09
  • @MarkPaskal I couldn't get shift or any other key to bring up the menu. is it possible my laptop won't recognize it's pressed? – Eric Mar 19 '13 at 13:45
  • @Eric I don't know why shift wouldn't work; my understanding is it's the default and I can't seem to find where to change it to another key... You could try the other shift key on your keyboard (assuming there is a second one) or try the shift on a usb keyboard to see if the problem is with your laptop's keyboard. Are you holding shift or just pressing it? Have you tried any other keys? You might try tapping the Esc key during the hidden count-down as well. – Mark Paskal Mar 19 '13 at 22:55
  • @MarkPaskal It's weird, no matter what key I press, or how long or when I hold it, I can't get the menu to load. I also tried the usb keyboard. I can tell the computer is waiting the 10 seconds to load the default OS, but I can't get the menu to appear. Also worth noting, Even if I turn GRUB_HIDDEN_TIMEOUT_QUIET=true to GRUB_HIDDEN_TIMEOUT_QUIET=false, I can't get the countdown to appear... not sure what else to try... I've been looking at other boot managers, but I couldn't find one with a hidden menu function like GRUB's. Any suggestions for that? – Eric Mar 22 '13 at 23:29
  • @Eric Not a clue on that note, sorry. – Mark Paskal Mar 25 '13 at 04:19
  • @MarkPaskal I'm researching this issue today and wondered if you ever had the solution working for yourself? ie background screen image (or black screen if you have no image file) with no menu text unless you press a given key? – WinEunuuchs2Unix Apr 18 '17 at 23:28