public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Rolv Apneseth <rolv.apneseth@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/grub2] f44: Fix issues with RAID1 metadata 1.0 partitions on IEEE1275
Date: Tue, 09 Jun 2026 16:40:24 GMT	[thread overview]
Message-ID: <178102322474.1.13191962324348059810.rpms-grub2-55f0f9c03fad@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/grub2
            Branch : f44
            Commit : 55f0f9c03fad2978d83a32cfffbb3c02db83bd1a
            Author : Rolv Apneseth <rolv.apneseth@gmail.com>
            Date   : 2026-06-09T10:46:16+01:00
            Stats  : +93/-1 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/grub2/c/55f0f9c03fad2978d83a32cfffbb3c02db83bd1a?branch=f44

            Log:
            Fix issues with RAID1 metadata 1.0 partitions on IEEE1275

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

---
diff --git a/0422-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch b/0422-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch
new file mode 100644
index 0000000..0ced8dc
--- /dev/null
+++ b/0422-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/0423-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch b/0423-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch
new file mode 100644
index 0000000..59b54cd
--- /dev/null
+++ b/0423-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 40e27d6..40f9202 100644
--- a/grub.patches
+++ b/grub.patches
@@ -418,3 +418,5 @@ Patch0418: 0418-loader-efi-linux.c-Unload-image-on-errors.patch
 Patch0419: 0419-loader-efi-linux.c-Disable-code-not-used-on-x86-when.patch
 Patch0420: 0420-util-grub-editenv-remove-stale-env_block-on-unsuppor.patch
 Patch0421: 0421-grub-get-kernel-settings-Treate-kernel-uki-dtbloader.patch
+Patch0422: 0422-mdraid-fix-metadata-1.0-detection-in-userspace-utils-on-IEEE1275.patch
+Patch0423: 0423-grub-install-use-search.fs_uuid-for-RAID1-on-IEEE1275.patch

diff --git a/grub2.spec b/grub2.spec
index 02a5bdb..156f150 100644
--- a/grub2.spec
+++ b/grub2.spec
@@ -17,7 +17,7 @@
 Name:		grub2
 Epoch:		1
 Version:	2.12
-Release:	59%{?dist}
+Release:	60%{?dist}
 Summary:	Bootloader with support for Linux, Multiboot and more
 License:	GPL-3.0-or-later
 URL:		http://www.gnu.org/software/grub/
@@ -608,6 +608,10 @@ fi
 %endif
 
 %changelog
+* Fri Jun 05 2026 Rolv Apneseth <rapneset@redhat.com> - 2.12-60
+- mdraid: fix metadata 1.0 detection in userspace utilities on IEEE1275
+- grub-install: use search.fs_uuid for RAID1 on IEEE1275
+
 * Sat May 30 2026 Hans de Goede <johannes.goede@oss.qualcomm.com> - 2.12-59
 - Fix default kernel not getting updated when using kernel-uki-dtbloader
 - Resolves: #2463620

                 reply	other threads:[~2026-06-09 16:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178102322474.1.13191962324348059810.rpms-grub2-55f0f9c03fad@fedoraproject.org \
    --to=rolv.apneseth@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox