Foreman discovery using EFI fails to set BOOTIF mac address

I’m facing a problem with a clean foreman 1.21 installation with discovery enabled. I’m trying to discover a host using EFI, but it fails to detect the proper boot interface. The discovery image loads, but fails to configure the network interface. The discovery status shows an incorrect ‘BOOTIF’:


With the help of the information in other already existing topics (1) I figured out that grub is unable to load regexp.mod, as tftp reports:

File not found /EFI/centos/x86_64-efi/regexp.mod

The regexp.mod file isn’t present in the tftpboot directory by default after a clean installation of foreman. What is the expected behavior, is it expected to be present? Or does this require manual actions? Did I miss something in the installation guide? I couldn’t find anything in the installation guides.

If I manually copy the regexp.mod from /usr/lib/grub to the given location in the tftpboot directory, discovery works fine.

Expected outcome:
Successful foreman installation and discovery using EFI.

Foreman and Proxy versions:
Foreman: 1.21.3
Discovery: 14.0.1
Discovery image: 3.5.1
OS: CentOS 7

Other relevant data:
I downloaded the discovery image manually from

(1) Topics that have similar subjects:

These topics pointed me to this regexp mechanism: