PXE legacy & uefi config

Hi! use OpenWrt 22.03.5
I need config DHCP settings
in /etc/config/dhcp
for other PXE server,

i add -
config boot 'linux'
option filename 'pxelinux.0'
option serveraddress '10.10.10.13'
option servername 'pxe'

and it works fine with virtual and old hardware pc
but not with new uefi hardware

what is the actual syntax for 22.03 openwrt

  1. in debian manual dnsmasq:
    https://wiki.debian.org/PXEBootInstall

pxe-service=x86PC, "PXELINUX (BIOS)", "pxelinux.0"
pxe-service=X86-64_EFI,"PXE (UEFI)","grubx64.efi"

  • other UEFI type identifier, see RFC4578 section-2.1

pxe-service=2, "PXELINUX (0002-EFI)", "grubx64.efi"
pxe-service=6, "PXELINUX (0006-EFI)", "grubx64.efi"
pxe-service=7, "PXELINUX (0007-EFI)", "grubx64.efi"
pxe-service=8, "PXELINUX (0008-EFI)", "grubx64.efi"
pxe-service=9, "PXELINUX (0009-EFI)", "grubx64.efi"

  1. manual from anya - config /etc/dnsmasq.conf
    DNSmasq SCCM Legacy BIOS and UEFI PXE Coexistence

  2. The format appears to have changed slightly for the upcoming 22.03 release, the rules now look like this
    PXE legacy & efi co-existence

please help, give me an actual example of the setup
for network boot in uefi mode

config match
        option networkid 'bios'
        option match '60,PXEClient:Arch:00000'
config match
        option networkid 'efi64'
        option match '60,PXEClient:Arch:00009'
config match
        option networkid 'efi64'
        option match '60,PXEClient:Arch:00007'
config userclass
        option networkid 'ipxe'
        option userclass 'iPXE'
config boot
#        option filename         'tag:bios,tag:!ipxe,bios/lpxelinux.0'
        option filename         'tag:bios,tag:!ipxe,bios/undionly.kpxe'
        option serveraddress    '192.168.1.1'
        option servername       'router'
config boot
        option filename         'tag:bios,tag:ipxe,bios/ipxe/boot.ipxe'
        option serveraddress    '192.168.1.1'
        option servername       'router'
config boot
#        option filename         'tag:efi64,tag:!ipxe,efi64/syslinux.efi'
        option filename         'tag:efi64,tag:!ipxe,efi64/snponly.efi'
        option serveraddress    '192.168.1.1'
        option servername       'router'
config boot
        option filename         'tag:efi64,tag:ipxe,efi64/ipxe/boot.ipxe'
        option serveraddress    '192.168.1.1'
        option servername       'router'

this config uses iPXE. must put iPXE files to tftp and make config

4 Likes