Portable FOG Server

Professionally, I am a “Network Engineer” for an IT Services provider, which leads me to be a jack of all trades, and a master of none. One of the tasks that our group occasionally runs across is the deployment of desktops and laptops. Most of our clients are not huge (thus lacking an IT Department), but we are occasionally asked to deploy a large number of workstations. This can be a long and repetitious job, or this can be a quick experience, where the work load is just a foggy memory. Let me explain…

The FOG Project http://www.fogproject.org/ is an open source cloning solution, that allows you to PXE boot computers, and downloaded images from the FOG server. One could build a VM, but I carry a laptop with SSD storage, with disk space at a premium. I perused through my collection of disavowed equipment and came across an underpowered “thin client” that was heading to the recycle bin: an ASUS EB1030.

The ASUS has an atom processor, and was shipped with 1GB of RAM and a 32GB SSD. Cracking the case open, I was able to upgrade the memory to 4GB and throw in an old 640GB laptop hard drive. Now I had the storage I needed. My plan for the little box is to allow it to serve out IP’s via DHCP, and connect it to a simple switch (Trendnet green 8 port Gigabit switch), for my own private imaging network. All of this would easily fit in a shoebox.

I installed the 32bit version of Ubuntu Server 14.04LTS on the ASUS EB1030, updated it, and set a static IP address. For the FOG installation, open your terminal:

cd /opt/

wget the latest version (1.2.0 at posting):

sudo wget http://downloads.sourceforge.net/freeghost/fog_1.2.0.tar.gz
sudo tar -zxvf fog_1.2.0.tar.gz
cd fog_1.2.0/bin/
sudo ./installfog.sh

Set up your FOG Server to your preferences – I elected to install the DHCP server so I could set up my own little imaging network.

The installer is actually very clear and self explanatory.

Once you log into the FOG web interface, you need to create your initial image. I elected to clone an initial Windows 7 Professional 32 bit install, with updates, but prior to a Sysprep. This would provide me with my base 32bit image.

FOG Image Management

I will then repeat the process for a 64bit Windows 7 image, and so on. Using these base images, we could then build images based on manufacturers with the appropriate drivers, or build separate images for different clients. This will allow us to install applications specific to clients and reduce our workload even further.

In my initial test, it appeared I could push out an 11GB image within a 15 minute window.

FOG image download

I would recommend further reading on the use of an answer file (Unattend.xml) for sysprep:

http://theitbros.com/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish/

and further reading on a Windows client setup at the FOG Project:

http://www.fogproject.org/wiki/index.php/Client_Setup#Install_Windows

The whole kit and caboodle, ready to image the world:

Portable FOG setup


Ubuntu on the $59 WinBook TW700 Windows 8.1 Tablet – Step 1: Installing Ubuntu

I recently stopped by Houston’s new MicroCenter (they recently moved into a new store), and walked out of the store with their WinBook TW700 tablet for about $40. This tablet is built around Intel’s Bay Trail Atom architecture, sporting a 1.33GHz quad core Atom processor, Windows 8.1, and a free (1) year subscription to Office 365. This little tablet only has a 7″ screen, 1GB of RAM, and 16GB of internal storage, but the Micro-SD slot and a full sized USB 2.0 port sealed the deal for me.

With the memory and storage specs, I needed to figure out how to get Linux on this little tablet as fast as possible. Windows reserves 7.19 GB for a recovery partition, and anyone with experience with Windows can figure out how far 8.74GB of useable space will go after a few updates. Also, with only a 7″ screen, Microsoft’s crossover interface in Windows 8.1 is a little difficult to use. I naturally gravitated towards Ubuntu, hoping to take advantage of Unity and perhaps one of their touch oriented images.

First, you will need a couple of common items – a USB hub, a USB keyboard and mouse, a linux compatible wifi USB dongle, and a couple of appropriately sized USB drives (8GB or more).

