ppc64le: fix issues with RAID1 metadata 1.0 partition detection
Resolves: #RHEL-184859 Signed-off-by: Rolv Apneseth <rapneset@redhat.com>
This commit is contained in:
parent
db5c73de41
commit
1a232b2bbf
@ -0,0 +1,47 @@
|
||||
From 84442e366d27113d23a770cc17d145b6042e95d7 Mon Sep 17 00:00:00 2001
|
||||
From: Rolv Apneseth <rolv.apneseth@gmail.com>
|
||||
Date: Mon, 18 May 2026 09:58:18 +0100
|
||||
Subject: [PATCH] mdraid: fix metadata 1.0 detection in userspace utilities on
|
||||
IEEE1275
|
||||
|
||||
The powerpc guard in grub_mdraid_detect skips metadata 1.0 to avoid a
|
||||
firmware block issue, but also ends up applying to userspace utilities
|
||||
where reads will be going through the kernel. Extend the conditional
|
||||
with !defined(GRUB_UTIL) so utilities like grub-install can detect
|
||||
metadata 1.0 arrays.
|
||||
|
||||
Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>
|
||||
---
|
||||
grub-core/disk/mdraid1x_linux.c | 2 +-
|
||||
grub-core/disk/mdraid_linux.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/disk/mdraid1x_linux.c b/grub-core/disk/mdraid1x_linux.c
|
||||
index 3b5b6c423..f4cb048b4 100644
|
||||
--- a/grub-core/disk/mdraid1x_linux.c
|
||||
+++ b/grub-core/disk/mdraid1x_linux.c
|
||||
@@ -130,7 +130,7 @@ grub_mdraid_detect (grub_disk_t disk,
|
||||
struct grub_diskfilter_vg *array;
|
||||
char *uuid;
|
||||
|
||||
-#ifdef __powerpc__
|
||||
+#if defined(__powerpc__) && !defined(GRUB_UTIL)
|
||||
/* Firmware will yell at us for reading too far. */
|
||||
if (minor_version == 0)
|
||||
continue;
|
||||
diff --git a/grub-core/disk/mdraid_linux.c b/grub-core/disk/mdraid_linux.c
|
||||
index 98fcfb1be..79145f8e1 100644
|
||||
--- a/grub-core/disk/mdraid_linux.c
|
||||
+++ b/grub-core/disk/mdraid_linux.c
|
||||
@@ -189,7 +189,7 @@ grub_mdraid_detect (grub_disk_t disk,
|
||||
grub_uint32_t level;
|
||||
struct grub_diskfilter_vg *ret;
|
||||
|
||||
-#ifdef __powerpc__
|
||||
+#if defined(__powerpc__) && !defined(GRUB_UTIL)
|
||||
/* Firmware will yell at us for reading too far. */
|
||||
return NULL;
|
||||
#endif
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
From 01d7dfc89bc40b16363d6a5a5fe6089866706e80 Mon Sep 17 00:00:00 2001
|
||||
From: Rolv Apneseth <rolv.apneseth@gmail.com>
|
||||
Date: Mon, 18 May 2026 10:07:03 +0100
|
||||
Subject: [PATCH] grub-install: use search.fs_uuid for RAID1 on IEEE1275
|
||||
|
||||
On IEEE1275, grub-install hardcodes an mduuid prefix for RAID
|
||||
abstractions, requiring array assembly at boot. This fails on metadata
|
||||
1.0 partitions because detection is skipped due to a firmware issue.
|
||||
|
||||
Since RAID1 mirrors are individually readable, use search.fs_uuid on
|
||||
IEEE1275 to find the boot filesystem on any member partition and avoid
|
||||
requiring array assembly.
|
||||
|
||||
Signed-off-by: Rolv Apneseth <rolv.apneseth@gmail.com>
|
||||
---
|
||||
util/grub-install.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 314b6143b..746fc7346 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -1422,7 +1422,12 @@ main (int argc, char *argv[])
|
||||
debug_image);
|
||||
}
|
||||
|
||||
- if (!have_abstractions)
|
||||
+ int is_ieee1275_raid1 = have_abstractions
|
||||
+ && (platform == GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275)
|
||||
+ && grub_dev->disk
|
||||
+ && probe_raid_level (grub_dev->disk) == 1;
|
||||
+
|
||||
+ if (!have_abstractions || is_ieee1275_raid1)
|
||||
{
|
||||
if ((disk_module && grub_strcmp (disk_module, "biosdisk") != 0)
|
||||
|| grub_drives[1]
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@ -432,3 +432,5 @@ Patch0432: 0432-commands-efi-tpm.c-check-if-PCR-is-enable-before-TPM.patch
|
||||
Patch0433: 0433-tpm.c-disable-PCR8-measurements-at-the-configuration.patch
|
||||
Patch0434: 0434-Add-support-for-efi-keyword.patch
|
||||
Patch0436: 0435-Change-login-error-message.patch
|
||||
Patch0437: 0437-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch
|
||||
Patch0438: 0438-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
Name: grub2
|
||||
Epoch: 1
|
||||
Version: 2.12
|
||||
Release: 48%{?dist}
|
||||
Release: 49%{?dist}
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
License: GPL-3.0-or-later
|
||||
URL: http://www.gnu.org/software/grub/
|
||||
@ -593,6 +593,11 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jun 15 2026 Rolv Apneseth <rapneset@redhat.com> - 2.12-49
|
||||
- mdraid: fix metadata 1.0 detection in userspace utilities on IEEE1275
|
||||
- grub-install: use search.fs_uuid for RAID1 on IEEE1275
|
||||
- Resolves: #RHEL-184859
|
||||
|
||||
* Fri Jun 05 2026 Nicolas Frayer <nfrayer@redhat.com> - 2.12-48
|
||||
- Centos: sign grub with 802
|
||||
- Resolves: #RHEL-182485
|
||||
|
||||
Loading…
Reference in New Issue
Block a user