Foreman not generating grub.cfg for ubuntu:20.04

foreman not generating grub.cfg for ubuntu:20.04

grub.cfg have below content:

echo “This system was not recognized by Foreman.”
echo “”
echo “Click on ‘Build PXE Default’ in the Foreman interface”
echo “to create the default global grub.cfg configuration.”
echo “”
echo “The system will attempt to chainload from first HDD”
echo “in 10 minutes…”
echo “”
sleep 600
set root=(hd0,0)
chainloader +1

What does the template preview show for that host?

now i am able to generate grub.cfg but getting below error

I have selected these configuration

i am also getting same issue

What does the template preview show for the host?

Preseed default PXEGrub2 preview

Preseed default PXeLinux preview

Which OS is this?

On which GPT partition out of the five do you have ESP? Drop into grubshell and try to list the file contents, as you can see the template assumes /EFI directory with some predefined EFI files which it attemtps to load.

I am flashing ubuntu:20.04 os

Was this issue fixed ?
I have the exact same issue - where foreman is not generating the grub.cfg-@macaddress file and during boot grubx64.efi is looking for that file and the boot fails.

When you have associated Grub2 PXELoader template and add a new host (or click Build) Foreman will orchestrate TFTP files deployement for all Smart Proxies TFTP associated with your provisioning Subnet. Check all of that.

I am actually deploying KVM bare metal host provisioning via ansible modules for foreman. my ansible script adds the host to foreman with no issues - but when I boot the blade the NBP is delivered and then the default grub.cfg gets loaded and fails. - this is because grub.cfg-@mac does not get generated by foreman when the BM host is added to foreman.

My hostgroup has PXE Loader as Grub2 UEFI and my provisioning template is PXEGrub2 as the template. - what am I missing here - any clue ?

2022-06-06_12h18_40

Go to the subnet you have selected for this host and associate TFTP Smart Proxy. Only then TFTP files will be orchestrated on host creation.