public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/grub2] rawhide: Fix issues with RAID1 metadata 1.0 partitions on IEEE1275
@ 2026-06-15 15:35 Rolv Apneseth
  0 siblings, 0 replies; only message in thread
From: Rolv Apneseth @ 2026-06-15 15:35 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/grub2
            Branch : rawhide
            Commit : 74f17e9bd2f2fccbb8179b235a931731325cdec8
            Author : Rolv Apneseth <rolv.apneseth@gmail.com>
            Date   : 2026-06-15T15:20:01+01:00
            Stats  : +93/-1 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/grub2/c/74f17e9bd2f2fccbb8179b235a931731325cdec8?branch=rawhide

            Log:
            Fix issues with RAID1 metadata 1.0 partitions on IEEE1275

Signed-off-by: Rolv Apneseth <rapneset@redhat.com>

---
diff --git a/0437-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch b/0437-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch
new file mode 100644
index 0000000..0ced8dc
--- /dev/null
+++ b/0437-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch
@@ -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
+

diff --git a/0438-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch b/0438-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch
new file mode 100644
index 0000000..59b54cd
--- /dev/null
+++ b/0438-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch
@@ -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
+

diff --git a/grub.patches b/grub.patches
index c5fb4b5..74f0ace 100644
--- a/grub.patches
+++ b/grub.patches
@@ -433,3 +433,5 @@ Patch0433: 0433-Add-support-for-efi-keyword.patch
 Patch0434: 0434-tpm-Disable-any-GRUB_STRING_PCR-command-measurement.patch
 Patch0435: 0435-util-grub-editenv-remove-stale-env_block-on-unsuppor.patch
 Patch0436: 0436-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

diff --git a/grub2.spec b/grub2.spec
index 509affa..24c2d89 100644
--- a/grub2.spec
+++ b/grub2.spec
@@ -17,7 +17,7 @@
 Name:		grub2
 Epoch:		1
 Version:	2.12
-Release:	62%{?dist}
+Release:	63%{?dist}
 Summary:	Bootloader with support for Linux, Multiboot and more
 License:	GPL-3.0-or-later
 URL:		http://www.gnu.org/software/grub/
@@ -621,6 +621,10 @@ fi
 %endif
 
 %changelog
+* Mon Jun 15 2026 Rolv Apneseth <rapneset@redhat.com> - 2.12-63
+- mdraid: fix metadata 1.0 detection in userspace utilities on IEEE1275
+- grub-install: use search.fs_uuid for RAID1 on IEEE1275
+
 * Thu Jun 04 2026 Josue Hernandez <josherna@redhat.com> - 2.12-62
 - Bump to re-run signing
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-15 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15 15:35 [rpms/grub2] rawhide: Fix issues with RAID1 metadata 1.0 partitions on IEEE1275 Rolv Apneseth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox