Need help making my own Debian 9 FOG server!



  • I am an ict intern in my second year and haven’t worked much with linux based systems yet. so in my internship they set up this sort of project for me so that we can easily image our thin client laptops without needing usb’s or other drives. they wanted me to make a fog server with the following atributes:

    • Debian
    • Dnsmasq
    • TFTP Boot
    • NFS
      any idea how i might go at this al i did so far is install debian 9 desktop( i know stupid) and have configured the right static ip, the right subnet and gateway. i also use 2 ssd’s in my server 1 for the system the other one to use for images.

    any help would greatly help this newbie!



  • @unknownhost99 i just want to let everybody now that the server functions properly know thanks to everyone who replied, it was a great help and i love the service you supply keep going at it!



  • @sebastian-roth yea but the weird thing is it worked just fine yesterday and no settings or hardware changed and now its not working


  • Developer

    @unknownhost99 I have seen many routers doing very weird things DHCP vise. But go ahead if you think it’s all fine.



  • @sebastian-roth dhcp is done with the router and dnsmmasq i have it plugged in the right router so that shouldnt be the problem


  • Developer

    @unknownhost99 To me this sounds like you have more than one DHCP server in your network. Sometimes the “right” one answers first and sometimes the “wrong” one…



  • @george1421 weirdly enough dont know what the issue is we went into the menu of fog using dhcp and even manged to capture an image from it but weirdly enough when it was done., i tried to boot again and now it says no boot file found whilst booting from pxe no settings or anything has been changed


  • Moderator

    @unknownhost99 Do you mind explaining what was wrong, for others that may find the thread in the future?



  • @george1421 i fixed the issue we can now finally start with adding hosts and adding images


  • Moderator

    @unknownhost99 Please create another pcap so we can see what the client is seeing. We found a misplaced space some times causes pxe boot to fail. The PXE roms some times are not very smart.



  • @george1421 me and my boss went over the whole prgress and its working much better now although now when trying to boot from ipxe we get:
    TFTP
    file not found
    and then it exitst the pxe boot


  • Moderator

    @unknownhost99 Now in your final configuration, will the pxe booting clients be on a different subnet than your fog/dnsmasq server? If so then you need to add your fog server as the very last server in your dhcp-relay/dhcp-helper list so that your dnsmasq server will see the pxe boot requests on other subnets.



  • @george1421 we know we are looking into the dhcp which currently run by a router so if anything still goes wrong then ill update it here thanks!


  • Moderator

    @unknownhost99 Ok I see immediately what is wrong. Your dhcp server (what ever it is) is not responding to the target computer. I only see dnsmasq responding with the next server and boot file name. dnsmaq is working perfectly. The issue is that the target computer is not being offered an IP address (or any network IP information) it doesn’t know what to do.

    In a perfectly working setup with dnsmasq, you should see one discover packet from the target computer and then two offer packets. One from your dhcp server and one from dnsmasq. You can view this if you load wireshark on a windows or linux computer and view the pcap you sent.

    A perfect dhcp/pxe booting sequence is this.
    Cli: Discover
    DHCP: Offer
    DNSMASQ: Offer
    Cli: Request
    DHCP: ACK
    Cli: Chat with DNSMASQ
    Cli: tftp download from FOG server.

    Also realize that your ltsp.conf file will only support bios (legacy) booting computers. Uefi computers will fail to boot. Just be aware of this fact. There is nothing wrong with your config file, it just doesn’t have the bits for uefi booting.



  • @george1421 this is my pcap file https://drive.google.com/open?id=1TvJgG3kwDhArrjIqz_uiybfPZASLDlz8
    and this is the config file i currently use hope it helps.

    # Don't function as a DNS server:
    port=0
    
    # Log lots of extra information about DHCP transactions.
    log-dhcp
    
    # 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.
    tftp-root=/tftpboot
    
    # The boot filename, Server name, Server Ip Address
    dhcp-boot=undionly.kpxe,,x.x.x.x
    
    # rootpath option, for NFS
    #dhcp-option=17,/images
    
    # kill multicast
    #dhcp-option=vendor:PXEClient,6,2b
    
    # 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", 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
    
    # 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.
    dhcp-range=10.0.0.10,proxy
    
    # 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=192.168.0.20,192.168.0.250,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,10.160.31.111,client111,infinite```

  • Moderator

    @unknownhost99 Who’s ltsp.conf file are you using? The reason why I ask is I see a tags: entry for enp4s0.

    If you can place the fog server and pxe booting client on the same subnet the follow the instructions here to collect a pcap file of the pxe booting process. https://forums.fogproject.org/topic/9673/when-dhcp-pxe-booting-process-goes-bad-and-you-have-no-clue

    Upload the pcap to a google drive or dropbox like system and share the link with us. There is something unexpected going on here.



  • @sebastian-roth no dhcp offers were recieed it says


  • Developer

    @unknownhost99 Well, the output looks ok on first sight. What exactly is the issue? What do you see on the client? Timeout/error!?!



  • @george1421 well not yet but i am getting closer to the end some problems with the dhcp when trying the PXE boot to the fog this is my log when i use pxe boot any idea what the problem might be
    0_1513335532145_e9a6dcc9-1e84-4e17-b098-450dac46e490-image.png


  • Moderator

    @unknownhost99 So problem solved??


 

418
Online

5.4k
Users

12.6k
Topics

118.9k
Posts