Set grub timeout style

Set the grub timeout style to display the menu. By default it set to
'hidden' but can be changed to 'menu' to display the menu and then
wait for the timeout expire before booting the default entry.

Change-Id: I8c58407ef645d528dd77efe866bfe0389cbbbd33
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
This commit is contained in:
Maksim Malchuk 2023-09-15 18:11:15 +03:00
parent bccea6d5f0
commit 4fbf564615
3 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,11 @@ Arguments
* ``DIB_GRUB_TIMEOUT`` sets the ``grub`` menu timeout. It defaults to
5 seconds. Set this to 0 (no timeout) for fast boot times.
* ``DIB_GRUB_TIMEOUT_STYLE`` sets the visibility of the ``grub`` menu.
It defaults to ``hidden`` (or ``countdown`` as an alias). Set this to
``menu`` to display the menu and then wait for the timeout set by
``DIB_GRUB_TIMEOUT`` to expire before booting the default entry.
* ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` sets parameters that are appended
to the ``GRUB_CMDLINE_LINUX_DEFAULT`` values in ``grub.cfg``
configuration. It defaults to ``nofb nomodeset gfxpayload=text``.

View File

@ -85,6 +85,7 @@ fi
echo "GRUB_DEVICE=LABEL=${DIB_ROOT_LABEL}" >> /etc/default/grub
echo 'GRUB_DISABLE_LINUX_UUID=true' >> /etc/default/grub
echo "GRUB_TIMEOUT=${DIB_GRUB_TIMEOUT:-5}" >>/etc/default/grub
echo "GRUB_TIMEOUT_STYLE=${DIB_GRUB_TIMEOUT_STYLE:-hidden}" >>/etc/default/grub
echo 'GRUB_TERMINAL="serial console"' >>/etc/default/grub
echo 'GRUB_GFXPAYLOAD_LINUX=auto' >>/etc/default/grub

View File

@ -0,0 +1,7 @@
---
features:
- |
The ``bootloader`` element will explicitly set the timeout style to
``hidden`` to hide the menu. Set ``DIB_GRUB_TIMEOUT_STYLE`` to ``menu``
to display the menu and then wait for the timeout expire before booting
the default entry.