Configuration Help - UEFI PXE Boot/Provision

Hi All,

Apologies if I missed this, but I’ve been banging my head over how to setup UEFI PXE Booting/Provisioning in foreman 1.24.2. How do I setup the OS, templates, host and hostgroups.

We received some demo nodes from a vendor and they don’t support the “Legacy” style of PXE, you know the one that just works. The demo nodes come with UEFI IPv4 and UEFI HTTPv4 options.

PXE/TFTP seem to work, as I’m able to pull down either the pxelinux.0 or the grubx64.efi file. But in either case the boot just fails after the file is pulled down.

Any help is greatly appreciated.

Thank you,
-Jay

I made best experience for UEFI when associating the PXEGrub2 template and using Grub2 UEFI as Bootloader in the Host wizard.

1 Like

Hi Dirk,

thanks for the information. Mind sharing the various steps to needed to try and get grub2 to work?

I think I’m at a point where it sort of works, I can get a grub prompt, but that’s it. I can’t get it to take the next step, any help with how to make that next step, is greatly appreciated.

-Jay

Assuming the operating system already exists, go to “Hosts > Provision Templates”, select the matching one like “Kickstart default PXEGrub2”, on the “Association” tab move the operating sytem from applicable to selected and submit.

Afterwards go to “Hosts > Operating systems”, select the operating system, on the “Templates” tab make the associated template the default for Grub2.

Now in the Host wizard you can chose the bootloader.

Hi Dirk,

Thank you for the help so far.

What should the bootloader be set to? I currently have it as Grub2 UEFI, and when that happens my system boots to a grub prompt. It appears to pull down grub2/grubx64.efi without issue. But then just drops into a grub prompt. How do I get it beyond here?

I know I’m missing something, just not sure what.

-Jay

if it helps any, I’m trying to load CentOS7.7

-Jay

I think I figured out the issue. The grubx64.efi file that was placed in /var/lib/tftp is bad. I copied from /boot/efi/EFI/redhat…

That one worked. Did I do the right thing?

-Jay

Yes, this should be fine. I have not had problems with this before, but I would have suggested to verify the bootloader and/or the templates. Great you could fix your problem.

Foreman-installed should have installed grub2-efi and copied from /boot/efi/EFI automatically for you. Check installer logs why it was missing, it only does this if you enable TFTP smart-proxy tho.

Anyway, all you need to do at this point is to use the PXE loader option. Grub2 is the best option because this is what Red Hat engineers maintain for EFI environment, you can also build PXELinux EFI from sources and then you can use PXELinux as well.

Also, HTTP UEFI works in Foreman now, just enable “httpboot” smart-proxy module and pick Grub2 HTTP UEFI boot option. I suggest to use HTTP booting from now on, if you can get rid of TFTP/PXE, just do it!

Warning: In that case you need to copy grub2 from Fedora Rawhide as Grub2 developers fixed few bugs for us just few weeks ago.

Thanks for the info!!

What’s the --flag that enables smart-proxy…

This was our command:
foreman-installer
–foreman-configure-epel-repo=false
–foreman-configure-scl-repo=false
–enable-foreman-proxy
–foreman-proxy-tftp=true
–foreman-proxy-tftp-managed=true
–foreman-proxy-tftp-servername=hostname
–foreman-proxy-bmc=true
–foreman-proxy-dns=true
–foreman-proxy-dns-reverse=DNS
–foreman-proxy-dns-zone=cmp
–foreman-proxy-dns-managed=true
–foreman-proxy-dhcp=true
–foreman-proxy-dhcp-managed=true
–foreman-proxy-dhcp-interface=eth1
–foreman-proxy-dhcp-option-domain=cmp
–foreman-proxy-dhcp-gateway=IPADD
–foreman-proxy-dhcp-subnets=‘IPADD’
–enable-foreman-plugin-discovery
–enable-foreman-proxy-plugin-discovery
–foreman-proxy-plugin-discovery-install-images=true
–foreman-proxy-plugin-discovery-source-url=URL
–enable-foreman-plugin-remote-execution
–enable-foreman-proxy-plugin-remote-execution-ssh
–enable-foreman-plugin-ansible
–enable-foreman-proxy-plugin-ansible
–foreman-proxy-plugin-ansible-enabled=true

Also note, we did this install back in like the 1.20 days, we have since just done upgrades to 1.24.2.

-Jay

This one should make grub2 installed and copied into TFTP directory.

We have a lot here: https://docs.theforeman.org/guides/build/doc-Provisioning_Guide/index-foreman.html

It’s WIP documentation, currently does not cover HTTP UEFI booting yet.