Merge branch 'cjwatson/timeout-style'
This commit is contained in:
commit
44d4884779
6 changed files with 287 additions and 54 deletions
102
docs/grub.texi
102
docs/grub.texi
|
@ -1298,23 +1298,26 @@ a key is pressed. The default is @samp{5}. Set to @samp{0} to boot
|
|||
immediately without displaying the menu, or to @samp{-1} to wait
|
||||
indefinitely.
|
||||
|
||||
@item GRUB_HIDDEN_TIMEOUT
|
||||
Wait this many seconds for @key{ESC} to be pressed before displaying the menu.
|
||||
If no @key{ESC} is pressed during that time, display the menu for the number of
|
||||
seconds specified in GRUB_TIMEOUT before booting the default entry. We expect
|
||||
that most people who use GRUB_HIDDEN_TIMEOUT will want to have GRUB_TIMEOUT set
|
||||
to @samp{0} so that the menu is not displayed at all unless @key{ESC} is
|
||||
pressed.
|
||||
Unset by default.
|
||||
If @samp{GRUB_TIMEOUT_STYLE} is set to @samp{countdown} or @samp{hidden},
|
||||
the timeout is instead counted before the menu is displayed.
|
||||
|
||||
@item GRUB_HIDDEN_TIMEOUT_QUIET
|
||||
In conjunction with @samp{GRUB_HIDDEN_TIMEOUT}, set this to @samp{true} to
|
||||
suppress the verbose countdown while waiting for a key to be pressed before
|
||||
displaying the menu. Unset by default.
|
||||
@item GRUB_TIMEOUT_STYLE
|
||||
If this option is unset or set to @samp{menu}, then GRUB will display the
|
||||
menu and then wait for the timeout set by @samp{GRUB_TIMEOUT} to expire
|
||||
before booting the default entry. Pressing a key interrupts the timeout.
|
||||
|
||||
If this option is set to @samp{countdown} or @samp{hidden}, then, before
|
||||
displaying the menu, GRUB will wait for the timeout set by
|
||||
@samp{GRUB_TIMEOUT} to expire. If @key{ESC} is pressed during that time, it
|
||||
will display the menu and wait for input. If a hotkey associated with a
|
||||
menu entry is pressed, it will boot the associated menu entry immediately.
|
||||
If the timeout expires before either of these happens, it will boot the
|
||||
default entry. In the @samp{countdown} case, it will show a one-line
|
||||
indication of the remaining time.
|
||||
|
||||
@item GRUB_DEFAULT_BUTTON
|
||||
@itemx GRUB_TIMEOUT_BUTTON
|
||||
@itemx GRUB_HIDDEN_TIMEOUT_BUTTON
|
||||
@itemx GRUB_TIMEOUT_STYLE_BUTTON
|
||||
@itemx GRUB_BUTTON_CMOS_ADDRESS
|
||||
Variants of the corresponding variables without the @samp{_BUTTON} suffix,
|
||||
used to support vendor-specific power buttons. @xref{Vendor power-on keys}.
|
||||
|
@ -1489,6 +1492,44 @@ Each module will be loaded as early as possible, at the start of
|
|||
|
||||
@end table
|
||||
|
||||
The following options are still accepted for compatibility with existing
|
||||
configurations, but have better replacements:
|
||||
|
||||
@table @samp
|
||||
@item GRUB_HIDDEN_TIMEOUT
|
||||
Wait this many seconds before displaying the menu. If @key{ESC} is pressed
|
||||
during that time, display the menu and wait for input according to
|
||||
@samp{GRUB_TIMEOUT}. If a hotkey associated with a menu entry is pressed,
|
||||
boot the associated menu entry immediately. If the timeout expires before
|
||||
either of these happens, display the menu for the number of seconds
|
||||
specified in @samp{GRUB_TIMEOUT} before booting the default entry.
|
||||
|
||||
If you set @samp{GRUB_HIDDEN_TIMEOUT}, you should also set
|
||||
@samp{GRUB_TIMEOUT=0} so that the menu is not displayed at all unless
|
||||
@key{ESC} is pressed.
|
||||
|
||||
This option is unset by default, and is deprecated in favour of the less
|
||||
confusing @samp{GRUB_TIMEOUT_STYLE=countdown} or
|
||||
@samp{GRUB_TIMEOUT_STYLE=hidden}.
|
||||
|
||||
@item GRUB_HIDDEN_TIMEOUT_QUIET
|
||||
In conjunction with @samp{GRUB_HIDDEN_TIMEOUT}, set this to @samp{true} to
|
||||
suppress the verbose countdown while waiting for a key to be pressed before
|
||||
displaying the menu.
|
||||
|
||||
This option is unset by default, and is deprecated in favour of the less
|
||||
confusing @samp{GRUB_TIMEOUT_STYLE=countdown}.
|
||||
|
||||
@item GRUB_HIDDEN_TIMEOUT_BUTTON
|
||||
Variant of @samp{GRUB_HIDDEN_TIMEOUT}, used to support vendor-specific power
|
||||
buttons. @xref{Vendor power-on keys}.
|
||||
|
||||
This option is unset by default, and is deprecated in favour of the less
|
||||
confusing @samp{GRUB_TIMEOUT_STYLE=countdown} or
|
||||
@samp{GRUB_TIMEOUT_STYLE=hidden}.
|
||||
|
||||
@end table
|
||||
|
||||
For more detailed customisation of @command{grub-mkconfig}'s output, you may
|
||||
edit the scripts in @file{/etc/grub.d} directly.
|
||||
@file{/etc/grub.d/40_custom} is particularly useful for adding entire custom
|
||||
|
@ -2477,15 +2518,16 @@ menu requires several fancy features of your terminal.
|
|||
@node Vendor power-on keys
|
||||
@chapter Using GRUB with vendor power-on keys
|
||||
|
||||
Some laptop vendors provide an additional power-on button which boots another
|
||||
OS. GRUB supports such buttons with the @samp{GRUB_TIMEOUT_BUTTON},
|
||||
@samp{GRUB_DEFAULT_BUTTON}, @samp{GRUB_HIDDEN_TIMEOUT_BUTTON} and
|
||||
Some laptop vendors provide an additional power-on button which boots
|
||||
another OS. GRUB supports such buttons with the @samp{GRUB_TIMEOUT_BUTTON},
|
||||
@samp{GRUB_TIMEOUT_STYLE_BUTTON}, @samp{GRUB_DEFAULT_BUTTON}, and
|
||||
@samp{GRUB_BUTTON_CMOS_ADDRESS} variables in default/grub (@pxref{Simple
|
||||
configuration}). @samp{GRUB_TIMEOUT_BUTTON}, @samp{GRUB_DEFAULT_BUTTON} and
|
||||
@samp{GRUB_HIDDEN_TIMEOUT_BUTTON} are used instead of the corresponding
|
||||
variables without the @samp{_BUTTON} suffix when powered on using the special
|
||||
button. @samp{GRUB_BUTTON_CMOS_ADDRESS} is vendor-specific and partially
|
||||
model-specific. Values known to the GRUB team are:
|
||||
configuration}). @samp{GRUB_TIMEOUT_BUTTON},
|
||||
@samp{GRUB_TIMEOUT_STYLE_BUTTON}, and @samp{GRUB_DEFAULT_BUTTON} are used
|
||||
instead of the corresponding variables without the @samp{_BUTTON} suffix
|
||||
when powered on using the special button. @samp{GRUB_BUTTON_CMOS_ADDRESS}
|
||||
is vendor-specific and partially model-specific. Values known to the GRUB
|
||||
team are:
|
||||
|
||||
@table @key
|
||||
@item Dell XPS M1330M
|
||||
|
@ -3030,6 +3072,7 @@ These variables have special meaning to GRUB.
|
|||
* superusers::
|
||||
* theme::
|
||||
* timeout::
|
||||
* timeout_style::
|
||||
@end menu
|
||||
|
||||
|
||||
|
@ -3462,8 +3505,21 @@ keyboard input before booting the default menu entry. A timeout of @samp{0}
|
|||
means to boot the default entry immediately without displaying the menu; a
|
||||
timeout of @samp{-1} (or unset) means to wait indefinitely.
|
||||
|
||||
This variable is often set by @samp{GRUB_TIMEOUT} or
|
||||
@samp{GRUB_HIDDEN_TIMEOUT} (@pxref{Simple configuration}).
|
||||
If @samp{timeout_style} (@pxref{timeout_style}) is set to @samp{countdown}
|
||||
or @samp{hidden}, the timeout is instead counted before the menu is
|
||||
displayed.
|
||||
|
||||
This variable is often set by @samp{GRUB_TIMEOUT} (@pxref{Simple
|
||||
configuration}).
|
||||
|
||||
|
||||
@node timeout_style
|
||||
@subsection timeout_style
|
||||
|
||||
This variable may be set to @samp{menu}, @samp{countdown}, or @samp{hidden}
|
||||
to control the way in which the timeout (@pxref{timeout}) interacts with
|
||||
displaying the menu. See the documentation of @samp{GRUB_TIMEOUT_STYLE}
|
||||
(@pxref{Simple configuration}) for details.
|
||||
|
||||
|
||||
@node Environment block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue