diff --git a/diskimage_builder/elements/bootloader/README.rst b/diskimage_builder/elements/bootloader/README.rst index 17c5a1187..8dbe172cf 100644 --- a/diskimage_builder/elements/bootloader/README.rst +++ b/diskimage_builder/elements/bootloader/README.rst @@ -8,12 +8,12 @@ Arguments ========= * ``DIB_GRUB_TIMEOUT`` sets the ``grub`` menu timeout. It defaults to - 1 seconds. Set this to 0 (no timeout) for fast boot times. + 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. + It defaults to ``menu``. Set this to ``hidden`` (or ``countdown`` + as an alias) to not display the menu until the timeout is reached at + which point the default boot entry will be selected. * ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` sets parameters that are appended to the ``GRUB_CMDLINE_LINUX_DEFAULT`` values in ``grub.cfg`` @@ -23,7 +23,7 @@ Arguments to be disabled in the resulting image by setting to a value of ``False``. * ``DIB_BOOTLOADER_SERIAL_CONSOLE`` sets the serial device to be - used as a console. It defaults to ``hvc0`` for PowerPC, + used as a console. It defaults to ``hvc0`` for PowerPC, ``ttyAMA0,115200`` for ARM64, otherwise ``ttyS0,115200``. * ``DIB_BOOTLOADER_VIRTUAL_TERMINAL`` sets the virtual terminal be diff --git a/diskimage_builder/elements/bootloader/finalise.d/50-bootloader b/diskimage_builder/elements/bootloader/finalise.d/50-bootloader index f3e0c2f36..7b272fdc5 100755 --- a/diskimage_builder/elements/bootloader/finalise.d/50-bootloader +++ b/diskimage_builder/elements/bootloader/finalise.d/50-bootloader @@ -116,8 +116,14 @@ fi append_or_replace /etc/default/grub GRUB_DEVICE "LABEL=${DIB_ROOT_LABEL}" append_or_replace /etc/default/grub GRUB_DISABLE_LINUX_UUID true -append_or_replace /etc/default/grub GRUB_TIMEOUT "${DIB_GRUB_TIMEOUT:-1}" -append_or_replace /etc/default/grub GRUB_TIMEOUT_STYLE "${DIB_GRUB_TIMEOUT_STYLE:-hidden}" +# Please do not change these defaults unless the change is to only set our +# overrides when overrides are present. The current defaults are based on +# upstream Grub defaults. These values are clearly contentious with different +# groups wanting different values. For this reason we pick the current GRUB +# defaults and stick to them. The only exception should be an update to +# fall through to GRUB using its own defaults. +append_or_replace /etc/default/grub GRUB_TIMEOUT "${DIB_GRUB_TIMEOUT:-5}" +append_or_replace /etc/default/grub GRUB_TIMEOUT_STYLE "${DIB_GRUB_TIMEOUT_STYLE:-menu}" if [[ "True" == "${DIB_BOOTLOADER_USE_SERIAL_CONSOLE:-True}" ]]; then append_or_replace /etc/default/grub GRUB_TERMINAL \""serial console"\" else diff --git a/releasenotes/notes/grub_style-dfafe48d719f5579.yaml b/releasenotes/notes/grub_style-dfafe48d719f5579.yaml new file mode 100644 index 000000000..129ed0ea4 --- /dev/null +++ b/releasenotes/notes/grub_style-dfafe48d719f5579.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + Change default values for ``DIB_GRUB_TIMEOUT_STYLE`` and + ``DIB_GRUB_TIMEOUT``. The default value for ``DIB_GRUB_TIMEOUT_STYLE`` + will be ``menu`` and for ``DIB_GRUB_TIMEOUT`` will be ``5``. These + values are based on current GRUB defaults.