DNSMasq Help for iPXE stuff

  • Developer

    As the title says.

    I am looking for help in getting the dnsmasq to boot the undionly.kpxe. I have been beating my head against the wall since the 0.33b switched to iPXE. I’ve used a few guides online, but I will spare you the drab, because NONE of them have worked thus far. Most only return that the boot file can not be found. The ONLY boot file I can successfully find is pxelinux.0 and I tried using it to chain load as well.

    I have tried editing the current working dnsmasq settings to include the undionly.kpxe. I only get errors returned stating the boot file can not be found.

    After attempting to chain load from a pxe file I am greeted with a command prompt stuck at “boot:”

    I HAVE to use this service in my environment it is the only way I can talk to my machines properly with all the networking junk. So if someone has ideas or troubleshooting steps, I am all ears!

  • Developer

    in order to use the boot commands, you need to symlink undionly.kpxe to undionly.0 because of the appending .0 but then you can issue commands as normal, it seems after we got the dhcp-boot line correct the commands work again.

    symlink undionly

    cd /tftpboot
    sudo ln -s undionly.kpxe undionly.0

    enable the boot lines

    pxe-prompt="Press F8 for boot menu", 3
    # 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.
    pxe-service=X86PC, "Boot from network", undionly

  • Developer

    Thanks junhacker, that helped a bit more. Tom and I hit our heads together for a few days but we finally figured it out, what we have now is a REAL working use of dnsmasq with the undionly.kpxe boot file and using the boot.php as Tom has intended. This is very basic and gets the pxe boot menu working. BUT the important thing is it uses the real files and not faking it like before.

    This thing is very temperamental, so as you add options it may break!

    Here is a working set up

    # Don't function as a DNS server:
    # Log lots of extra information about DHCP transactions.
    # Dnsmasq can also function as a TFTP server. You may uninstall
    # tftpd-hpa if you like, and uncomment the next line:
    # enable-tftp
    # Set the root directory for files available via FTP.
    # The boot filename, Server name, Server Ip Address
    # rootpath option, for NFS
    # kill multicast
    # 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.
    # 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", 3
    # 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.
    #pxe-service=X86PC, "Boot from network", pxelinux
    # A boot service type of 0 is special, and will abort the
    # net boot procedure and continue booting from local media.
    #pxe-service=X86PC, "Boot from local hard disk", 0
    # If an integer boot service type, rather than a basename is given, then the
    # PXE client will search for a suitable boot service for that type on the
    # network. This search may be done by multicast or broadcast, or direct to a
    # server if its IP address is provided.
    # pxe-service=x86PC, "Install windows from RIS server", 1
    # This range(s) is for the public interface, where dnsmasq functions
    # as a proxy DHCP server providing boot information but no IP leases.
    # Any ip in the subnet will do, so you may just put your server NIC ip here.
    # Since dnsmasq is not providing true DHCP services, you do not want it
    # handing out IP addresses.  Just put your servers IP address for the interface
    # that is connected to the network on which the FOG clients exist.
    # If this setting is incorrect, the dnsmasq may not start, rendering
    # your proxyDHCP ineffective.
    # This range(s) is for the private network on 2-NIC servers,
    # where dnsmasq functions as a normal DHCP server, providing IP leases.
    # dhcp-range=,,8h
    # For static client IPs, and only for the private subnets,
    # you may put entries like this:
    # dhcp-host=00:20:e0:3b:13:af,,client111,infinite

    This boots straight to the pxe menu, if you want to add boot options, you figure it out :p

  • Developer

    i found a tutorial for ipxe with DNSMasq http://www.heath-bar.com/blog/?p=326
    looks like it could give you some ideas on what’s wrong

  • Developer

    there has been partial success.

    I found that, for whatever reason, when we use the call line

  • Developer

    bad news everyone… what I thought was working, is not.

    It turns out the pxelinux.0 file was still hanging around and that has been what I have been chainloading and booting from, not the undionly.kpxe.

    Because I use ip-helpers I am not sure if they are causing an issue or not.

    So I still need help in adjusting the settings, ideas on things to tweak in order to get my network booting the correct pxe file.

    I have removed the pxelinux.0 file and now regardless of what I supply in the dnsmasq ltsp.conf file I always receive the PXE-T01 error file not found.

    any attempts to collect the file with a tftp get command will complete successfully.

  • Developer

    [S]Not that I doubted you, but I gave this a go with the undionly.kpxe in place of pxelinux.0 and it went off without a hitch![/S]

    [S]Thanks for your insight Tom![/S]

    See next post

  • Senior Developer

    I think the phrasing is backwards, but same kind of thing.

    The undionly.kpxe file IS, for all intents and purposes, the pxelinux.0 file.

    So change your Option 67 line to point to undionly.kpxe rather than pxelinux.0.

  • Developer

    Tom has informed me that the undionly.kpxe file IS the pxelinux.0 file. So with that being said, we don’t have to rename the pxelinux file and we can use undionly.kpxe in place. I will test and verify/update wiki when I have confirmed this.

    Thanks for that Tom, I have adjusted my statement as not to confuse anyone.

  • Developer

    This post is deleted!

  • Developer

    This post is deleted!

  • Developer

    the undionly.kpxe is made to automatically look for the file default.ipxe in the same directory as itself. for some reason i don’t think it could find it, and that’s why it wasn’t working for you.

  • Developer

    THANK YOU FOR THE HELP!!! THAT DID IT!!! It had to be the ipxe.krn in the default file that was where I kept getting stuck! I kept using the undionly.kpxe

    So for reference this is how I set it up.

    Installed DNSMasq and used the settings recommended in the wiki. I edited some of the information, but I left it to boot pxelinux.0. I added the line dhcp-authoritative to the bottom of the ltsp.conf and saved the file. I will post my set up at the end of my write up.

    I then renamed the pxelinux.0.old in the /tftpboot folder to pxelinux.0

    sudo mv /tftpboot/pxelinux.0.old /tftpboot/pxelinux.0

    Now I created a /pxelinux.cfg/default.

    cd tftpboot
    sudo mkdir /pxelinux.cfg
    cd pxelinux.cfg
    sudo gedit default

    I used Junkhackers recommendation on the default file information substituting my ip address for the fog server:

    DEFAULT vesamenu.c32
    LABEL fog
        kernel ipxe.krn dhcp && chain http://(fog-server-ip-address)/fog/service/ipxe/boot.php?mac=${net0/mac}
    PROMPT 0
    TIMEOUT 01

    Then test!

    as promised my ltsp.conf

    pxe-prompt="Press F8 for boot menu", 0
    pxe-service=X86PC, "Boot from network", pxelinux

  • Developer

    well, i know that i’ve had chainloading working from pxelinux.0 with the ipxe.krn one with the following in the pxelinux.cfg/default file

    DEFAULT vesamenu.c32
    LABEL fog
        kernel ipxe.krn dhcp && chain http://(fog-server-ip-address)/fog/service/ipxe/boot.php?mac=${net0/mac}
    PROMPT 0
    TIMEOUT 01

  • Developer

    I’ve tried both. I’ve been focusing on undionly.kpxe, should I not be?

    After supplying either one I just sit at “boot:”

  • Developer

    i don’t have any experience with DNSMasq but i’ll help with what i can. when you tried chainloading from pxelinux.0, what ipxe file did you direct it to. ipxe.krn or undionly.kpxe?

  • Developer

    Yes, that is the guide I am working off of.

    Also taking information from:

  • Developer

    a quick search of the ipxe org website says that DNSMasq needs special configuration to work directly with ipxe. have you tried the advice on this thread? http://forum.ipxe .org/showthread.php?tid=6077

Log in to reply





Looks like your connection to FOG Project was lost, please wait while we try to reconnect.