FOG as a web-based Ghost Replacement

Sun, Feb 1, 2009 (Linux, OS, Servers, Software)

Login Screen

Lets face it, some sectors just can’t move to Linux due to legacy application support, lack of personnel support, employee training, and especially due to the jump in vastly different user interfaces. Each company has their own incredibly (insert sarcasm) unique reason for holding back. So, what is left for the network admins to do other than to support the Windows base? What if there were more than 10, 50, or even 100 computer involved and your admin staff is less than 5?

As some of you might know, I use to manage a network of computers for a small office supply way back in the day. The one thing that I wanted most was to have a standard image to distribute to all the machines at any given time. Being the sole administrator working part time, remotely, and basically with no budget my options were severely limited. I longed for a solution that gave me the power to use 1 machine to create a custom image that could easily distribute security updates, software configurations, printer setups, and network shares. Those days are long gone, but a solution to this common problem has cropped up. Enter FOG, “a free computer cloning solution.”

FOG was created as a solution to a non web-based, expensive re-imaging product that often required the use of driver disks. FOG incorporates the use of TFTP and PXE to do its remote imaging, and a webserver to do the administration.

The install is pretty easy, and the wiki has step-by-step instructions for Ubuntu and for Fedora. Since the wiki has some great information on setting up FOG, I’ll refrain from duplicating documentation. Check out the User Guide wiki here.

Once you startup the install script you’ll be prompted for a Server type, your server address, your DHCP router address, and if you want to use your server install as a DHCP server. I went with the defaults giving the ip address of my server, using my router as the dhcp server, and not enabling FOG as the default DHCP server. Once the install gets going you should see a similar window:

Configuring the server with the install script

After that is done, you’ll be able to login to your freshly installed imaging server. There are a couple of things to note here. Since you need to be able to network boot your boxes, your DHCP server has to know the alternate location to send the netboot clients to. This is briefly described here. Also note, if you had a MySQL server installed before you added FOG you’ll need to modify the /var/www/fog/commons/config.php file to reflect the MySQL root password.

If you direct yourself over to http://localhost/fog/management. You can then use username: fog and password: password to get to the status/home page:

Status page after loggin in the first time.

I would suggest adding a new user to do the management work. You can get to the user management page by clicking on the icon next to the ‘home’ icon in the toolbar (second from the left), click New User in the left hand menu, entering a username and password  and then clicking Create User.  Next, you’ll want to add some hosts. Click on the icon that has a single monitor (third from the left), click Add New Host, and then enter the hostname and hardware address of the Windows machine you wish to image. If you don’t know the hardware address of the host you want to add, and are on the same network you can look it up using the arp table.

First, ping the host (using your hosts ip in place of the 192.168.0.101) to make sure it is alive. Then check the arp table:

~$ ping -c 1 192.168.0.101
~$ arp -a

After adding a host successfully you should see something similar to this:
Host Added Successfully window

Since I didn’t have much space on my image server to begin with, I modified the default storage node to point to a samba mounted filesystem on my fileserver. This is where you’ll store all of your backup images. Since this can get big pretty fast, you’ll want have lots of dedicated storage. You can modify the aforementioned settings by clicking on the Storage Management icon (the sixth icon from the left).

Storage management page

Now we need to add an image. You can do this by clicking on the icon labeled Image Management (the fifth icon from the left). Click New Image, enter in a name, select a Storage Group, an image filename, and then select the type of image to be stored (Single Partition, Multiple Partition, Multiple Partition all Disks, or RAW). As far as the server management goes, you are done. Before uploading drive images to the FOG server, though, you will need to install the client package on the machine you wish to image. that software can be obtained by going to http://[fog server]/fog/client.

Overall, I found the interface fairly intuitive. I would have given it a very intuitive rating had the advanced host tasks been easier to find. I mean, this is one of the really cool features of FOG and the amount of tools that it packs is enough to blow your socks off. If you click on the Tasks Management Icon ( the Star ) on the main site, click on List All Hosts, and then click on the little Advanced icon you get a chance to see what I’m talking about. There are a slew of great utilities to run on the host:

  • Debug features for Uploading and Deploying images
  • Memtest86+
  • Wake-On-Lan
  • Fast Wipe (destroys MBR)
  • Normal Wipe (one pass zeroing out data)
  • Full Wipe (writes random data over a couple full passes)
  • a Disk Surface Test
  • Test Disk
  • Recover (using PhotoRec)
  • Antivirus (using ClamAV)
  • and a Hardware Inventory Utility

Management tasks available for each host.

If you are looking into how to maintain a small to large amount of computers in a SMB or campus setting, you really should consider checking out FOG. Leveraging the best of Open Source you’ll be able to easily deploy standard images to loads of computers in a minimal amount of time. You can even manage computers using your iPod or iPhone!

iPod Screenshot taken from Fogs Documentation site

Check it out, and let us know what you think!

Share This on Your Favorite Social Network:
  • Facebook
  • MySpace
  • Twitter
  • Digg
  • StumbleUpon
  • LinkedIn
  • Reddit
  • FriendFeed
  • Tumblr
  • Suggest to Techmeme via Twitter
  • Technorati
  • Mixx
  • Propeller
  • Fark
  • Slashdot
  • del.icio.us
  • Google Bookmarks
  • Yahoo! Buzz
  • Print
, , , ,

This post was written by:

Ray Gomez - who has written 46 posts on kallasoft.

Ray, a Linux and Unix nut, spends a majority of his daily ritual programming and testing for Big Blue. In his free time he manages to tweak the currently running thinkpad+KDE4 (WHOA) setup, read, and he occasionally gets out of the fluorescent lights to play roller hockey.

Contact the author

6 Responses to “FOG as a web-based Ghost Replacement”

  1. John Says:

    Great article! I’m also trying to use a different storage server (Windows), but can’t seem to get it to see the samba share when trying to upload the image. What syntax did you use for the “Image Location” to point it to the samba share? (ie smb://server/share)

    Reply

    • Ray Gomez Says:

      Hi John and Dave,

      Before the FOG setup I actually had these Samba drives pre-mounted. I would have originally saved the backups on the Linux Server, but I didn’t have space.

      You could just mount your samba drives using your Fstab. I hope this helps!

      Reply

  2. Dave Says:

    I am also trying to get FOG saving images to a windows share. any help would eb appreciated.

    Thanks,
    Dave.

    Reply

  3. Dave Says:

    Thanks Ray,

    I have the share mounted now.. i am having seperate issues with permissions and writing images to the mounted share, but thats for another day.

    Thanks, for your help,
    Dave.

    Reply

  4. In-Sane Says:

    Ray, could you please elaborate on what you have done to get the NFS mount to work. I have been hit by the same issue as Dave:

    - I can mount the SMB share, through fstab, with no special options.
    - FOG (PXE boot) throws a permssion denied error just where the NFS mount should occur

    When FOG boots, I see the permission denied problem. Funnily enough, my FOG server’s syslog shows that the authentication was successful. My windows server shows nothing to the effect of access denied.

    Perhaps the following would be useful:
    - mount options for SMB used?
    - NFS export settings
    - UNFS or kernel-NFS?
    - Distro and version?

    Reply

  5. armod Says:

    Did you guys get the windows share working? I’m having the same problem as In-Sane…

    How did you guys do it?

    Reply

Leave a Reply