ppc64le: fix issues with RAID1 metadata 1.0 partition detection
Resolves: #RHEL-186902 Signed-off-by: Rolv Apneseth <rapneset@redhat.com>
This commit is contained in:
parent
4c7635da39
commit
6b33b9724f
@ -0,0 +1,47 @@
|
||||
From 3d5fd0d7c5984338902f651882c76ec122e450ff 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 08c57ae..09f1065 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 98fcfb1..79145f8 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 df2f1f23de0b79c156c70a72667ab98d85a29050 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 162162b..c5cf20a 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -1385,7 +1385,12 @@ main (int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
- 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
|
||||
|
||||
@ -540,3 +540,5 @@ Patch0540: 0540-ieee1275-change-the-logic-of-ieee1275_get_devargs.patch
|
||||
Patch0541: 0541-ieee1275-ofpath-enable-NVMeoF-logical-device-transla.patch
|
||||
Patch0542: 0542-ieee1275-support-added-for-multiple-nvme-bootpaths.patch
|
||||
Patch0543: 0543-ieee1275-add-support-for-NVMeoFC.patch
|
||||
Patch0544: 0544-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch
|
||||
Patch0545: 0545-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
Name: grub2
|
||||
Epoch: 1
|
||||
Version: 2.06
|
||||
Release: 130%{?dist}
|
||||
Release: 131%{?dist}
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/grub/
|
||||
@ -546,6 +546,11 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jul 06 2026 Rolv Apneseth <rapneset@redhat.com> - 2.06-131
|
||||
- mdraid: fix metadata 1.0 detection in userspace utilities on IEEE1275
|
||||
- grub-install: use search.fs_uuid for RAID1 on IEEE1275
|
||||
- Resolves: #RHEL-186902
|
||||
|
||||
* Wed Jul 01 2026 Josue Hernandez <josherna@redhat.com> 2.06-130
|
||||
- Wait for initrmafs and kernel to be installed before set default kernel
|
||||
- Resolves: #RHEL-191464
|
||||
|
||||
Loading…
Reference in New Issue
Block a user