Enable the no_timer_check option to be removable

Turns out, some kernels on some versions of hardware, can
fail to boot when the hardware clock timer is not explicitly
checked. Normally, with virtual machines, you want to disable
the timer check, becuase the virutal machine inherently gets time
slices, and checking the timer can create issues booting.

Co-Authored-By: Ella Shulman <eshulman@redhat.com>
Change-Id: I8b9697ba60748bfe1e1e1914f24f207439cda2f1
This commit is contained in:
Julia Kreger 2024-01-04 09:35:52 -08:00
parent 72513f6bdf
commit 59831c10df
3 changed files with 12 additions and 1 deletions

View File

@ -27,3 +27,7 @@ Arguments
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``.

View File

@ -7,3 +7,4 @@ else
# DIB_BOOTLOADER_VIRTUAL_TERMINAL is set to empty string or other value
export DIB_BOOTLOADER_VIRTUAL_TERMINAL=${DIB_BOOTLOADER_VIRTUAL_TERMINAL}
fi
export DIB_NO_TIMER_CHECK=${DIB_NO_TIMER_CHECK:-"True"}

View File

@ -152,7 +152,13 @@ else
VIRTUAL_TERMINAL=""
fi
GRUB_CMDLINE_LINUX_DEFAULT="${VIRTUAL_TERMINAL} ${SERIAL_CONSOLE} no_timer_check"
if [[ "True" == "${DIB_NO_TIMER_CHECK:-True}" ]]; then
NO_TIMER_CHECK="no_timer_check"
else
NO_TIMER_CHECK=""
fi
GRUB_CMDLINE_LINUX_DEFAULT="${VIRTUAL_TERMINAL} ${SERIAL_CONSOLE} ${NO_TIMER_CHECK}"
echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT} ${DIB_BOOTLOADER_DEFAULT_CMDLINE}${BOOT_FS}${BOOT_FIPS}\"" >>/etc/default/grub
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub