Fix kernel cmdline params getting overwritten on ppc64le

Resolves: rhbz#1973564

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2021-06-23 10:44:01 +02:00
parent 07b9866096
commit ea6c160b6a
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69
3 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 17 Jun 2021 14:31:42 +0200
Subject: [PATCH] Don't update the cmdline when generating legacy menuentry
commands
On OPAL ppc64le machines with an old petitboot version that doesn't have
support to parse BLS snippets, the grub2-mkconfig script is executed to
generate menuentry commands from the BLS snippets.
In this case, the script is executed with the --no-grubenv-update option
that indicates that no side effects should happen when running the script.
But the options field in the BLS snippets are updated regardless, only do
the update if --no-grubenv-update was not used.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
util/grub.d/10_linux.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 68adb55d893..c9296154f51 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -261,7 +261,9 @@ if [ -z "\${kernelopts}" ]; then
fi
EOF
- update_bls_cmdline
+ if [ "x${GRUB_GRUBENV_UPDATE}" = "xyes" ]; then
+ update_bls_cmdline
+ fi
if [ "x${BLS_POPULATE_MENU}" = "xtrue" ]; then
populate_menu

View File

@ -200,3 +200,4 @@ Patch0199: 0199-ieee1275-drop-HEAP_MAX_ADDR-HEAP_MIN_SIZE.patch
Patch0200: 0200-ieee1275-claim-more-memory.patch
Patch0201: 0201-ieee1275-request-memory-with-ibm-client-architecture.patch
Patch0202: 0202-xfs-Include-needsrepair-in-the-supported-incompat-fe.patch
Patch0203: 0203-Don-t-update-the-cmdline-when-generating-legacy-menu.patch

View File

@ -14,7 +14,7 @@
Name: grub2
Epoch: 1
Version: 2.06~rc1
Release: 8%{?dist}
Release: 9%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more
License: GPLv3+
URL: http://www.gnu.org/software/grub/
@ -555,6 +555,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%endif
%changelog
* Wed Jun 23 2021 Javier Martinez Canillas <javierm@redhat.com> - 2.06~rc1-9
- Fix kernel cmdline params getting overwritten on ppc64le
Resolves: rhbz#1973564
* Mon May 03 2021 Javier Martinez Canillas <javierm@redhat.com> - 2.06~rc1-8
- Add XFS needsrepair support
Resolves: rhbz#1940165