Install FOG + Centos 7 on Intel NUC DN2820FYKH
The installation of Centos 7 and FOG on the Intel NUC is really no different than on any other physical machine. I’m outlining the steps required because Centos 7’s default install behavior is not what is needed for a typical FOG install. This default behavior is to take the physical disk and give 50GiB to the root (logical) partition, 500MiB to the boot partition and the remainder of the physical disk to the /home partition. This is donating a large portion of the disk to the /home partition where currently FOG stores all files in the root partition.
Install Centos 7
- Insert your boot media into the NUC’s USB port. If you haven’t converted the ISO image to a bootable flash drive check out this link: https://forums.fogproject.org/topic/6386/copy-centos-7-iso-images-to-usb-flash-drive
- Boot the NUC
- Press F10 (F12 on other manufacturers hardware) to enter the bios boot menu
- Select your boot media (USB)
- When the kernel boots, select Install Centos 7
- When the gui loads, enter your language choice and press Done
- On the next page everything should turn ready after a few seconds execpt the install destination.
- Select the Install Destination
- Select the disk to install Centos 7 on. When the disk is selected there will be a check mark on the disk icon.
- In the Additional Options select I will configure disk.
(from memory will need to confirm actual text)
- For this install if there are any existing partitions remove them. We will create a new layout specifically for our fog server.
Create this hard disk partition format using LVM
/boot 500 MiB swap 8192 MiB (actually should be based on the amount of RAM installed. On my system I have 8GB of ram so I'm creating a 8GiB swap) / 24 GiB /opt XXX GiB (should be remainder of disk or array. This is where we will eventually store all of our images and snapins)
- Press Done
- Press Begin Installation
- Enter root’s password
- reboot when installation is done.
Configure Centos 7 before installing FOG.
- Log into the console of the NUC using root and root’s password
- The first order is to setup the network interface.
- Edit the ethernet adapter’s config file. Note that the name of the ethernet adapter on the NUC is enp3s0
- Set the network adapter to initialize on boot by changing the value to
- You MUST enter a static IP address for your FOG server or bad things will happen. Changing the IP address after FOG is installed is problematic at best. Insert the following text into the ethernet adapter config file. Make the values appropriate for your network.
IPADDR=192.168.1.15 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=126.96.36.199
Save and exit from your text editor
Restart the network subsystem to take on these new settings.
systemctl restart network
Ensure that Centos 7 is at the latest release with all of the fixes applied before you start.
yum upgrade -y
Install a few needed extra packages
yum install wget dnsmasq subversion -y
Disable the linux firewall
systemctl disable firewalld.service
Reboot the system to take on these new settings
Log back in as root
Install the latest SVN trunk (or the latest stable release here)
svn co https://svn.code.sf.net/p/freeghost/code/trunk /opt/fog/fog_trunk
Change to the FOG installer’s directory
Run the installer
Install FOG using the settings most appropriate for your environment.
Some things that haven been addressed yet is the default location that fog uses to store the captured image files is /images. This happens to be on the root partition where we allocated 24GiB of storage. We set aside space on the /opt partition for all of the big files. During the FOG install it will ask you where the image directory should be, I would recommend that you place it in /opt/fog/images and not on the root partition. The reason being is that historically bad things happen if you use up all of the space on root partitions under unix. Usually you will break the OS if you fill up the root partition to the point where you will need to reinstall the OS to fix it. So (IMO) its bad practice to store anything on the root partition that might cause it to fill up, hence the reason for creating the /opt partition during OS setup. We can fill up the /opt partition with captured images without risk of taking down the system.
You MUST enter a static IP address for your FOG server or bad things will happen.
I think we can create some sort of script that can auto-run at boot that will set things up for a FOG Server that’s set to recieve DHCP - just for a mobile fog server.
So you know - my FOG Server at home is configured to use DHCP and not static addresses, I have a reservation set for it on my DHCP server. It works fine.
This is for your mobile fog server setup right? We will need a dnsmasq config file also for this.
@Wayne-Workman dhcp will work, the issue is that some dhcp server’s don’t have reservations. (yes this could be for a mobile deployment server, so we can’t garanty we will have access to any settings on the dhcp server). Also it is generally good practice to set any device that offers a service to the network a static address. Will FOG work with dhcp sure in a stable environment. But it is a bit of a PITA (as I found out) if you need to change the IP address later. Fix it before fog is loaded is the best recommendation here.
As far for dnsmasq, yes that is needed. I have another Tutorial on setting that up under Centos 7
Coming back to this topic, I mentioned that scripts could be built to make fog mobile. Well, a few of us here in the FOG community did just that.
Here’s the project link:
This basically makes FOG 1.3.0 completely mobile, it allows the FOG server to receive a DHCP address, and then scripts automatically update FOG’s files, database, and automatically re-configure
dnsmasqto work with the new IP.
@george1421 I’d like to work with you to get this side project to work with UEFI too, only problem is if we do that, maybe we need to include an actual dnsmasq binary for x86_64, and after the project installer installs dnsmasq, it just swaps out the binary file all sneaky like lol. At least until the current latest dnsmasq version is mainstream.