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 1277227 - grub2-install fails in anaconda (pre) shell with 'grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.'
Summary: grub2-install fails in anaconda (pre) shell with 'grub2-install: error: /usr/...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lorax
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1626269
TreeView+ depends on / blocked
 
Reported: 2015-11-02 17:59 UTC by Joseph Tingiris
Modified: 2023-09-07 18:43 UTC (History)
5 users (show)

Fixed In Version: lorax-19.6.67-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1626269 (view as bug list)
Environment:
Last Closed: 2016-11-03 23:44:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2165 0 normal SHIPPED_LIVE lorax bug fix and enhancement update 2016-11-03 13:15:01 UTC

Description Joseph Tingiris 2015-11-02 17:59:18 UTC
Description of problem:

grub2-install fails if run from anaconda pre shell or used within pre script on an x86_64 EFI based machine.

The grub target for x86_64-efi is missing.  There is no /usr/lib/grub/x86_64-efi.

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

lorax?

anaconda 19.31.123-1


How reproducible:

run grub2-install when in anaconda 19.31.123-1 pre install shell on an EFI based machine

Steps to Reproduce:
1. kickstart or otherwise boot an x86_64 EFI based machine with install media
2. go to shell (alt+f2 or ssh)
3. execute grub2-install

Actual results:

grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.

Expected results:

Installing for x86_64-efi platform.
grub2-install: error: cannot find EFI directory.

Additional info:

Copying the contents of /usr/lib/grub/x86_64-efi/ from an installed machine gets grub2-install working properly.

Comment 2 Brian Lane 2015-11-02 18:38:56 UTC
Why are you trying to run it from %pre?

Comment 3 Joseph Tingiris 2015-11-02 19:25:37 UTC
The project I'm working has a requirement for a custom recovery/install partition.  As a result, all partitioning is done in pre so it can be created (or preserved) as necessary.  The methods and reasoning for doing custom partitioning via pre is well established.

In this case, physical access to the machines is limited.  They are headless appliances and being booted via said recovery/install partition over the Internet via inst.ks (https, not pxe).  Transient network failures are a reality.  Installs don't always go as planned.

In the event post install fails, the machine must be able to reboot itself from the recovery partition and ultimately try again unattended (via grub2/custom.cfg).  The recovery partition is also used as a 'factory reset' mechanism and more.

Everything works as planned on bios based machines.  grub2-install performs as expected, etc.  With the proliferation of more modern hardware, duplicating the same functionality on EFI based machines is desirable.  All of the necessary tools are already available in pre and the only missing component is apparently /usr/lib/grub/x86_64-efi/

Comment 4 Brian Lane 2015-11-02 19:41:30 UTC
Thanks for the additional detail. Lorax should include grub2-efi-modules when building the boot.iso

Comment 8 errata-xmlrpc 2016-11-03 23:44:57 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, 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://rhn.redhat.com/errata/RHBA-2016-2165.html

Comment 9 Parikshit Khedekar 2018-04-05 12:53:45 UTC
Hello,

Reopening the BugZilla as the issue is still faced in Red Hat Enterprise Linux 7.4 and 7.5 Beta as well.

The installation media of DVD RHEL7.4 doesn't include any file within /usr/lib/grub ( this directory is empty). For this reason, the command fails.

Reproducible as, enter in rescue mode from a RHEL7.4 DVD and try to execute the command, you will see that this folder is empty.

Another way to reproduce it is to mount the stage2 LiveOS/squashfs.img (anaconda installation) and verify that the /usr/lib/grub folder is empty.
But it does not recommend doing it.

Comment 10 Joseph Tingiris 2018-08-12 20:12:55 UTC
This is still an issue, a regression from 7.1 that still exists.

I thought it was re-opened?


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