Problem:
When I create a host, the MAC-addresses don’t show up in the /var/lib/tftpboot/pxelinux.cfg directory.
Similar to this:
I’ve built the “PXE Default” configuration on the Provisioning Templates page, so the tftpd smart-proxy is working, principally (I get the default boot menu)
However, I seem to be missing something.
My configuration: I have the main Foreman-server and a separate Smart Proxy. The new server(s) I want to provision are associated to a host-group that is associated with that Smart Proxy.
The PXE-boot subnet is also associated with the smart-proxy.
Expected outcome:
Is there some way for diagnosing this? Or some hammer command I can run
OK, the tftpd actually needs to be running (had this problem before, but somehow forgot).
If I set the pxe-interface to managed, pxelinux.cfg files do show up.
However, dhcpd seems off.
It does boot into the menu, but seems to lose the IP immediately.
Aug 17 17:38:52 pxe.dom.tld dhcpd: DHCPDISCOVER from 00:50:56:87:7e:c4 via ens224
Aug 17 17:38:53 pxe.dom.tld dhcpd: DHCPOFFER on 10.38.166.85 to 00:50:56:87:7e:c4 via ens224
Aug 17 17:38:54 pxe.dom.tld dhcpd: DHCPREQUEST for 10.38.166.85 (10.38.177.180) from 00:50:56:87:7e:c4 via ens224
Aug 17 17:38:54 pxe.dom.tld dhcpd: DHCPACK on 10.38.166.85 to 00:50:56:87:7e:c4 via ens224
Aug 17 17:38:54 pxe.dom.tld in.tftpd[4189]: Error code 0: TFTP Aborted
Aug 17 17:38:54 pxe.dom.tld in.tftpd[4190]: Client ::ffff:10.38.166.85 finished pxelinux.0
Aug 17 17:38:54 pxe.dom.tld in.tftpd[4192]: Client ::ffff:10.38.166.85 finished pxelinux.cfg/01-00-50-56-87-7e-c4
Aug 17 17:38:55 pxe.dom.tld in.tftpd[4197]: Client ::ffff:10.38.166.85 finished menu.c32
Aug 17 17:38:55 pxe.dom.tld in.tftpd[4198]: Client ::ffff:10.38.166.85 finished pxelinux.cfg/01-00-50-56-87-7e-c4
Aug 17 17:39:02 pxe.dom.tld in.tftpd[4199]: Client ::ffff:10.38.177.180 timed out
Aug 17 17:39:04 pxe.dom.tld in.tftpd[4200]: Client ::ffff:10.38.177.180 timed out
Aug 17 17:39:05 pxe.dom.tld in.tftpd[4201]: Client ::ffff:10.38.177.180 timed out
Aug 17 17:39:06 pxe.dom.tld in.tftpd[4202]: Client ::ffff:10.38.177.180 timed out
Aug 17 17:39:06 pxe.dom.tld in.tftpd[4203]: Client ::ffff:10.38.177.180 timed out
Aug 17 17:39:07 pxe.dom.tld in.tftpd[4204]: Client ::ffff:10.38.177.180 timed out
It hands out a lease, but I cannot ping the address.
In tcpdump, I can see that the client still requests the boot/centos-7-base-x86_64-128-vmlinuz file and the tftpd-Server would deliver that.
Though it’s an empty file as it looks like.
The pxelinux.cfg file (for the MAC) looks like this:
# This file was deployed via 'Kickstart default PXELinux' template
DEFAULT menu
MENU TITLE Booting into OS installer (ESC to stop)
TIMEOUT 100
ONTIMEOUT installer
LABEL installer
MENU LABEL Kickstart default PXELinux
KERNEL boot/centos-7-base-x86_64-128-vmlinuz
APPEND initrd=boot/centos-7-base-x86_64-128-initrd.img ks=http://pxe.dom.tld:8000/unattended/provision?token=5cf11f3c-bd3e-4513-b536-af19d9701d3a network ksdevice=bootif ks.device=bootif BOOTIF=01-00-50-56-87-7e-c4 kssendmac ks.sendmac inst.ks.sendmac ip=dhcp nameserver=10.38.177.180 rd.net.timeout.dhcp=7 rd.net.timeout.iflink=7 rd.net.timeout.ifup=7 rd.net.timeout.route=7 rd.net.timeout.ipv6dad=7 rd.net.timeout.ipv6auto=7 rd.net.timeout.carrier=7
IPAPPEND 2
Looks like your TFTP is not allright, are you aware this is stateless UDP protocol and it won’t work through NATs/firewalls without connection tracking?
No, it will create a host entry in dhcpd.leases. Only if you associated your host with PXELinux or PXEGrub2 template and you set PXELoader to appropriate value.
However, as I found out it was simply missing the “images” folder in the downloaded repo, which needed an advanced sync (and then a “full sync” of the smart-proxy).