Grub2 tries to load filename with trailing dash character

We’re trying to provision a DL380G9 with a UEFI PXE Boot.

When creating a new machine for provisionning, grub.cfg is not loaded as expected.
The file grub.cfg-1- is correctly generated.

After a quick debug with tcpdump and debug log, I observed the firmware is trying to load a grub.cfg-- (note the trailing dash) file which is effectively not found.
Adding a trailing dash at the end of file fixes the problem.

boot loader is grub2/grubx64.efi from foreman-bootloaders.

I wonder if I didn’t do a mistake in the tftp setup. Where does this trailing dash come from ?

It is a bug in grub2 (actually bug in Red Hat downstream patch). Two options:

A) Apply a workaround in grub2 config file which we ship in 1.17+ I think (you can easily edit the template):

B) Update your OS to have fixed grub2 and redeploy grub2 onto TFTP (our installer creates a copy or calls grub2-mknet if I remember correctly so do that). If on RHEL that’d be 7.5:

https://bugzilla.redhat.com/show_bug.cgi?id=1483740

Broken grub2 is from RHEL 7.4.

Thanks for the information.
I took the grubx64.efi from the version available in the foreman-bootloaders-redhat rpm package availble from the foreman yum repository.
I thought those provided were the prefered version to work with.
The package have to be updated with good known working version.

We stopped using this since in RHEL 7.4 grub2 is now shipped in noarch packages for all supported architectures. Just update the OS on smart-proxy, delete the EFI file and re-run the installer to regenerate it via grub-mknetdir.

I have updated the README to reflect this as I don’t plan keep extracting the bootloaders in the future. If anyone can takeover, that’d be appreciated because getting those might be tricky.