How to get the FOG server to broadcast PXE info?



  • I installed CentOS + FOG onto a laptop and enabled the DHCP server during the install, and have been using that for testing. It worked well, though I ran into complications with that, as the network’s actual DHCP+DNS server were conflicting with the laptop.

    I got some server space for a CentOS VM, so I’m working on moving from the laptop to the server. I fresh-installed FOG, and chose not to accept any of the DHCP settings. FOG is up and running, I can log into the web interface, but now I can’t PXE boot. What’s the best way forward? I didn’t find much in the way of documentation.


  • Moderator

    @ckasdf OK what I would recommend is for you to disable pxe booting on your router and install dnsmasq on your fog server. Your router is and always will be pointing to itself as the next server. Dnsmasq will only supply the pxe boot information to your target computers, your router will continue to manage your IP addresses in this configuration.

    https://forums.fogproject.org/topic/12796/installing-dnsmasq-on-your-fog-server
    If you use my configuration file (ltsp.conf) exactly and replace every instance of <fog_server_IP> with your fog server’s IP address you will be up and running in about 10 minutes (the greater and less than signs must be removed too). The nice thing about dnsmasq running on your fog server is if you shutdown the fog server, dnsmasq is also disabled so then no pxe boot will happen. When fog is running and dnsmasq is running you will have pxe boot capabilities.



  • @george1421 You weren’t kidding about the 10 minutes, that was easy! There was another article on DNSMASQ that I had looked at before putting up this post, which looked mega complicated. Likely it was intended to do more than just PXE stuff. I haven’t deployed anything, but I registered a computer successfully after booting to PXE, so now I just have to migrate from laptop to server. w00t!



  • This post is deleted!

  • Moderator

    @ckasdf That is correct, remove dhcp options 66 and 67 since your router will not behave correctly. Then setup dnsmasq on your fog server. Once dnsmasq is running then you should be able to pxe boot right away. Actually dnsmasq will override dhcp option 66 and 67, but its best to remove them so you don’t forget about them later.



  • So to make sure I understand, essentially have the two options 66 & 67 turned back off that I had turned on the other day, then set up dnsmasq? Anything else I need to change on the router?


  • Moderator

    @ckasdf OK what I would recommend is for you to disable pxe booting on your router and install dnsmasq on your fog server. Your router is and always will be pointing to itself as the next server. Dnsmasq will only supply the pxe boot information to your target computers, your router will continue to manage your IP addresses in this configuration.

    https://forums.fogproject.org/topic/12796/installing-dnsmasq-on-your-fog-server
    If you use my configuration file (ltsp.conf) exactly and replace every instance of <fog_server_IP> with your fog server’s IP address you will be up and running in about 10 minutes (the greater and less than signs must be removed too). The nice thing about dnsmasq running on your fog server is if you shutdown the fog server, dnsmasq is also disabled so then no pxe boot will happen. When fog is running and dnsmasq is running you will have pxe boot capabilities.



  • @george1421 The DHCP server is running on a Cisco router. I have confirmed the router is on the same subnet as the FOG server and target computers.


  • Moderator

    @ckasdf What device are you using for your dhcp server? I have seen this behavior with router based dhcp servers. If this IS a router that is managing your dhcp server, is your dhcp server, fog server, and target computers all on the same subnet?



  • Thanks for the info, George.

    My PXE deployment environment is going to be completely UEFI, so no need for dual capability DHCP. I had a guy in the networking side of things add options 66 (FOG IP address) & 67 (ipxe.efi), and progressed a little further, but then got stuck again.

    >>Start PXE over IPv4..
      Station IP address is [laptop's IP]
    
      Server IP address is [DHCP gateway's IP]
      NBP filename is ipxe.efi
      NBP filesize is 0 BytesPXE-E18: Server response timeout.
    

    Thoughts on how to proceed from here? I’m guessing that it is expecting the FOG server’s IP on that 3rd line, rather than the DHCP server.


  • Moderator

    PXE booting is reliant on your dhcp server. When FOG was your dhcp server it was providing the required settings needed to PXE boot. Now that you are using your business dhcp server you will need to update that service with the settings needed to pxe boot. You will need to set dhcp options 66 {next-server} to the IP address of your fog server and dhcp option 67 {boot-file} to undionly.kpxe for bios based computers or ipxe.efi for uefi based computers.

    If you need to support both types of computers in your environment and you have a linux or windows 2012 dhcp server or newer there is a wiki page that shows how to setup dynamic dhcp settings:

    https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence#Using_Windows_Server_2012_.28R1_and_later.29_DHCP_Policy


Log in to reply
 

368
Online

7.4k
Users

14.5k
Topics

136.8k
Posts