Use the first USB drive to create a recovery disk – unfortunately, we are unable to delete the recovery partition after creating the USB drive, a missed opportunity to almost double the storage space! See the following Microsoft link for instructions: http://windows.microsoft.com/en-us/windows-8/create-usb-recovery-drive

After creating the recovery USB, we need to create an Ubuntu installer on the second USB drive. I recommend using Rufus, a Windows based bootable USB utility. Download the latest 64 bit Ubuntu Desktop image (32bit Ubuntu image does not support EFI booting), and install it on the USB, using “GPT Partition Scheme for UEFI Computer” and keeping the remaining defaults.

Ubuntu USB with Rufus

 

Here comes the caveat – the WinBook uses a 32bit EFI bootloader, but the 64bit Ubuntu image will install a 64bit bootloader. I referred to John Wells’ guide at the following link to steer me in the right direction: http://www.jfwhome.com/2014/03/07/perfect-ubuntu-or-other-linux-on-the-asus-transformer-book-t100/ Either grab a copy of his bootia32.efi file (or compile your own) and drop it into the EFI/BOOT folder on your USB drive.

bootia32.efi

 

At this point, we are ready to install Ubuntu on the tablet. Eject the recovery USB, and connect your USB hub to the T700, with the wifi dongle, keyboard/mouse, and bootable USB. Then on your powered on tablet, choose PC Settings->Update and Recovery->Recovery->Restart Now. In the Recovery Window, choose Troubleshoot->Advanced options->UEFI Firmware Settings->Restart. This will populate a traditional “BIOS” menu. Make sure Safe Boot is disabled on the security tab, change the boot order so the bootable USB drive is listed first, and exit, saving changes.

If all goes well, you should be prompted with the GRUB menu. Select “Install Ubuntu” and press “e” to edit the GRUB settings.

I recommend replacing “quiet splash” with “nomodeset”, which is a deviation from John Wells’ blog. This will show the verbose booting (removing quiet) and “nomodeset” instructs the kernel to not load video drivers until X is loaded. Press F10 at this point to boot the Ubuntu installer.

Install Ubuntu as normal – but at the “Installation Type” window, choose “Something else”. Remove all partitions, and create the following:

  • A 100MB primary partition, used as an “EFI boot partition” (100MB is minimum)
  • An EXT4 partition, subtracting your swap space. I simply used “/” as my mount point
  • A swap partition (optional, but I chose 1000MB due to limited RAM)

Take a note of your device partitions for a later step, I had the following:

  • /dev/mmcblk0p1 – efi partition
  • /dev/mmcblk0p2 – ext4 (Ubuntu) partition
  • /dev/mmcblk0p3 – swap partition

Finish the installation, but we still need to boot using the bootable USB upon the initial reboot.

At the reboot, we will face the GRUB menu from the bootable USB. Choose “c” for a command prompt. At the “grub>” prompt, type “ls” and note the visible partitions. The bootable USB should be listed as “hd0”, with the (3) partitions we created listed as (hd1,gpt1), (hd1,gpt2), and (hd1,gpt3). Using the partition notes above, issue the following commands:

linux (hd1,gpt2)/boot/vmlinuz-3.xx.x-xx-generic root=/dev/mmcblk0p2 nomodeset
initrd (hd1,gpt2)/boot/initrd.img-3.xx.x-xx-generic
boot

PLEASE NOTE which kernel package you are using, and more than one may be available. I want you to be aware of this for every command line boot we perform with the bootable USB. Also both commands must have matching version numbers in the above commands! You may need to try different kernel versions also to boot. I was only able to boot consistently with kernel 3.16.0-23-generic.

Your tablet should boot to the login you set up during the installation. Go ahead and log in, and enjoy the first fruits of your labor. In the next blog, we are going to fix GRUB, and compile our missing drivers.

Until then, you must keep our initial bootable installer USB plugged into and use the GRUB command line to boot the tablet.

Proceed to step 2 of Ubuntu on the Winbook TW700:

https://infosoda.com/ubuntu-tw700-2/