Install FOG + Centos 7 on Intel NUC DN2820FYKH


  • Moderator

    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

    1. 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
    2. Boot the NUC
    3. Press F10 (F12 on other manufacturers hardware) to enter the bios boot menu
    4. Select your boot media (USB)
    5. When the kernel boots, select Install Centos 7
    6. When the gui loads, enter your language choice and press Done
    7. On the next page everything should turn ready after a few seconds execpt the install destination.
    8. Select the Install Destination
    9. Select the disk to install Centos 7 on. When the disk is selected there will be a check mark on the disk icon.
    10. In the Additional Options select I will configure disk. (from memory will need to confirm actual text)
    11. 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)
    
    1. Press Done
    2. Press Begin Installation
    3. Enter root’s password
    4. reboot when installation is done.

    Configure Centos 7 before installing FOG.

    1. Log into the console of the NUC using root and root’s password
    2. The first order is to setup the network interface.
      cd /etc/sysconfig/network-scripts/
    3. Edit the ethernet adapter’s config file. Note that the name of the ethernet adapter on the NUC is enp3s0
      vi ifcfg-enp3s0
    4. Set the network adapter to initialize on boot by changing the value to ONBOOT=yes
    5. 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=8.8.8.8
    
    1. Save and exit from your text editor

    2. Restart the network subsystem to take on these new settings.
      systemctl restart network

    3. Ensure that Centos 7 is at the latest release with all of the fixes applied before you start.
      yum upgrade -y

    4. Install a few needed extra packages
      yum install wget dnsmasq subversion -y

    5. Disable the linux firewall
      systemctl disable firewalld.service

    6. Disable selinux
      vi /etc/selinux/config
      SELINUX=disabled

    7. Reboot the system to take on these new settings
      reboot

    8. Log back in as root

    9. 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

    10. Change to the FOG installer’s directory
      cd /opt/fog/fog_trunk/bin

    11. Run the installer ./installfog.sh

    12. 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.


  • Moderator

    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:
    https://github.com/wayneworkman/FOGUpdateIP

    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 dnsmasq to 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.


  • Moderator

    @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


  • Moderator

    @george1421 said:

    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.

    wiki


Log in to reply
 

461
Online

39.4k
Users

11.1k
Topics

105.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.