Configuring dnsmasq with UEFI for PXE.

  • Configuring dnsmasq with UEFI for PXE.

    Using dnsmasq 2.76 and Fog rc 36.


    What else needs to be done to ltsp.conf?



  • Senior Developer

    @KnightRaven What if you uncomment the “dhcp-no-override” and restart?

  • @george1421
    OK another pcap AND the ltsp just in case.

    1_1481923279812_output4.pcap 0_1481923279811_ltsp.conf

  • @george1421
    here is the ltsp again…

  • @george1421
    Our true DHCP server is not on same subnet(it’s located in a whole other building). However my Fog server that also runs dnsmasq as proxy and the test laptop is on the same local switch.
    Here is the output…

  • Moderator

    If your fog server, target system, and dhcp server on the same subnet? If so lets capture a log of the pxe booting process.

    1. install tcpdump on your fog server.
    2. Launch tcpdump with the following command sudo tcpdump -w output.pcap port 67 or port 68 or port 69 or port 4011
    3. pxe boot your target computer until you get the errir
    4. press ctrl-c on the console to stop the tcpdump program
    5. you can review it with wireshark or post it here and we will review it.

    We really need to see what is going down the network wire during dhcp booting.

  • @george1421
    OK, so far it boots legacy and boots UEFI in DHCP(non proxy) mode only. When I leave dnsmasq in proxy mode PXE does not receive anything(no menu) and will just time out to pressing F* key options to reboot.

    I tried doing a tcpdump. But not sure what to look for myself. I did see where it was trying to offer the ipxe.efi file. Perhaps you have a way to narrow the results?

  • Moderator

    Once you get dnsmasq setup and pulling the correct file, and IF it doesn’t work we’ll need to grab a quick pcap file of the dhcp / pxe booting process. The answer will be in the pcap. But lets not go there unless we need to. But the answer is pretty close once you get dnsmasq pulling the proper file.

  • Senior Developer

    @KnightRaven DNSMasq will use any file within the directory.

    So simply copying and maintaining “Backup” files in the directory will not suffice, unfortunately.

  • @Tom-Elliott
    Alrighty, a new day, another dollar, and fresh eyes.
    Yes I have been restarting dnsmasq. Didn’t realize it would use any ltsp file(maybe any file?) in that folder. And so was getting combined info/options. Still wasn’t working for UEFI in proxy mode when I left.
    At another location that I will try working on and see what happens now that I know not to leave copies in the dnsmasq.d folder.

  • Senior Developer

    @KnightRaven After making the changes to the ltsp.conf file, are you restarting the dnsmasq service?

    Making the changes is the “first” part, but the configuration is loaded when the service starts. Any additional changes you make will not take effect until after the service is restarted.

  • @george1421
    Well So far it’s not working. I’m sure I’m missing something but its getting too late. I might can try again tomorrow.

    I even tried making a new ltsp.conf file with just your info.

    Actually its still picking up the old… I have restarted dnsmasq several times. Legacy is still booting with the old prompt text. Actually appears to be combining somehow. Ugh.

    that’s weird. I’ll have to look tomorrow.

    Thanks for your time. Y’all are always a big help.

    Jason Bradley

  • Moderator

    @KnightRaven Right the vendor class is used to identify what the client is, then set the flag to indicate to the dhcp-boot what boot file to send. You need both parts. You have extra stuff set in your config file that should be disabled. That is why I recommended to start with my config file. Just move your config file to a safe location if you need to reference it.

  • @george1421
    Awesome, looks like I needed to finish adding vendor info as well as add boot info.

    Will give that a shot before I get out.

  • Moderator

    @george1421 This document explains what is going on in the config file:

  • Moderator

    I would start with this config file. Replace with the IP address of your FOG server

    # Don't function as a DNS server:
    # Log lots of extra information about DHCP transactions.
    # Set the root directory for files available via FTP.
    # The boot filename, Server name, Server Ip Address
    # dhcp-boot=undionly.kpxe,,
    # Disable re-use of the DHCP servername and filename fields as extra
    # option space. That's to avoid confusing some old or broken DHCP clients.
    # dhcp-no-override
    # PXE menu.  The first part is the text displayed to the user.  The second is the timeout, in seconds.
    pxe-prompt="Press F8 for boot menu", 1
    # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
    # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
    # This option is first and will be the default if there is no input from the user.
    # PXEClient:Arch:00000
    pxe-service=X86PC, "Boot BIOS PXE", undionly.kpxe
    # PXEClient:Arch:00007
    pxe-service=BC_EFI, "Boot UEFI PXE-BC", ipxe.efi
    # PXEClient:Arch:00009
    pxe-service=X86-64_EFI, "Boot UEFI PXE-64", ipxe.efi