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

    FOG Portable

    Scheduled Pinned Locked Moved General
    3 Posts 2 Posters 49 Views
    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.
    • J
      jmeyer
      last edited by jmeyer

      Hello,

      i try to build a FOG server that I could move to different network.

      I wonder it the “WEB HOST” and the “TFTP HOST” could be set automaticaly as the hostname of the OS. (already set manually as hostname instead of IP).

      I have ethernet and wifi on the nano computer and both are DHCP.
      How I could set route or something to say lan is for deploy (same range as current ip) and wlan is for the rest.

      Ex : my fog server ip is 192.168.0.73/24 and deploy works only on this subnet other IP (debian updates, fog updates, ntp, …) should use wifi.

      Other point, could I set fog as DHCP server only if it doesn’t have lan ip to be able to deploy with a direct link to an other computer.

      Thanks for your help

      george1421G 1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator @jmeyer
        last edited by

        @jmeyer Myself and another form moderator (Wayne Workman) came up with the concept of a mobile fog deployment server. The concept is that you would load FOG on a portable device (laptop or mini computer) with all of the necessary items for image deployment. IMO if this was going to be a truly portable computer a laptop with the built in screen and keyboard would be a better option. If you functioning as a MSP wanted to sell an imaging service than the mini or micro computer would be a better choice.

        So the concept of the mobile fog deployment server is that the portable computer would have a full fog system installed on it. To minimize setup the mobile deployment server will have its IP address assigned by the remote site’s dhcp server. In this case FOG would not be your remote’s site dhcp server but it would function as a dhcp client (more on this in a bit). The next part you need to address is how to get the pxe boot information in the remote sites dhcp environment. You will do that with dnsmasq configured in a proxy dhcp mode (I have a tutorial on how to set this up in fog in the tutorial section). In this mode the FOG server (dnsmasq) will only provide pxe boot details leaving the remote site’s dhcp server untouched. With this configuration once the mobile fog server is removed from the site no pxe booting information is left behind to cause the remote site’s issues.

        The issue you will have is that because FOG’s configuration is intended to be static, having the fog server’s IP address being assigned by dhcp will cause the FOG server to fail to pxe boot, to fix that issue Wayne created a script to automatically update the statically defined fields in FOG to make the IP addresses a bit more dynamic (note this is a fog server issue and has nothing to do with the target network or computers) That script is here: https://github.com/FOGProject/fog-community-scripts/tree/master/MakeFogMobile Looking at it that script is 8 years old, I can’t speak to the suitability of that script with the current version of FOG. It may need to be tweaked, but that’s the beauty of opensource software, if it doesn’t do what you need, you can fix it yourself.

        It is possible to create a mobile fog deployment server, and back in the day the one I used worked great. So it is possible to do with little effort.

        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!

        J 1 Reply Last reply Reply Quote 0
        • J
          jmeyer @george1421
          last edited by jmeyer

          @george1421 I have installed fog with DHCP server but DNS doesn’t work at all (no dns server appear on windows client) so I’m stuck.
          It’s my first time installing DHCP and DNS on Debian so I think I made mistakes.
          DHCP work fine.

          edit : It’s fixed. I forgot to add “option domain-name” and “option domain-name-servers” in dhcpd.conf

          For the script, I think it must be simple to set FOG as DHCP server at startup if after 10 min no IP is given from a DHCP server then set server to static IP and start DHCP and DNS services.
          And then reverse this at shutdown.
          Maybe this can be done manually first.

          edit : Here is the first script.
          I have create files ending with .dhcp for conf for external DHCP/DNS and file ending with .static for conf for local DHCP/DNS.
          It looks to work fine.

          # Configuration actuelle
          echo "Etat DNS local :"
          systemctl is-active bind9
          echo "Etat DHCP local :"
          systemctl is-active isc-dhcp-server
          echo ""
          
          loc(){
                  # Configuration DHCP local
                  echo "DHCP local"
                  # Configuration
                  if [ -e /etc/network/interfaces.static ]
                  then
                          echo "Copie interfaces"
                          cp /etc/network/interfaces.static /etc/network/interfaces
                  else
                          echo "interfaces.static not found"
                          exit 1
                  fi
                  echo "Redemarrage service reseau"
                  systemctl restart networking.service
          
                  if [ -e /etc/resolv.conf.static ]
                  then
                          echo "Copie resolv.conf"
                          cp /etc/resolv.conf.static /etc/resolv.conf
                  else
                          echo "resolv.conf.static not found"
                          exit 1
                  fi
          
                  # Services
                  systemctl start bind9
                  systemctl start isc-dhcp-server
          }
          
          ext(){
                  # Configuration DHCP externe
                   echo "DHCP externe"
                  # Configuration
                  if [ -e /etc/network/interfaces.dhcp ]
                  then
                          echo "Copie interfaces"
                          cp /etc/network/interfaces.dhcp /etc/network/interfaces
                  else
                          echo "interfaces.dhcp not found"
                          exit 1
                  fi
                  echo "Redemarrage service reseau"
                  systemctl restart networking.service
          
                  if [ -e /etc/resolv.conf.dhcp ]
                  then
                          echo "Copie resolv.conf"
                          cp /etc/resolv.conf.dhcp /etc/resolv.conf
                  else
                          echo "resolv.conf.dhcp not found"
                          exit 1
                  fi
          
                  # Services
                  systemctl stop bind9
                  systemctl stop isc-dhcp-server
          }
          
          # Demande de Configuration
          
          while true; do
              read -p "Voulez vous passer en DHCP externe ou en DHCP local? (e:externe l:local) " el
              case $el in
                  [Ee]* ) ext; break;;
                  [Ll]* ) loc; break;;
                  * ) echo "Please answer yes or no.";;
              esac
          done
          
          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          142

          Online

          12.5k

          Users

          17.5k

          Topics

          156.1k

          Posts
          Copyright © 2012-2026 FOG Project