Dnsmasq UEFI http boot problem

Hi,

i had some troble to configure the pxe http uefi support on dnsmasq for new dell laptop easy debian install from my openwrt router.

Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 DHCPREQUEST(br-lan) 192.168.218.226 38:14:28:3e:b8:43 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 DHCPACK(br-lan) 192.168.218.226 38:14:28:3e:b8:43 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 1:netmask, 2:time-offset, 3:router, 4, 5, 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 6:dns-server, 12:hostname, 13:boot-file-size, 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 15:domain-name, 17:root-path, 18:extension-path, 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 22:max-datagram-reassembly, 23:default-ttl, 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 28:broadcast, 40:nis-domain, 41:nis-server, 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 42:ntp-server, 43:vendor-encap, 50:requested-address, 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 51:lease-time, 54:server-identifier, 58:T1, 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 59:T2, 60:vendor-class, 183, 67:bootfile-name, 
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 requested options: 97:client-machine-id
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 tags: lan, set:efi-http, br-lan
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 server name: http://192.168.250.129/boot/grub2/grub.efi
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 next server: 192.168.218.1
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  1 option: 53:message-type  05
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option: 54:server-identifier  192.168.218.1
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option: 51:lease-time  00:00:a8:c0
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option: 58:T1  00:00:54:60
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option: 59:T2  00:00:93:a8
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size: 13 option: 67:bootfile-name  **74:61:67:3a:65:66:69:2d:68:74:74:70:00**
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option:  1:netmask  255.255.255.0
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option: 28:broadcast  192.168.218.255
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option:  6:dns-server  192.168.218.1
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size: 15 option: 15:domain-name  mydomain.net
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size: 10 option: 60:vendor-class  48:54:54:50:43:6c:69:65:6e:74
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option:  3:router  192.168.250.129
Jul  6 16:27:00 router11 daemon.info dnsmasq-dhcp[3300]: 1916235715 sent size:  4 option: 67:bootfile-name  0a:0a:0a:01

as you can see the bootfile was passed as hex value instead of a string....

the correct string is passed as servername...

in a debian11 dnsmasq was prety simple to configure it with this 3 simple lines:

dhcp-vendorclass=set:efi-http,HTTPClient:Arch:00016
dhcp-option-force=tag:efi-http,60,HTTPClient
dhcp-boot=tag:efi-http,"http://172.16.3.1/boot/grub2/grub.efi"

ad as you can see the correct beahviour of the response:

Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 next server: 192.168.69.1
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 broadcast response
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  1 option: 53 message-type  5
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  4 option: 54 server-identifier  192.168.69.1
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  4 option: 51 lease-time  1h
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size: 43 option: 67 bootfile-name  **http://192.168.250.129/boot/grub2/grub.efi**
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  4 option: 58 T1  30m
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  4 option: 59 T2  52m30s
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  4 option:  1 netmask  255.255.255.0
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  4 option: 28 broadcast  192.168.69.255
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  4 option:  3 router  192.168.69.1
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size:  4 option:  6 dns-server  192.168.69.1
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size: 11 option: 15 domain-name  boot.net
Jan 28 16:34:25 debian dnsmasq-dhcp[9890]: 3188292879 sent size: 10 option: 60 vendor-class  48:54:54:50:43:6c:69:65:6e:74
i tired with this config on openwrt:
dhcp-option=60,HTTPClient #otherwise the hex was wrong
dhcp-boot=http://boot.example.com/ipxe.efi-x86_64 #i need it in string not in hex

ty

Regards

mkdir /etc/dnsmasq.d
Add conf-dir=/etc/dnsmasq.d,*.conf to /etc/dnsmasq.conf
Add the file /etc/dnsmasq.d/pxe.conf

The content of my pxe.conf file, you can refer to the modification

dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-match=set:efi-x86_64,option:client-arch,9
dhcp-match=set:efi-x86,option:client-arch,6
dhcp-match=set:bios,option:client-arch,0
dhcp-match=set:ipxe,175
dhcp-boot=tag:efi-x86_64,ipxe64.efi
#dhcp-boot=tag:efi-x86_64,grub.efi
dhcp-boot=tag:efi-x86,ipxe32.efi
dhcp-boot=tag:ipxe,menu.ipxe
#dhcp-boot=tag:bios,grldr
dhcp-vendorclass=set:efi-http,HTTPClient:Arch:00016
dhcp-option-force=tag:efi-http,60,HTTPClient
dhcp-boot=tag:efi-http,"http://192.168.88.1/data/pxe/ipxe64.efi"