Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem: ReaR may fail to install GRUB and set boot order after restore due to missing `/dev/nvram` making the system unbootable.
Version-Release number of selected component (if applicable): rear-2.6-11.el9.ppc64le
How reproducible: always
Steps to Reproduce:
1. Create a rescue image (e.g. ISO) and backup using `rear mkrescue` on a ppc64le machine.
2. Boot into such rescue system.
3. Run `rear recover` and answer all questions with affirmative replies.
Actual results:
GRUB 2 fails to install due to missing `/dev/nvram` and the boot order will not be changed to the corresponding block device.
Expected results:
GRUB 2 installs successfully and the boot order is set to corresponding block device.
Additional info:
- On newer kernels, the NVRAM driver is built as a kernel module which needs to be loaded so that `/dev/nvram` is created. ReaR must load this kernel module before installing GRUB 2 and changing the boot order.
- logs:
>2022-05-18 01:36:01.321238142 Including finalize/Linux-ppc64le/660_install_grub2.sh
>/sbin/grub2-probe
>2022-05-18 01:36:01.322570843 Installing GRUB2 boot loader on PPC64/PPC64LE...
>Generating grub configuration file ...
>Adding boot menu entry for UEFI Firmware Settings ...
>done
>2022-05-18 01:36:11.099705611 Determining where to install GRUB2 (no GRUB2_INSTALL_DEVICES specified)
>2022-05-18 01:36:11.103006970 Found PPC PReP boot partition /dev/sda1 - installing GRUB2 there
>dd: writing to '/dev/sda1': No space left on device
>8193+0 records in
>8192+0 records out
>4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.0771412 s, 54.4 MB/s
>Installing for powerpc-ieee1275 platform.
>nvram: ERROR: cannot open "/dev/nvram": No such file or directory
>nvram: ERROR: cannot open "/dev/misc/nvram": No such file or directory
>grub2-install: error: `nvsetenv' failed.
>You will have to set `boot-device' variable manually. At the IEEE1275 prompt, type:
> setenv boot-device /vdevice/v-scsi@30000003/disk@8100000000000000
>.
>2022-05-18 01:36:13.883630644 Failed to install GRUB2 on PPC PReP boot partition /dev/sda1
>2022-05-18 01:36:13.889924451 Failed to install GRUB2 - you may have to manually install it
>2022-05-18 01:36:13.893384398 Including finalize/Linux-ppc64le/680_install_PPC_bootlist.sh
>2022-05-18 01:36:13.903409037 PPC PReP Boot partition found: /dev/sda1
>2022-05-18 01:36:13.911498962 Boot device disk is /dev/sda.
>2022-05-18 01:36:13.919528935 Set LPAR bootlist to '/dev/sda'
>/usr/sbin/nvram: ERROR: cannot open "/dev/nvram": No such file or directory
>/usr/sbin/nvram: ERROR: cannot open "/dev/misc/nvram": No such file or directory
>Could not update bootlist!
>2022-05-18 01:36:14.280003500 Including finalize/default/880_check_for_mount_by_id.sh
>2022-05-18 01:36:14.289783287 Including finalize/default/890_finish_checks.sh
>2022-05-18 01:36:14.302983687 WARNING:
>For this system
>RedHatEnterpriseServer/9 on Linux-ppc64le (based on Fedora/9/ppc64le)
>there is no code to install a boot loader on the recovered system
>or the code that we have failed to install the boot loader correctly.
>Please contribute appropriate code to the Relax-and-Recover project,
>see http://relax-and-recover.org/development/
>Take a look at the scripts in /usr/share/rear/finalize - for example
>for PC architectures like x86 and x86_64 see the script
>/usr/share/rear/finalize/Linux-i386/660_install_grub2.sh
>and for POWER architectures like ppc64le see the script
>/usr/share/rear/finalize/Linux-ppc64le/660_install_grub2.sh
>---------------------------------------------------
>| IF YOU DO NOT INSTALL A BOOT LOADER MANUALLY, |
>| THEN YOUR SYSTEM WILL NOT BE ABLE TO BOOT. |
>---------------------------------------------------
>You can use 'chroot /mnt/local bash --login'
>to change into the recovered system and
>manually install a boot loader therein.
- upstream PR with a fix: https://github.com/rear/rear/pull/2580
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/RHBA-2022:8246