diff --git a/diskimage_builder/elements/bootloader/README.rst b/diskimage_builder/elements/bootloader/README.rst index ce2147bc..56e17076 100644 --- a/diskimage_builder/elements/bootloader/README.rst +++ b/diskimage_builder/elements/bootloader/README.rst @@ -13,6 +13,6 @@ 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_BOOTLOADER_DEFAULT_CMDLINE`` sets the CMDLINE parameters that - are appended to the grub.cfg configuration. It defaults to - 'nofb nomodeset vga=normal' +* ``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 vga=normal``. diff --git a/diskimage_builder/elements/bootloader/finalise.d/50-bootloader b/diskimage_builder/elements/bootloader/finalise.d/50-bootloader index 0a6b0db6..75dfd78c 100755 --- a/diskimage_builder/elements/bootloader/finalise.d/50-bootloader +++ b/diskimage_builder/elements/bootloader/finalise.d/50-bootloader @@ -185,9 +185,8 @@ function install_grub2 { GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=${SERIAL_CONSOLE} no_timer_check" - echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT}\"" >>/etc/default/grub + echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT} ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"" >>/etc/default/grub echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub - sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub if type grub2-mkconfig >/dev/null; then GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG" diff --git a/releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml b/releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml new file mode 100644 index 00000000..643d22b9 --- /dev/null +++ b/releasenotes/notes/bootloader-commandline-d2db7524f1f9ad28.yaml @@ -0,0 +1,7 @@ +--- +other: + - It has been clarified that the ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` + variable appends its values to grubs + ``GRUB_CMDLINE_LINUX_DEFAULT``, which is used during all normal + boots but not rescue boots; as opposed to applying to + ``GRUB_CMDLINE_LINUX``