[Dnsmasq-discuss] pxe-service line for UEFI system?

Michal Zatloukal myxal.mxl at gmail.com
Mon Jan 6 13:55:20 GMT 2020


Hi.
I'm putting together a "booting section" fo my config, where I want to
provide various boot images, according to the machine architecture
provided by the client. As I understand the pxe-service functionality,
there are 2 ways to to netboot:
- either provide bootfile-name (67), which the client downloads
immediately and executes, or
- provide pxe menu, (prompt, items), within option 43, client makes a
selection,  DHCP provides filename for the selected item, and from
there it's the same as the above.

The config (attached below [1]) works fine for PC-BIOS, but I just
can't get dnsmasq to provide any PXE menu items to X86-64_EFI clients.
Tried the CSA keyword (X86-64_EFI), integer (7), removed the skipmenu
tag filter, commented out all pxe options specific to other
architectures, nada. For the UEFI client (using vmware VM), the
provided option 43 only contains the prompt suboption, and end
character (the VM doesn't display anything and just goes back to boot
menu, but that's down to their PXE ROM, I assume). Double-checked CSA
provided by the client, it is indeed 7 (+
PXEClient:Arch:00007:UNDI:003016 in VendorClass).  What am I missing?

The dnsmasq instance is a full DHCP server, not just proxy. I can
private-message the full config if you need it. I'm on ubuntu-provided
version 2.80-1ubuntu2.

Cheers,
MZ

[1]
# set custom tag for matching architectures - used for option that
don't have implicit filtering
dhcp-match=set:efi-arm64,option:client-arch,11
dhcp-match=set:efi-arm32,option:client-arch,10
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

# iPXE will make a 2nd DHCP request with custom user class - this is
where we provide path for script to run
dhcp-userclass=set:ipxe,iPXE

## Script for iPXE
dhcp-boot=tag:ipxe,"http://${dhcp-server}/shared/scripts/main.ipxe"

# Don't offer menu to ipxe- or directboot-tagged requests
#tag-if=set:directboot,tag:vmware
tag-if=set:skipmenu,tag:ipxe
tag-if=set:skipmenu,tag:directboot

# Directboot mappings
dhcp-boot=tag:bios,tag:skipmenu,tag:!ipxe,ipxe/undionly.kpxe
dhcp-boot=tag:efi-x86_64,tag:skipmenu,tag:!ipxe,ipxe/ipxe.efi

# ...or go through a menu
pxe-prompt=tag:!skipmenu,"Where do you want to go today?"

# Common menu
pxe-service=tag:!skipmenu,x86PC,"Boot from local disk"
pxe-service=tag:!skipmenu,X86-64_EFI,"Boot from local disk"

# BIOS menu
pxe-service=tag:!skipmenu,x86PC,"Raspberry Pi - pxelinux",bios/pxelinux.0
pxe-service=tag:!skipmenu,x86PC,"Raspberry Pi - ipxe - kpxe",ipxe/undionly.kpxe
pxe-service=tag:!skipmenu,x86PC,"Raspberry Pi - ipxe -
kkpxe",ipxe/undionly.kkpxe

# UEFI menu
pxe-service=tag:!skipmenu,X86-64_EFI,"Raspberry Pi - ipxe - UEFI",ipxe/ipxe.efi

## Add custom DHCP option for iPXE - extra options for clonezilla cmdline
dhcp-option-force=tag:nd1,tag:ipxe,129,"live-netdev=eth1"
dhcp-option-force=tag:nd0,tag:ipxe,129,"live-netdev=eth0"



More information about the Dnsmasq-discuss mailing list