diskimage-builder/diskimage_builder/elements/bootloader
Steve Baker 9987d0911a Move grub-install to the end, and skip for partition images
The bootloader element installs the grub bootloader for whole-disk
images, but it also correctly sets values in /etc/default/grub and BLS
entries.

This value setting is useful even if the bootloader isn't installed.
For example, the overcloud-full partition image benefits from a
correct /etc/default/grub and BLS entries which ironic-python-agent
will use when it installs grub on the disk during baremetal deploy.

This change moves the actual grub install to the end of the script,
and if there is no $DIB_BLOCK_DEVICE set then install is skipped.

This allows overcloud-full to use the bootloader element instead of
the grub2 element, so the correct grub defaults are set on centos9,
including the correct root device on centos9.

Change-Id: I8cb34914bbbfa05521bbb71cc6637368b980358f
2022-03-21 08:43:48 +13:00
..
environment.d update grub cmdline to current kernel parameters 2020-06-14 00:39:42 -05:00
finalise.d Move grub-install to the end, and skip for partition images 2022-03-21 08:43:48 +13:00
pkg-map RHEL/Centos 9 does not have package grub2-efi-x64-modules 2021-09-13 09:32:53 +12:00
README.rst bootloader: remove extlinux/syslinux path 2021-05-13 10:33:06 +10:00

==========
bootloader
==========

Installs ``grub[2]`` on boot partition on the system.

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 parameters that are appended
  to the ``GRUB_CMDLINE_LINUX_DEFAULT`` values in ``grub.cfg``
  configuration. It defaults to ``nofb nomodeset gfxpayload=text``.

* ``DIB_BOOTLOADER_SERIAL_CONSOLE`` sets the serial device to be
  used as a console. It defaults to ``hvc0`` for PowerPC, 
  ``ttyAMA0,115200`` for ARM64, otherwise ``ttyS0,115200``.