Files
diskimage-builder/diskimage_builder/elements/bootloader
Julia Kreger 81355c4124 remove console entries when console is disabled
A huge problem with latency sensitive baremetal worklaods
is interrupts being triggered spuriously. Unfortunately
when we start with cloud images, often they default to
logging to a serial console which means every write is
an interrupt, which is far from ideal and can result
in packet loss and service degredation quite quickly.

So instead, if the console logging has been disabled,
and no virtual terminal has been defined, we now strip
the console entries from the resulting image.

In testing with Centos9 Stream, with booting a VM, the console
in this scenario jumps to the framebuffer once started, and
after thousands of lines being written to the console, even with
delays, locally I'm at 219 interrupts, with a bulk of the entries
coming from before I interacted with the console (~135 from just
boot).

Change-Id: Id9b19c4d9804b88e6db05a20e26c8264bb357734
2024-06-25 17:27:43 +00: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_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.
  • DIB_BOOTLOADER_USE_SERIAL_CONSOLE allows usage of a serial console 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, ttyAMA0,115200 for ARM64, otherwise ttyS0,115200.
  • DIB_BOOTLOADER_VIRTUAL_TERMINAL sets the virtual terminal be used as a console. It defaults to tty0. When explicitly set to an empty string then no virtual terminal console kernel argument is added.
  • DIB_NO_TIMER_CHECK allows the default kernel argument, no_timer_check to be removed from the kernel command line when the value is set to False.