I'm trying to set configure dnsmasq to point dhcp clients to a PXE server running on another machine. Specifically, the PXE server is running Netboot.xyz as a container within docker. The intention is to have the ability to load different bootloaders based on the architecture used by the client.
Example:
legacy 32bit bios = load netboot.xyz.kpxe
UEFI 32/64bit = load netboot.xyz.efi
I found [THIS] regarding Architecture detection within PXE, which explains what integers specify what architecture
the creator of this container has some documentation [HERE] on how to set this up with OpenWRT but their uci commands do not produce the intended results.
uci set dhcp.@dnsmasq[0].dhcp_match=set:bios,60,PXEClient:Arch:00000
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:bios,netboot.xyz.kpxe,,YOURSERVERIP
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi32,60,PXEClient:Arch:00002
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi32,netboot.xyz.efi,,YOURSERVERIP
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi32-1,60,PXEClient:Arch:00006
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi32-1,netboot.xyz.efi,,YOURSERVERIP
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi64,60,PXEClient:Arch:00007
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi64,netboot.xyz.efi,,YOURSERVERIP
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi64-1,60,PXEClient:Arch:00008
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi64-1,netboot.xyz.efi,,YOURSERVERIP
uci set dhcp.@dnsmasq[0].dhcp_match=set:efi64-2,60,PXEClient:Arch:00009
uci set dhcp.@dnsmasq[0].dhcp_boot=tag:efi64-2,netboot.xyz.efi,,YOURSERVERIP
uci commit
/etc/init.d/dnsmasq restart
It looks like the each pair of commands simply overwrites the previous dhcp_match=
and dhcp_boot=
settings rather than add to the list. so I just edited /etc/config/dhcp and added the lines manually. (would this be the proper time to use "uci add_list
... "?)
When I attempt to boot a client machine (Virtualbox PXE Client) it just sits at the screen where it's contacting the dhcp server and does nothing.
I'm not sure what other information i should provide. Let me know.