public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/grub2] f44: Fix issues with RAID1 metadata 1.0 partitions on IEEE1275
@ 2026-06-09 16:40 Rolv Apneseth
0 siblings, 0 replies; only message in thread
From: Rolv Apneseth @ 2026-06-09 16:40 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-09 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09 16:40 [rpms/grub2] f44: 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