From 5f34e2843db7d936d8e8f12f9432ad7626382f6a Mon Sep 17 00:00:00 2001 From: Kyle MacLeod Date: Thu, 8 Jun 2023 23:25:46 -0400 Subject: [PATCH] Translate extra_boot_params into disk boot kernel options The extra_boot_params install value is presented as a single boot parameter in the initial miniboot ISO boot. This kickstart change translates the install value into proper disk boot kernel options, so that the provided extra_boot_params are applied as boot options for the main /boot parameters in grub and syslinux. Although the extra_boot_params value must be a single string, multiple extra boot parameters can be specified by separating individual args by a comma. Example: extra_boot_params=arg1=1,arg2=2. This change splits the args by comma and ensures that the kernel boot options are separate for the main boot. Test Plan PASS: - Verify that extra_boot_params is parsed into separate kernel options - Verify that disk kernel options are applied when subcloud is installed (i.e., the final install boots with the configured extra options) - Verify comma-separated input values are translated into proper kernel options: - extra_boot_params=arg1=1,arg2=2 -> kernel options: arg1=1 arg2=2 - extra_boot_params=arg1=1 -> kernel options: arg1=1 - extra_boot_params=arg1 -> kernel options: arg1 Partial-Bug: 2023407 Depends-On: https://review.opendev.org/c/starlingx/distcloud/+/885758 Change-Id: I8ed10f7ffe8af51ae7b77eaa398b824347a0a998 Signed-off-by: Kyle MacLeod --- kickstart/files/miniboot.cfg | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg index 3428610d..58ad6851 100644 --- a/kickstart/files/miniboot.cfg +++ b/kickstart/files/miniboot.cfg @@ -2534,6 +2534,13 @@ if [ ! -z "${insthwsettle}" ]; then fi fi +if [ -n "${extra_boot_params}" ]; then + # Strip out any commas and replace with space. + extra_boot_params=${extra_boot_params//,/ } # replace all ',' with ' ' + ilog "Adding extra_boot_params to kernel options: ${extra_boot_params}" + add_kernel_option "${extra_boot_params}" +fi + ######################################################################################## ilog "Adding these kernel params to disk boot: ${KERN_OPTS}"