Bug 2060948
Summary: | grub on OpenFirmware : search --hint-ieee1275= does not work | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Pavel Cahyna <pcahyna> | |
Component: | grub2 | Assignee: | Bootloader engineering team <bootloader-eng-team> | |
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 9.0 | CC: | amahdal, bootloader-eng-team, bugproxy, lmiksik, mlewando, pjanda, rharwood, rmetrich | |
Target Milestone: | rc | Keywords: | Regression, TestCaseNeeded, Triaged | |
Target Release: | --- | |||
Hardware: | ppc64le | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | grub2-2.06-27.el9_0 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2062639 (view as bug list) | Environment: | ||
Last Closed: | 2022-05-17 15:51:03 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2048904, 2062639 | |||
Deadline: | 2022-04-04 |
Description
Pavel Cahyna
2022-03-04 16:20:18 UTC
This worked with grub2-ppc64le-2.04-31.el9.2.ppc64le in RHEL 9 Alpha: grub> set boot='hd0,msdos2' grub> echo $boot hd0,msdos2 grub> search --no-floppy --fs-uuid --set=boot --hint-ieee1275='ieee1275//vdevice/v-scsi@30000003/disk@8100000000000000,msdos2' --hint='hd0,msdos2' 5aaa7ea0-ae19-4e13-a585-3390a14fd5ed grub> echo $boot ieee1275//vdevice/v-scsi@30000003/disk@8100000000000000,msdos2 even with grub2-ppc64le-2.06-6.el9 in beta it works. It works in grub2-ppc64le-2.06-23.el9 and broke in grub2-ppc64le-2.06-24.el9 by @rharwood . (Clearing needinfo since there's no specific question - presumably it was set accidentally with the @.) (In reply to Pavel Cahyna from comment #3) > It works in grub2-ppc64le-2.06-23.el9 and broke in grub2-ppc64le-2.06-24.el9 > by @rharwood . OK I'm culprit here. It appears my patch 0226-search-new-efidisk-only-option-on-EFI-systems.patch introduces must have introduced the bug, it refactored the "--no-floppy" argument handling, which was necessary to introduce the "--efidisk-only" argument. The patch makes use of a new "flags" stack variable, which has initially uninitialized value: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- @@ -89,6 +91,7 @@ grub_cmd_search (grub_extcmd_context_t ctxt, int argc, char **args) const char *id = 0; int i = 0, j = 0, nhints = 0; char **hints = NULL; + enum search_flags flags; <<<<<< HERE, should be "flags = 0;" if (state[SEARCH_HINT].set) for (i = 0; state[SEARCH_HINT].args[i]; i++) @@ -180,15 +183,18 @@ grub_cmd_search (grub_extcmd_context_t ctxt, int argc, char **args) goto out; } [...] -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Depending on memory content, this was making the code search for "--efidisk-only" implicitly. Patch (commit db0deb7994a7be26700869dbb81786f7967244f7): -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Author: Renaud Métrich <rmetrich> Date: Mon Mar 7 07:46:56 2022 +0100 Fix for RHBZ2060948 diff --git a/0226-search-new-efidisk-only-option-on-EFI-systems.patch b/0226-search-new-efidisk-only-option-on-EFI-systems.patch index ca484e63..74f483b0 100644 --- a/0226-search-new-efidisk-only-option-on-EFI-systems.patch +++ b/0226-search-new-efidisk-only-option-on-EFI-systems.patch @@ -108,7 +108,7 @@ index 47fc8eb9966..464e6ebb1c8 100644 const char *id = 0; int i = 0, j = 0, nhints = 0; char **hints = NULL; -+ enum search_flags flags; ++ enum search_flags flags = 0; if (state[SEARCH_HINT].set) for (i = 0; state[SEARCH_HINT].args[i]; i++) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Would covscan be able to detect uninitialized variable? This is something that even the compiler might warn about. *** Bug 2062744 has been marked as a duplicate of this bug. *** ------- Comment From diegodo.com 2022-03-11 10:44 EDT------- There are 3 new patches from the previous NIGHTLY and the new ONE. 0225-search-fixed-bug-stopping-iteration-when-no-floppy-i.patch 0226-search-new-efidisk-only-option-on-EFI-systems.patch 0227-efi-new-connectefi-command.patch Two of then are changing the behavior of the search.c I'll try to investigate what they changed so we can try to fix it... ------- Comment From diegodo.com 2022-03-11 10:44 EDT------- *** Bug 196649 has been marked as a duplicate of this bug. *** ------- Comment From chetjain.com 2022-03-15 03:01 EDT------- Any further update? This needs an exception approval to include the fixes for GA, else it breaks boot operation on all NPIV lpars. Meanwhile, is there a workaround to overcome this? ------- Comment From ssant.com 2022-03-15 08:14 EDT------- *** Bug 196670 has been marked as a duplicate of this bug. *** ------- Comment From Steven.Unruh 2022-03-15 09:54 EDT------- before grub choice: <----------------------------------------- how do i do that 7f1f9f69-7958-4997-9144-b83307cdf88a. 7f1f9f69-7958-4997-9144-b83307cdf88a. error: ../../grub-core/net/net.c:1552:disk `hd0,msdos2' not found. Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions. grub> <----------------------------------------- where do i edit? ------- Comment From Steven.Unruh 2022-03-15 09:58 EDT------- the lpar installs fine. this failure is on the 1st boot after install ------- Comment From ssant.com 2022-03-15 23:24 EDT------- (In reply to comment #14) > before grub choice: <----------------------------------------- how do i do > that > Steven, the steps mentioned by Petr are to be followed during installation. Please attempt a fresh install. When at grub(during install) follow the steps provided by Petr and post the results. ------- Comment From rajanikanth.ha.com 2022-03-16 01:50 EDT------- Hi, We are able to proceed with this workaround, using grub2-2.06-27.el9_0 build and following the steps in mentioned in the #comment13 LPAR is installed and able to boot LPAR after it. Thanks! ------- Comment From ssant.com 2022-03-17 09:14 EDT------- (In reply to comment #13) > Hello IBM, it looks very similar to bug 2060948 > > can you try grub2-2.06-27.el9_0 build, please? Thanks Petr.This package resolves the problem. Machine successfully boots post installation. Has this package already received all the necessary ack's for inclusion into Nightly build or should this go through exception process ? (In reply to IBM Bug Proxy from comment #29) > ------- Comment From diegodo.com 2022-03-11 10:44 EDT------- > There are 3 new patches from the previous NIGHTLY and the new ONE. > > 0225-search-fixed-bug-stopping-iteration-when-no-floppy-i.patch > 0226-search-new-efidisk-only-option-on-EFI-systems.patch > 0227-efi-new-connectefi-command.patch > > Two of then are changing the behavior of the search.c > > I'll try to investigate what they changed so we can try to fix it... > > ------- Comment From diegodo.com 2022-03-11 10:44 EDT------- > *** Bug 196649 has been marked as a duplicate of this bug. *** > > ------- Comment From chetjain.com 2022-03-15 03:01 EDT------- > Any further update? > This needs an exception approval to include the fixes for GA, else it breaks > boot operation on all NPIV lpars. > Meanwhile, is there a workaround to overcome this? > > ------- Comment From ssant.com 2022-03-15 08:14 EDT------- > *** Bug 196670 has been marked as a duplicate of this bug. *** > > ------- Comment From Steven.Unruh 2022-03-15 09:54 EDT------- > before grub choice: <----------------------------------------- how do i do > that > > 7f1f9f69-7958-4997-9144-b83307cdf88a. > 7f1f9f69-7958-4997-9144-b83307cdf88a. > error: ../../grub-core/net/net.c:1552:disk `hd0,msdos2' not found. > Minimal BASH-like line editing is supported. For the first word, > TAB lists possible command completions. Anywhere else TAB lists > possible device or file completions. > grub> <----------------------------------------- where do i > edit? > > ------- Comment From Steven.Unruh 2022-03-15 09:58 EDT------- > the lpar installs fine. > > this failure is on the 1st boot after install > > ------- Comment From ssant.com 2022-03-15 23:24 EDT------- > (In reply to comment #14) > > before grub choice: <----------------------------------------- how do i do > > that > > > Steven, the steps mentioned by Petr are to be followed during installation. > > Please attempt a fresh install. When at grub(during install) follow the > steps provided by Petr and post the results. > > ------- Comment From rajanikanth.ha.com 2022-03-16 01:50 EDT------- > Hi, > > We are able to proceed with this workaround, using grub2-2.06-27.el9_0 build > and following the steps in mentioned in the #comment13 LPAR is installed > and able to boot LPAR after it. > > Thanks! > > ------- Comment From ssant.com 2022-03-17 09:14 EDT------- > (In reply to comment #13) > > Hello IBM, it looks very similar to bug 2060948 > > > > can you try grub2-2.06-27.el9_0 build, please? > > Thanks Petr.This package resolves the problem. Machine successfully boots > post installation. > > Has this package already received all the necessary ack's for inclusion into > Nightly build or should this go through exception process ? All acks provided, grub2-2.06-27.el9_0 is included in RHEL-9.0.0-20220318.0 nightly compose. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: grub2), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:3925 |