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:
On a UEFI system, executing "grub2-install" creates a new "red" directory under /boot/efi/EFI with a single file "grubx64.efi" in it (no "grub.cfg", "grubenv", etc). It also changes the boot order to boot on that new "red" entry.
This causes the next reboots to fail switching root. This seems due to having the kernel properly loaded but with no other parameters such as the root device:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[FAILED]Failed to start Switch Root.
...
(dracut emergency prompt)
:/# cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.18.0-80.7.1.el8_0.x86_64
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Version-Release number of selected component (if applicable):
grub2-tools-2.02-66.el8.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Execute "grub2-install"
# grub2-install
2. Reboot
Actual results:
Failure to boot
Expected results:
No issue booting
Additional info:
Expected cmdline when booting properly:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.18.0-80.7.1.el8_0.x86_64 root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap console=tty0 console=ttyS0,115200n8 console=tty0 console=ttyS0,115200n8
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
To recover the system, /boot/efi/EFI/red directory needs to be removed or boot order modified.
As far as I know, using grub2-install is not supported method for setting bootloader up. But I agree that it shouldn't break anything. So I think we want to warn user and not break anything, but it is not supposed to do everything what user requests. Because even in case correct installation etc. it still will break secure boot system due it rewrites shim binary.
Anyway, I will try to reproduce it and provide qa_ack.
It is not reproducible with grub2-tools 2.02-81.el8 on RHEL-8.2.0-20200404.0-x86_64
grub2-install fails with
"grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory."
message.
Will try it again with older version or different parameters.
Comment 3Javier Martinez Canillas
2020-06-04 16:02:40 UTC
(In reply to Petr Janda from comment #2)
> It is not reproducible with grub2-tools 2.02-81.el8 on
> RHEL-8.2.0-20200404.0-x86_64
> grub2-install fails with
> "grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist.
> Please specify --target or --directory."
> message.
> Will try it again with older version or different parameters.
Yes, you need to install the grub2-efi-x64-modules package to run grub2-install on an EFI installation.
Thank you Javier,
after installing grub2-efi-x64-modules package it breaks system as reported.
Reproduced on released RHEL-8.2 x86_64
grub2-tools-2.02-81.el8
Comment 5Javier Martinez Canillas
2020-06-30 16:11:05 UTC
*** Bug 1830866 has been marked as a duplicate of this bug. ***
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 (grub2 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-2021:1648