• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Installing dnsmasq on your FOG server

    Scheduled Pinned Locked Moved
    Tutorials
    1
    1
    13.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • george1421G
      george1421 Moderator
      last edited by george1421

      Use dnsmasq on the fog server to supply the pxe boot information.

      The quick steps are this.

      1. Remove the pxe boot information from your router.
      2. Install dnsmasq service from your linux distribution’s repo
      3. 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.
      4. Create a configuration file called ltsp.conf in /etc/dnsmasq.d directory.
      5. Paste this content into that file.
      # Don't function as a DNS server:
      port=0
      
      # Log lots of extra information about DHCP transactions.
      log-dhcp
      
      # Set the root directory for files available via FTP.
      tftp-root=/tftpboot
      
      # The boot filename, Server name, Server Ip Address
      dhcp-boot=undionly.kpxe,,<fog_server_IP>
      
      # 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
      
      # inspect the vendor class string and match the text to set the tag
      dhcp-vendorclass=BIOS,PXEClient:Arch:00000
      dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
      dhcp-vendorclass=UEFI,PXEClient:Arch:00007
      dhcp-vendorclass=UEFI64,PXEClient:Arch:00009
      
      # Set the boot file name based on the matching tag from the vendor class (above)
      dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,<fog_server_IP>
      dhcp-boot=net:UEFI,ipxe.efi,,<fog_server_IP>
      dhcp-boot=net:UEFI64,ipxe.efi,,<fog_server_IP>
      
      # PXE menu.  The first part is the text displayed to the user.  The second is the timeout, in seconds.
      pxe-prompt="Booting FOG Client", 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.
      pxe-service=X86PC, "Boot to FOG", undionly.kpxe
      pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe.efi
      pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe.efi
      
      dhcp-range=<fog_server_IP>,proxy
      
      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.
      2. Save and exit your text edit.
      3. Issue the following command to restart dnsmasq service sudo systemctl restart dnsmasq
      4. Ensure that dnsmasq service is running in memory by issuing this command ps aux|grep dnsmasq. You should see more than one line in the response. If its running then go to step 10.
      5. Ensure that dnsmasq starts when the system is rebooting with sudo systemctl enable dnsmasq
      6. PXE boot a target computer.

      NOTE: If you are supporting multiple foreign subnets (not on the same subnet as your dnsmasq server, you will need to add additional with dhcp-range statements that properly describe that foreign network segment. If you fail to do this the dnsmasq server will not respond to the request from your dhcp-relay service an example of what is needed is below:

      dhcp-range=<fog_server_IP>,proxy
      dhcp-range=192.168.100.0,proxy,255.255.255.0
      dhcp-range=172.16.45.0,proxy,255.255.255.0
      

      Dhcp option 93 to hardware type table

      DHCP option 93 Client architecture|
      0 Standard PC BIOS
      6 32-bit x86 EFI
      7 64-bit x86 EFI
      9 64-bit x86 EFI (obsolete)
      10 32-bit ARM EFI
      11 64-bit ARM EFI

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      1 Reply Last reply Reply Quote 10
      • S Sebastian Roth referenced this topic on
      • george1421G george1421 referenced this topic on
      • K Koffinny referenced this topic on
      • george1421G george1421 referenced this topic on
      • george1421G george1421 referenced this topic on
      • G gabrielzeit referenced this topic on
      • george1421G george1421 referenced this topic on
      • george1421G george1421 referenced this topic on
      • george1421G george1421 referenced this topic on
      • george1421G george1421 referenced this topic on
      • george1421G george1421 referenced this topic on
      • george1421G george1421 referenced this topic on
      • Tom ElliottT Tom Elliott referenced this topic on
      • george1421G george1421 referenced this topic on
      • george1421G george1421 referenced this topic on
      • 1 / 1
      • First post
        Last post

      152

      Online

      12.0k

      Users

      17.3k

      Topics

      155.2k

      Posts
      Copyright © 2012-2024 FOG Project