Disable mdraid < 1.1 on ppc64le
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
parent
f8f88e1235
commit
e4be65856a
@ -3,7 +3,7 @@ From: Robbie Harwood <rharwood@redhat.com>
|
|||||||
Date: Wed, 25 Jan 2023 16:10:58 -0500
|
Date: Wed, 25 Jan 2023 16:10:58 -0500
|
||||||
Subject: [PATCH] ppc64le: signed boot media changes
|
Subject: [PATCH] ppc64le: signed boot media changes
|
||||||
|
|
||||||
Skip diskfilter on isos since mdraid* can't even
|
Skip mdraid < 1.1 on isos since mdraid* can't even
|
||||||
|
|
||||||
Prior to this change, on ppc64le with part_msdos and the mdraid* modules
|
Prior to this change, on ppc64le with part_msdos and the mdraid* modules
|
||||||
enabled, we see:
|
enabled, we see:
|
||||||
@ -32,38 +32,61 @@ These latter two lines repeat many times, eventually ending in:
|
|||||||
|
|
||||||
and the system drops to a "grub>" prompt.
|
and the system drops to a "grub>" prompt.
|
||||||
|
|
||||||
The firmware and the iso image appear to diagree on the blocksize (512
|
Prior to 1.1, mdraid stored the superblock offset from the end of the
|
||||||
vs. 2048), and the diskfilter RAID probing is too much for it. We won't
|
disk, and the firmware really doesn't like reads there. Best guess was
|
||||||
be seeing RAID on bootable CDs, so just turn it off.
|
that the firmware and the iso image appear to diagree on the blocksize
|
||||||
|
(512 vs. 2048), and the diskfilter RAID probing is too much for it.
|
||||||
|
It's tempting to just skip probing for cdroms, but unfortunately isos
|
||||||
|
can be virtualized elsewhere - such as regular disks.
|
||||||
|
|
||||||
Fix detection of root.
|
Also fix detection of root, and try the chrp path as a fallback if the
|
||||||
|
built prefix doesn't work.
|
||||||
Try the chrp path as a fallback if the built prefix doesn't work.
|
|
||||||
|
|
||||||
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||||
|
|
||||||
|
wip
|
||||||
---
|
---
|
||||||
grub-core/disk/diskfilter.c | 6 ++++++
|
grub-core/disk/mdraid1x_linux.c | 8 +++++++-
|
||||||
|
grub-core/disk/mdraid_linux.c | 5 +++++
|
||||||
grub-core/kern/ieee1275/openfw.c | 2 +-
|
grub-core/kern/ieee1275/openfw.c | 2 +-
|
||||||
grub-core/normal/main.c | 5 +++++
|
grub-core/normal/main.c | 5 +++++
|
||||||
3 files changed, 12 insertions(+), 1 deletion(-)
|
4 files changed, 18 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/grub-core/disk/diskfilter.c b/grub-core/disk/diskfilter.c
|
diff --git a/grub-core/disk/mdraid1x_linux.c b/grub-core/disk/mdraid1x_linux.c
|
||||||
index 7cdffe3ebd..68c836fc64 100644
|
index 38444b02c7..08c57ae16e 100644
|
||||||
--- a/grub-core/disk/diskfilter.c
|
--- a/grub-core/disk/mdraid1x_linux.c
|
||||||
+++ b/grub-core/disk/diskfilter.c
|
+++ b/grub-core/disk/mdraid1x_linux.c
|
||||||
@@ -139,6 +139,12 @@ scan_disk_partition_iter (grub_disk_t disk, grub_partition_t p, void *data)
|
@@ -129,7 +129,13 @@ grub_mdraid_detect (grub_disk_t disk,
|
||||||
grub_util_info ("Scanning for DISKFILTER devices on disk %s", name);
|
grub_uint32_t level;
|
||||||
#endif
|
struct grub_diskfilter_vg *array;
|
||||||
|
char *uuid;
|
||||||
+ if (p != NULL && (p->parent == NULL || p->parent->len == 0))
|
-
|
||||||
+ {
|
|
||||||
+ grub_dprintf ("diskfilter", "skipping %s due to unknown parent partition length", name);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
+
|
||||||
disk->partition = p;
|
+#ifdef __powerpc__
|
||||||
|
+ /* Firmware will yell at us for reading too far. */
|
||||||
|
+ if (minor_version == 0)
|
||||||
|
+ continue;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
if (size == GRUB_DISK_SIZE_UNKNOWN && minor_version == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
for (arr = array_list; arr != NULL; arr = arr->next)
|
diff --git a/grub-core/disk/mdraid_linux.c b/grub-core/disk/mdraid_linux.c
|
||||||
|
index e40216f511..98fcfb1be6 100644
|
||||||
|
--- a/grub-core/disk/mdraid_linux.c
|
||||||
|
+++ b/grub-core/disk/mdraid_linux.c
|
||||||
|
@@ -189,6 +189,11 @@ grub_mdraid_detect (grub_disk_t disk,
|
||||||
|
grub_uint32_t level;
|
||||||
|
struct grub_diskfilter_vg *ret;
|
||||||
|
|
||||||
|
+#ifdef __powerpc__
|
||||||
|
+ /* Firmware will yell at us for reading too far. */
|
||||||
|
+ return NULL;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* The sector where the mdraid 0.90 superblock is stored, if available. */
|
||||||
|
size = grub_disk_native_sectors (disk);
|
||||||
|
if (size == GRUB_DISK_SIZE_UNKNOWN)
|
||||||
diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
|
diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
|
||||||
index 3a6689abb1..0278054c61 100644
|
index 3a6689abb1..0278054c61 100644
|
||||||
--- a/grub-core/kern/ieee1275/openfw.c
|
--- a/grub-core/kern/ieee1275/openfw.c
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.06
|
Version: 2.06
|
||||||
Release: 78%{?dist}
|
Release: 79%{?dist}
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/grub/
|
URL: http://www.gnu.org/software/grub/
|
||||||
@ -544,6 +544,9 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 31 2023 Robbie Harwood <rharwood@redhat.com> - 2.06-79
|
||||||
|
- Disable mdraid < 1.1 on ppc64le
|
||||||
|
|
||||||
* Fri Jan 27 2023 Robbie Harwood <rharwood@redhat.com> - 2.06-78
|
* Fri Jan 27 2023 Robbie Harwood <rharwood@redhat.com> - 2.06-78
|
||||||
- Fix grub2-probe issue with previous commit
|
- Fix grub2-probe issue with previous commit
|
||||||
- Resolves: #2165136
|
- Resolves: #2165136
|
||||||
|
Loading…
Reference in New Issue
Block a user