Problem:
I am currently installing a fresh new foreman in our environment. After successful installation of foreman I have installed Discovery plugin and after that I tried to boot one of our VM’s for discovery process. The discovery process happens in Legacy mode but when I try with UEFI then a grub command line appears. When I use SET command then I can find that it has picked the correct IP and all details. The problem is its not booting with UEFI mode whereas it is working in legacy mode. I tried with all the different settings in the forum. Can anyone please help me with the right process of Installing foreman. Below is the process which I have followed.
Then I have configured the firewall
firewall-cmd --permanent --add-port=53/tcp
firewall-cmd --permanent --add-port=67-69/udp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=3000/tcp
firewall-cmd --permanent --add-port=3306/tcp
firewall-cmd --permanent --add-port=5910-5930/tcp
firewall-cmd --permanent --add-port=5432/tcp
firewall-cmd --permanent --add-port=8140/tcp
firewall-cmd --permanent --add-port=8443/tcp
firewall-cmd --reload
3. Set up the LDAP which is working fine.
Enable DHCP server to hand out IP addresses and provide PXE/UEFI boot capabilities.
foreman-installer --enable-foreman-plugin-dhcp-browser
–foreman-proxy-dhcp=true
–foreman-proxy-dhcp-managed true
–foreman-proxy-dhcp-gateway “10.XXX.XXX.XXX”
–foreman-proxy-dhcp-interface “eth0”
–foreman-proxy-dhcp-nameservers “XX.XXX.XXX.XXX,XXX.XXX.XXX.XXX”
–foreman-proxy-dhcp-netmask=“255.255.255.0”
–foreman-proxy-dhcp-range “10.100.XXX.1 10.100.XXX.99”
–foreman-proxy-httpboot=true
–foreman-proxy-http=true
–foreman-proxy-httpboot-listen-on=both
–foreman-proxy-tftp true
–foreman-proxy-tftp-managed true
Set up the Subnet in Subnet section.
Add Host Discovery to Foreman.
foreman-installer
–enable-foreman-proxy-plugin-discovery
–foreman-proxy-plugin-discovery-install-images=true ( Which is failing and i have to manually install as below)
In UEFI mode PXELinux is not used, Grub2 should be fetched from the HTTP proxy: /httpboot/grub2/grubx64.efi. Check proxy.log, enable debug, see what exactly it tries to fetch.
Make sure to use the latest grubx64.efi from Fedora, there are many EL7 or Debian builds which will not work, HTTP UEFI boot is a quite new code in Grub2.
Finally I found the Issue with Discovery Image. I think this might be useful as its a simple syntax error in codebase of foreman. Please correct me if I am wrong.
After the Initial installation of Foreman and Discovery Image the discovery image fails to boot up. Its due to a “Snippet syntax error” in pxegrub2_chainload as below. This also exists in other snippet like pxegrub_chainload.