diff --git a/SOURCES/0328-grub2-mkconfig-Pass-all-boot-params-when-used-by-ana.patch b/SOURCES/0328-grub2-mkconfig-Pass-all-boot-params-when-used-by-ana.patch new file mode 100644 index 0000000..e74d3c6 --- /dev/null +++ b/SOURCES/0328-grub2-mkconfig-Pass-all-boot-params-when-used-by-ana.patch @@ -0,0 +1,37 @@ +From f4f134582912851628e15df4963b3b8a6652aa26 Mon Sep 17 00:00:00 2001 +From: Marta Lewandowska +Date: Tue, 29 Aug 2023 16:40:47 +0200 +Subject: [PATCH] grub2-mkconfig: Pass all boot params when used by anaconda + +Previous patch makes it so that the machine can boot, but not all +boot params are passed from /etc/default/grub to BLS snippets +because /etc/default/grub gets written by anaconda during boot +loader installation, long after grub rpms first got installed. + +Signed-off-by: Marta Lewandowska +--- + util/grub.d/10_linux.in | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in +index 76fc21fb6528..041a11529588 100644 +--- a/util/grub.d/10_linux.in ++++ b/util/grub.d/10_linux.in +@@ -265,9 +265,11 @@ if [ -z "\${kernelopts}" ]; then + fi + EOF + +- if [ "x${GRUB_UPDATE_BLS_CMDLINE}" = "xyes" ] || \ +- ( [ -w /etc/kernel ] && [[ ! -f /etc/kernel/cmdline ]] && \ +- [ "x${GRUB_GRUBENV_UPDATE}" = "xyes" ] ); then ++ if [ "x${GRUB_UPDATE_BLS_CMDLINE}" = "xyes" ] || [[ -d /run/install ]]; then ++ # only update the bls cmdline if the user specifically requests it or _anytime_ ++ # in the installer environment: /run/install directory only exists during the ++ # installation and not in cloud images, so this should get all the boot params ++ # from /etc/default/grub into BLS snippets + update_bls_cmdline + fi + +-- +2.41.0 + diff --git a/SOURCES/grub.patches b/SOURCES/grub.patches index 2f47a84..38f43d8 100644 --- a/SOURCES/grub.patches +++ b/SOURCES/grub.patches @@ -325,3 +325,4 @@ Patch0324: 0324-kern-ieee1275-init-Convert-plain-numbers-to-constant.patch Patch0325: 0325-kern-ieee1275-init-Extended-support-in-Vec5.patch Patch0326: 0326-efi-http-change-uint32_t-to-uintn_t.patch Patch0327: 0327-grub-mkconfig-dont-overwrite-BLS-cmdline-if-BLSCFG.patch +Patch0328: 0328-grub2-mkconfig-Pass-all-boot-params-when-used-by-ana.patch diff --git a/SPECS/grub2.spec b/SPECS/grub2.spec index b2e64d8..2ea0fa3 100644 --- a/SPECS/grub2.spec +++ b/SPECS/grub2.spec @@ -16,7 +16,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 69%{?dist} +Release: 70%{?dist}.1 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -533,6 +533,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog +* Tue Aug 29 2023 Nicolas Frayer - 2.06-70 +- grub2-mkconfig: Pass all boot params when used by anaconda +- Resolves: #RHEL-2185 + * Thu Aug 24 2023 Nicolas Frayer - 2.06-69 - grub2-mkconfig: dont overwrite BLS cmdline if BLSCFG is true - This is an updated version of the 2.06-67 patch