- 1 Requirements
- 2 Download FOG
- 3 Git
- 4 Congratulations
- 5 Additional information on SVN and git & FOG Trunk
- 6 Check what version you're running
- 7 Video Tutorials
- 7.1 Video Tutorials
- 7.2 Installer
- 7.3 Installation manuals
- 7.4 Virtualization
- 7.5 Security
- 7.6 Troubleshooting
Before diving right into the installation of FOG you need to decide which server OS you are going to use. FOG is made to install on RedHat based distro CentOS, Fedora, RHEL amongst others as well as Debian, Ubuntu and Arch Linux. Choose whichever you like most and have knowledge about! FOG is known to work with any of the above noted systems. Many installation manuals are available.
This listing is for informational purposes only, as the required components will be automatically downloaded and installed by the FOG installation script: PHP 5/6/7, MySql 5+, Apache 2+, DHCP (any!), TFTP, FTP, NFS
The LAMP setup can also be easily adjusted for a "WAMP (Windows Apache MySQL PHP) system" though will require a bit more knowledge of what packages to use and how to integrate with the FOG system.
Please choose the distribution you have the most knowledge about, but the below list has the best support in FOG 1.3.0 right now. This list is by no means an absolute list to follow, though.
- Ubuntu 14 or higher
- Debian 8 or higher
- Red Hat 6 or higher
- Fedora 22 or higher
- Any version of Arch.
FOG was first hosted on the well known open source project platform SourceForge and you still find the current code plus released versions [there] (download as well linked on the [official homepage]. You'll get a comressed tar archive (.tar.gz) which you need to extract (anywhere is ok) before you can run the installer script (root privileges needed!).
sudo -i wget http://downloads.sourceforge.net/project/freeghost/FOG/fog_1.2.0/fog_1.2.0.tar.gz tar xzf fog_1.2.0.tar.gz cd fog_1.2.0/bin ./installfog.sh
Current development version
- To get the very latest version of FOG you need to follow the below instructions.
- Remember these are mostly betas so there are bound to be bugs, but with bugs also comes fixes of the issues found in the "Stable Release"
- If you have nodes they will also need to be upgraded! (Excluding Beta Windows Nodes)
- Update and then Install git (or 'yum' instead of 'apt-get' if you are running a RedHat based OS)
sudo apt-get update && apt-get install git
- Initial checkout and installation
sudo -i git clone https://github.com/FOGProject/fogproject.git /root/fogproject cd /root/fogproject git checkout dev-branch cd bin ./installfog.sh
Update to latest
As the development tree of FOG changes quiet often (pretty much daily!) you might want to update to the very latest version from time to time. To do this use the following commands:
cd /root/fogproject git checkout dev-branch git pull cd bin ./installfog.sh
Check your git version
cd /root/fogproject git log -1<noinclude>
- Congrats! You have now upgraded to the "bleeding edge" of FOG deployment. It is your responsibility to keep upgraded until the next "Stable Release". Until then you will see in the cloud of your Web Gui rXXXX. This indicates the revision you are now on.
- You can check for updates to the revisions under Fog Configuration. This will state the version you are on and what the lastest revision is.
Additional information on SVN and git & FOG Trunk
FOG developmental versions are called "revisions." Revisions are normally stable for the PRIMARY functions of FOG: IMAGE > NAME > JOIN TO DOMAIN using UNICAST and MULTICAST
Other features in FOG revisions (not directly related to the imaging process) are sometimes broken. The developers are pretty good about fixing issues when someone finds and reports it. These other features usually do not impact imaging. Additionally, if you encounter an issue, let us know about it in the forums and someone is likely to help and/or fix it quickly, making a new "revision" that you can download and install very quickly using the above methods.
However, with the current revisions, you'll benefit from a plethora of bug fixes, a much wider range of supported host hardware, and new features!
Updating FOG from one revision to a newer one usually takes less than a minute or two. Fog uses your settings from previous installations so you don't have to answer questions about the installation or set additional configurations. FOG supports upgrading, but not downgrading. If you would like to roll-back to a previous version, generally, this can only be done by reverting to a previous snap-shot taken from a virtualized machine that FOG is installed on.
It's advised to backup your database and export your hosts (and label the files) prior to upgrading. You can do that like this on 1.2.0 and higher:
- FOG Configuration -> Configuration Save -> Export
- Host Management -> Export Hosts -> Export
You may install FOG Trunk on a server that does not have FOG installed already.
Check what version you're running
On your FOG's web GUI login page, you can quickly check what revision you're running:
Note: Video plays in Chrome or Firefox with html5 plugin
External video link: FOG upgrade to trunk - Git method
External video link: FOG upgrade existing Git repo
The FOG installer comes as a complex shell script that will handle all the package installs and configuring the services for you. It must be run as root (sudo works as well) to be able to set things up properly. Running the installer on a new system for the first time it will ask you a couple of questions regarding your network configuration and services you want to install.
FOG can be installed in two different modes. First is the normal FOG server which does all of the work. Choose this option if you only want have a single FOG server in your network. The second option is to install a FOG storage node which will serve as a second place to store images on and serve images to more clients (when doing unicast). Here you can find some more information about the two modes.
FOG Server installation modes: * Normal Server: (Choice N) This is the typical installation type and will install all FOG components for you on this machine. Pick this option if you are unsure what to pick. * Storage Node: (Choice S) This install mode will only install the software required to make this server act as a node in a storage group
Command line options
The FOG installer has quite a few command line options. See the output below. You might want force FOG to setup the web interface via HTTPS, change the default PXE boot file or web root directory.
./installfog.sh --help ... * Found FOG Settings from previous install at: /opt/fog/.fogsettings * Performing upgrade using these settings Starting Debian based Installation Usage: ./installfog.sh [-h?dEUuHSCKYXT] [-f <filename>] [-D </directory/to/document/root/>] [-c <sslPath>] [-W <webroot/to/fog/after/docroot/>] [-B </backup/path/>] [-s <192.168.1.10>] [-e <192.168.1.254>] [-b <undionly.kpxe>] -h -? --help Display this info -d --no-defaults Don't guess defaults -U --no-upgrade Don't attempt to upgrade -H --no-htmldoc No htmldoc, means no PDFs -S --force-https Force HTTPS redirect -C --recreate-CA Recreate the CA Keys -K --recreate-keys Recreate the SSL Keys -Y -y --autoaccept Auto accept defaults and install -f --file Use different update file -c --ssl-file Specify the ssl path defaults to /opt/fog/snapins/ssl -D --docroot Specify the Apache Docroot for fog defaults to OS DocumentRoot -W --webroot Specify the web root url want fog to use (E.G. http://127.0.0.1/fog, http://127.0.0.1/) Defaults to /fog/ -B --backuppath Specify the backup path --uninstall Uninstall FOG -s --startrange DHCP Start range -e --endrange DHCP End range -b --bootfile DHCP Boot file -E --no-exportbuild Skip building nfs file -X --exitFail Do not exit if item fails -T --no-tftpbuild Do not rebuild the tftpd config file -P --no-pxedefault Do not overwrite pxe default file
Full article on the .fogsettings file can be found here: .fogsettings
FOG can be used on bare metal as well as in most virtual server and client setups. Some of the virtualization techniques are really great when used with FOG, e.g. snapshots. Some people use virtualization to prepare and capture their "golden (master / reference) images" all on one central location/server. Again like with the server OS we don't prefer any of the following or others that are out there. This is only a collection of hints and tricks plus maybe issues we know about.
Using the New VM Wizard:
Ensure the virtual switch your VM is connected to has a route to FOG!
Create VM Wizard > Installation Options: Select "Install an operating system from network-based installation server"
Ensure the virtual switch your VM is connected to has a route to FOG!
Right click VM > Settings > BIOS
Move "Network Adapter" (sometimes labeled "Legacy Network Adapter") to the top of the boot order.
UEFI/Secure Boot is an option with Hyper-V on Server 2012 on Generation 2 VMs. It is enabled by default, and can be disabled in VM Settings -> Firmware: Uncheck secure boot.
Thanks to moses
Can be used as kind of a lightweight desktop virtual environment to test FOG and master your images. Using this on the laptop as local test environment. Search forums and wiki but there is no valuable information about anyone using FOG on a KVM server. Asked user mxc as he seams to use it. Otherwise this will be a brief description on how to use this as I do it.
# setup network tap device as kind of a local software switch to connect it all sudo tunctl -t tap0 -u <username> sudo ifconfig tap0 x.x.x.x netmask 255.255.255.0 up # generate disk image file qemu-img create -f qcow2 hd.qcow2 10G # start VM using QEMU emulator (BIOS mode) qemu -m 512 -boot n -net nic,vlan=1 -net tap,vlan=1,ifname=tap0,script=/bin/true -hda hd.qcow2 # start VM using real KVM virtualization (BIOS mode) kvm -m 512 -boot n -net nic,vlan=1,macaddr=00:00:00:00:00:05 -net tap,vlan=1,ifname=tap0,script=/bin/true -hda hd.qcow2 # start VM as UEFI machine - as well using the more modern '-netdev' parameter kvm -m 512 -boot n -bios /usr/share/ovmf/OVMF.fd -device virtio-net-pci,netdev=hn0 -netdev tap,id=hn0,ifname=tap0,script=/bin/true -hda hd.qcow2
OpenVZ (possibly within Proxmox) is mostly used to run the FOG server in a light weight kind of virtual environment. As OpenVZ is in nature similar to a chrooted environment you cannot actually PXE boot such a container. To install FOG as a server in OpenVZ you need to have NFS support on the host machine first and then add it to the container as well:
$ lsmod | grep nfsd nfsd 312315 14 $ grep nfsd /proc/filesystems nodev nfsd
If you don't see the kernel module nfsd loaded you might need to install the nfs-kernel-server package and load the module (usually done by the nfs-kernel-server init script). As mentioned before you need to enable access to nfsd from within the container you want to install FOG to:
$ vzctl stop $CONTAINER_ID $ vzctl set $CONTAINER_ID --feature nfsd:on --save $ vzctl start $CONTAINER_ID
After that the installer should run through like it would installing on bare metal or any other virtual environment!
Wake on LAN:
To be able to send WOL and multicast packages the container needs a proper MAC address. This is only the case if you configure the container to use a network bridge (veth instead of venet!).
Bridged network, host only. Older versions have (PXE?) bug - Tom knows about that.
Have we seen this issue in the FOG forums yet? http://forum.ipxe.org/showthread.php?tid=7864
Running a FOG client within an ESXi server is pretty close to what you would do on a bare metal machine:
- Create VM as normal.
- Choose network adapter other than VMX3 (e.g. e1000) as we have seen loading issues with those virtual adapters.
- Open VM Console, start up the VM. Press F2 on Boot Logo to enter BIOS.
- Scroll over to boot tab, use + key to move Network boot to the top of the boot order.
You can also do an on-demand network boot by hitting F9 on startup, if you don’t want to change the boot order permanently.
UEFI is disabled by default for VMs in ESXI 6.0+. To enable it for a VM, go to VM Settings > Options Tab > Advanced: Boot Options and change the boot firmware from BIOS to EFI.
Thanks to moses
Is this still in use?? Don't care if there is nothing about it in wiki or forums!
IMPORTANT, what to do when the installer fails? Where are the logs?
Below, you will find a listing of all FOG troubleshooting related articles.