RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1983003 - PPC64le: grub2-install doesn't execute properly, making the recovered system unbootable
Summary: PPC64le: grub2-install doesn't execute properly, making the recovered system ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rear
Version: 8.4
Hardware: ppc64le
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Pavel Cahyna
QA Contact: David Jež
Prerana Sharma
URL:
Whiteboard:
Depends On: 1988493
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-16 08:54 UTC by Renaud Métrich
Modified: 2021-11-10 02:03 UTC (History)
5 users (show)

Fixed In Version: rear-2.6-1.el8
Doc Type: Bug Fix
Doc Text:
.BM Power Systems, Little Endian architecture machines with multipath can now be safely recovered using ReaR Previously, the `/sys` file system was not mounted in the chroot when ReaR was recovering the system. The `ofpathname` executable on the IBM Power Systems, Little Endian architecture failed when installing the boot loader. Consequently, the error remained undetected and the recovered system was unbootable. With this update, ReaR now mounts the `/sys` file system in the recovery chroot. ReaR ensures that `ofpathname` is present in the rescue system on Power Systems, Little Endian architecture machines.
Clone Of:
Environment:
Last Closed: 2021-11-09 18:53:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2021:4344 0 None None None 2021-11-09 18:53:57 UTC

Description Renaud Métrich 2021-07-16 08:54:30 UTC
This bug was initially created as a copy of Bug #1983000

I am copying this bug because: 

Same code in RHEL8. Even though PPC64 isn't supported anymore, the code is exactly the same on PPC64le so I would expect it also fails here, even if not tested myself.

Description of problem:

When recovering a PPC64+multipath system, the ofpathname binary may fail executing due to not having /sys mounted in the chroot:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Installing for powerpc-ieee1275 platform.
/sbin/ofpathname: line 411: cd: /sys/class/*/dm-2: No such file or directory
/usr/bin/find: warning: Unix filenames usually don't contain slashes (though pathnames do).  That means that '-name '/'' will probably evaluate to false all the time on this system.  You might find the '-wholename' test more useful, or perhaps '-samefile'.  Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ '/''.
/usr/bin/find: missing argument to `-name'
ofpathname: Could not retrieve Open Firmware device path
            for logical device "/dev/mapper/mpathf".
/vdevice/v-scsi@300000e2/disk@8200000000000000 /vdevice/v-scsi@3000007e/disk@8200000000000000
Installation finished. No error reported.
2021-06-04 13:42:33.207523277 GRUB2 installed on /dev/mapper/mpathf1
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

The ofpathname binary is called by grub2-install but additionally grub2-install doesn't detect the error, which doesn't make ReaR fail.

The result is an unbootable system.


Version-Release number of selected component (if applicable):

rear-2.4


How reproducible:

Always on the customer system


Additional info:

rear-2.6 has code to mount /sys automatically.

The following fix in /usr/share/rear/finalize/Linux-ppc64/620_install_grub2.sh is known to work on customer's systems:

Original lines (with numbers)
---------------------------------------------------
23 LogPrint "Installing GRUB2 boot loader"
24 mount -t proc none $TARGET_FS_ROOT/proc
25
:
75 umount $TARGET_FS_ROOT/proc
---------------------------------------------------

Modified lines:
---------------------------------------------------
23 LogPrint "Installing GRUB2 boot loader"
24 mount -t proc none $TARGET_FS_ROOT/proc
25 mount -t sysfs sys $TARGET_FS_ROOT/sys
26
:
76 umount $TARGET_FS_ROOT/sys
77 umount $TARGET_FS_ROOT/proc
---------------------------------------------------

Comment 16 Pavel Cahyna 2021-11-05 08:50:02 UTC
I tried to reproduce the problem on RHEL 8.4. While I can see the errors from ofpathname in the log, the recovered system boots just fine. Is the error really so fatal for grub2-install?

Comment 18 errata-xmlrpc 2021-11-09 18:53:41 UTC
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 (rear bug fix and enhancement update), 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/RHEA-2021:4344


Note You need to log in before you can comment on or make changes to this bug.