Gentoo Archives: gentoo-user

From: Daniel Frey <djqfrey@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] grub2: hidden menu unless shift pressed?
Date: Sat, 17 Feb 2018 20:58:55
Message-Id: 7ce7b0f1-b28b-9019-485c-784192a5b056@gmail.com
In Reply to: [gentoo-user] grub2: hidden menu unless shift pressed? by Grant Edwards
1 On 02/17/18 12:36, Grant Edwards wrote:
2 > I'm trying to figure out how to configure grub 2.02 so that no menu is
3 > displayed and it will boot immediately to the default unless shift is
4 > held down during boot -- in which case it displays the menu and waits
5 > indefinitely for a choice to be made.
6 >
7 > This is a bare-bones grub2 installation without any of the
8 > auto-magical, config generator scripts. All I have is grub.cfg and an
9 > editor.
10 >
11 > I've found many web pages that say all you have to to is edit
12 > /etc/default/grub and set GRUB_TIMEOUT=0 and GRUB_HIDDEN_TIMEOUT=0 and
13 > Bob's your uncle. Of course that file gets mashed about by dozens of
14 > shell scripts comprising thousands of lines of code to product the
15 > real grub.cfg containing hundreds of lines of code.
16 >
17 > [Oh God, how I hate grub2.]
18 >
19 > AFAICT, you end up with
20 >
21 > set timeout=0
22 > set timeout_style=hidden
23 >
24 > But, that doesn't seem to work. Holding down the shift key during boot
25 > doesn't cause the menu to be displayed, and it always boots directly
26 > to the default no matter what you do.
27 >
28 > Any grub2 experts care to lend a clue?
29 >
30
31 It's been a while since I've done this, but I thought the hotkey was ESC
32 not shift?
33
34 All I had to do was use:
35
36 GRUB_TIMEOUT=0
37 GRUB_HIDDEN_TIMEOUT=5
38
39 Grub will wait for the escape key to be pressed for 5 seconds, if no
40 keypress, it would boot.
41
42 Dan

Replies

Subject Author
Re: [gentoo-user] grub2: hidden menu unless shift pressed? Tom H <tomh0665@×××××.com>