ClearOS-DHCP, Fog, PXE, & dnsmasq

  • I’ve been poking around the links dealing with this, and I’m bleary-eyed.

    Keeping ClearOS in control of dhcp, how do I address PXE bios & uefi boots? I did this fine with windows 66/67 direction, but the guides don’t quite align with what I’m doing, perhaps partly because ClearOS uses dnsmasq for this, and overwrites dhcp.conf with what it finds in dnsmasq configs.

    First, am I correct in understanding that I could run dnsmasq on clear or fog box with the same effect?

    Second, if I can run dnsmasq on fog leaving dhcp to ClearOS, what modification do I need to make to the outlined ltsp.conf file found at the following link work? I’m assuming the linked tutorial fails because it is with the expectation dhcp is on fog. Commenting the last line out lets the service start without errors, but I’m not getting boot files yet.,

  • Senior Developer

    @geardog Two things from the tutorial I just want to point out:

    1. Make sure its at least version 2.76 by issuing this command at the fog server’s linux command prompt sudo dnsmasq -v. The version needs to be 2.76 or later.

    and as George already mentioned here:

    1. Be sure to replace <fog_server_ip> exactly with the IP address of your fog server. Be aware that <fog_server_ip> appears multiple times in the config file.
  • Moderator

    @geardog said in ClearOS-DHCP, Fog, PXE, & dnsmasq:


    If you read the tutorial those greater and less than signs should not be in the final config file. They are part of the variable name. Once you clear that up it should work. The configuration has been proven for several years now. Understand that dnsmasq will do a lot more than we have it configured for, but in this state its only ProxyDHCP.

  • @sebastian-roth

    Thanks for that. I’m using the linked tutorial in the correct context!

    Fog 1.5.9 on Ubuntu 18 (sorry) spit back an error on systemctl restart dnsmasq “Bad dhcp-range at line 38” which was caused by including the <> around the IP. wow …

  • Senior Developer

    @geardog The linked tutorial and config is about running dnsmasq in DHCPProxy mode. So you’d have a “normal” DHCP server handing out just the IP/router/DNS information to the client and dnsmasq (in the FOG server) can add the PXE boot information for client to do netboot.

    All those machines being on the same subnet should make things work without too much issues. If you have those in different subnets than there is more you need to do.