1

My target machine with PXE enabled receives a lease from dnsmasq and prints a message

UD: 192.168.10.123

which is the address of my dnsmasq/tftp server but then fails to get any further with "Could not locate boot server."

Here is my dnsmasq file.

port=0
domain-needed
bogus-priv
interface=eth1
listen-address=192.168.10.123
bind-interfaces
domain=chacha.mo
dhcp-range=eth1,192.168.10.200,192.168.10.207,255.255.255.0,8h
dhcp-option=3,192.168.10.1
dhcp-option=6,192.168.10.2
dhcp-option=42,192.168.10.1
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-boot=pxelinux.0
pxe-prompt="Press F8 for PXE Network boot.", 20
pxe-service=x86PC, "Install CentOS via PXE", pxelinux

I set up my CentOS 7.6.1810 install tree on a different server, @192.168.10.3. I have used this http install dist successfully using virt-install.

Here is my /var/lib/tftpboot/pxelinux.cfg/default file.

default menu.c32
prompt 0
timeout 300
ONTIMEOUT local

menu title ########## PXE Boot Menu ##########
label 1
menu label ^1) Install CentOS 7.6 x64 with Local Repo using Kickstart
kernel vmlinuz
append initrd=initrd.img inst.repo=http://192.168.10.3/pub/centos/7.6.1810/os/x86_64/  inst.ks=http://192.168.10.3/pub/kicker.ks inst.ks.sendmac

Started dnsmasq in the foreground. Saw no errors.

Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 available DHCP range: 192.168.10.200 -- 192.168.10.207
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 vendor class: PXEClient:Arch:00000:UNDI:002001
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 DHCPREQUEST(eth1) 192.168.10.202 00:1b:21:6c:00:93
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 tags: eth1
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 DHCPACK(eth1) 192.168.10.202 00:1b:21:6c:00:93
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 1:netmask, 2:time-offset, 3:router, 4, 5,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 6:dns-server, 11, 12:hostname, 13:boot-file-size,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 15:domain-name, 16:swap-server, 17:root-path,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 18:extension-path, 22:max-datagram-reassembly,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 23:default-ttl, 28:broadcast, 40:nis-domain,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 41:nis-server, 42:ntp-server, 43:vendor-encap,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 50:requested-address, 51:lease-time, 54:server-identifier,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 58:T1, 59:T2, 60:vendor-class, 66:tftp-server,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 67:bootfile-name, 128, 129, 130, 131, 132,
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 requested options: 133, 134, 135
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 next server: 192.168.10.123
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 broadcast response
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  1 option: 53 message-type  5
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option: 54 server-identifier  192.168.10.123
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option: 51 lease-time  8h
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size: 11 option: 67 bootfile-name  pxelinux.0
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option: 58 T1  4h
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option: 59 T2  7h
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option: 28 broadcast  192.168.10.255
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  7 option: 15 domain-name  chacha.mo
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size: 24 option:210   66:74:70:3a:2f:2f:31:39:32:2e:31:36:38:2e...
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size: 26 option:209   2f:76:61:72:2f:6c:69:62:2f:74:66:74:70:62...
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option: 42 ntp-server  192.168.10.1
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option:  6 dns-server  192.168.10.2
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option:  3 router  192.168.10.1
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  4 option:  1 netmask  255.255.255.0
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size:  9 option: 60 vendor-class  50:58:45:43:6c:69:65:6e:74
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size: 17 option: 97 client-machine-id  00:00:00:00:00:00:00:00:00:00:00:00:1f:d0...
Jun  9 20:07:01 dnsmasq-dhcp[21523]: 577503379 sent size: 79 option: 43 vendor-encap  06:01:03:08:07:80:00:01:c0:a8:0a:7b:09:19...
1
  • Any luck? I'm having this problem as well. :(
    – Dylan
    Commented Oct 21, 2020 at 18:23

2 Answers 2

1

In the DHCP protocol, there are two ways to specify the PXE boot filename and the TFTP server address to load it from:

  • either using the legacy BOOTP fields (as DHCP is an extension of BOOTP)
  • or using newer DHCP options for the same purpose.

Apparently dnsmasq uses the latter method by default... and I've encountered an otherwise quite modern PXE firmware that was slightly buggy in handling the newer-style options.

(If I recall correctly, it was a motherboard-integrated Intel NIC manufactured in 2011 or so. I think it added an extra 0x00 byte where it did not belong. If it's the same bug, you might see the PXE firmware trying to resolve "192.168.10.123\0" as a DNS name instead of properly using the IP address directly.)

Try adding this line to your dnsmasq configuration:

dhcp-no-override

It tells dnsmasq to use the older way, which is the "simple and safe" method according to dnsmasq man page.

1

I had the same issue on a centos8 build for a pxe-boot server... My issue turned out to be UDP ports were not open

[root@kickstart /]# firewall-cmd --add-port={4011/udp,69/udp} --permanent success [root@kickstart /]# firewall-cmd --reload success

was my fix.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .