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 1512493 - grub2-mkimage on fresh UEFI installation fails: cannot open `/usr/lib/grub/x86_64-efi/moddep.lst
Summary: grub2-mkimage on fresh UEFI installation fails: cannot open `/usr/lib/grub/x8...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: grub2
Version: 7.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Peter Jones
QA Contact: Release Test Team
Petr Bokoc
URL:
Whiteboard:
Depends On:
Blocks: 1492177 1594286 1630910 1660473
TreeView+ depends on / blocked
 
Reported: 2017-11-13 11:04 UTC by Pavel Cahyna
Modified: 2023-04-12 07:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
The "grub2-mkimage" command fails on UEFI systems by default The "grub2-mkimage" command may fail on UEFI systems with the following error message: error: cannot open `/usr/lib/grub/x86_64-efi/moddep.lst': No such file or directory. This error is caused by a the package _grub2-efi-x64-modules_ package missing from the system. The package is missing due to a known issue where it is not part of the default installation, and it is not marked as a dependency for _grub2-tools_ which provides the "grub2-mkimage" command. The error also causes some other tools which depend on it, such as *ReaR*, to fail. To work around this problem, install the _grub2-efi-x64-modules_, either manually using *Yum*, or by adding it to the Kickstart file used for installing the system.
Clone Of:
Environment:
Last Closed: 2020-08-27 15:42:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Cahyna 2017-11-13 11:04:34 UTC
Description of problem:
On a freshly installed RHEL 7.4 system with UEFI, grub2-mkimage fails to produce an image, with the error message grub2-mkimage: error: cannot open `/usr/lib/grub/x86_64-efi/moddep.lst': No such file or directory.

This file is provided by the grub2-efi-x64-modules package, but this package is not installed by default. If the system is installed directly via uefi, it installs the grub2-pc-modules package instead of the grub2-efi-x64-modules package. Interestingly, grub2-pc does depend on grub2-pc-modules, but grub2-efi does not depend on grub2-efi-modules, nor does grub2-efi-x64 depend on grub2-efi-x64-modules. Why this asymmetry?

This problem prevents ReaR from working out-of-the-box on UEFI systems, see bz1492177

Version-Release number of selected component (if applicable):
grub2-efi-x64-2.02-0.65.el7_4.2.x86_64

How reproducible:
Reproducible on newly installed systems, on systems upgraded from previous releases the grub2-efi-x64-modules package is sometimes present and the command does work, see https://bugzilla.redhat.com/show_bug.cgi?id=1492177#c3

Steps to Reproduce:
1. grub2-mkimage  -O x86_64-efi -p /EFI/BOOT

Actual results:
grub2-mkimage: error: cannot open `/usr/lib/grub/x86_64-efi/moddep.lst': No such file or directory.

Expected results:
Image is produced on stdout, just like in the case of "grub2-mkimage  -O i386-pc -p /boot/grub2" (which works even on an UEFI system, btw).

Comment 7 Tomas Popela 2020-08-27 14:42:50 UTC
Closing the bug as the attached customer case is closed.


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