How-to: Install FOG on Ubuntu

Discussion in 'Tutorials' started by Blackout, Dec 15, 2011.

  1. Blackout Developer

    This how-to was created by DigitalBlacksmith from the Spiceworks Community Forums.
    http://community.spiceworks.com/how_to/show/373

    ---

    FOG Server Install

    This guide will walk you through creating a FOG server from scratch to deployment of an image.
    FOG is a image management server that can be used for multicasting an image to hundreds of PCs or imaging a single one.

    It can also boot the pcs to a memtest utility or a disk utility. I have tried to include as many of the video tutorials from their site as I could find..

    Please post feedback, this has potential to be an amazing asset to all of you who are in need of an imaging solution. I would suggest setting aside about 4 hours to do this, depending on the size of the test PC.

    1. Install Ubuntu

    I wanted a GUI so I went with the desktop Ubuntu, you may want to go with Ubuntu server. So go to their website, download the workstation x86 ISO and burn it.


    1. English
    2. Install Ubuntu
    3. English
    4. Select your Time Zone
    5. Suggested Option
    6. Use Entire Disk
    7. Enter User Information and Computer information, I named mine 'foghat' with foguser
    8. Install
    9. Restart
    10. Login
    2. Install FOG


    1. Open Firefox
    2. Go to http://www.fogproject.org and download FOG.
    3. Open Terminal Applications->Accessories->Terminal
    4. cd Desktop (Remember Linux is case sensitive)
    5. tar -xvzf fog*
    6. cd fog*
    7. cd bin
    8. sudo ./installfog.sh
    9. Select opt 2 Enter
    10. N Enter
    11. Default IP Enter
    12. You dont need to set up a router IP but I will in case I ever use the server for DHCP.
    13. Set up a DNS IP, just accept the default.
    14. No do not change the default network interface.(you may not get this prompt if you have 1 nic)
    15. I will not be using FOG for DHCP. (will require changing my current DHCP server.)
    16. Note your IP settings and continue.
    17. Enter to Acknowledge.
    18. (I like to notify the FOG group, they have made a great product and deserve my feedback, choice is yours here)
    19. gksu gedit /var/www/fog/commons/config.php and put your mysql password you typed during install in "DATABASE_PASSWORD", "your_password" save and close. It has been noted that you also should change the MYSQL password here while you are at it /opt/fog/service/etc/config.php.
    20. Browse to http://localhost/fog/management
    21. Click install!
    22. Click to log in. You can now reach this webpage from anywhere on the network where your server is installed by using it's ip address. eg http://192.168.0.100/fog/management I would recommend putting an A record in your DNS called FOGSERVER this will make things easier to remember.
    default: fog/password

    3. Set up DHCP (For Windows DHCP)
    1. Log onto your Windows DHCP server
    2. Open DHCP console.
    3. Right Click Scope Options -> Configure Options
    4. Scroll Down to number 66 check and give the hostname of FOGSERVER
    5. Scroll down to number 67 check and give the value pxelinux.0
    6. Apply and close.
    4. Install FOG service on client (Host)

    http://freeghost.sourceforge.net/videotutorials/FogServiceInstall.swf.html
    1. Log onto the PC
    2. Browse to http://FOGSERVER/fog/client
    3. Click to download
    4. Open
    5. Run Setup.exe in the Fogservice folder
    6. Accept defaults (FOG does not like to be installed in locations other than default)
    7. Enter the ip or preferrably the hostname if you created one. FOGSERVER
    8. Save Changes, Done, Close.
    9. Open services Start->Run->services.msc
    10. Scroll down and start "Fog Service"
    11. This would also be a good time to make sure that PXE is your primary boot option in BIOS, you might need to enable it.
    5. Create an image file.
    1. Click on Image management.
    2. New Image
    3. Give it a name, description, default storage group, filename, and Image type (choose wisely). For dell computers with a utility partition you will HAVE to select multiple partition single disk.
    4. Add.
    6. Assign Image to Host

    Assign the Image to a host, this will be the image the host uses to restore and deploy from, You can assign this image to as many PCs as you want. Useful for group Deployment.
    1. Click on Host management.
    2. List all hosts.
    3. Click Edit next to your machine.
    4. In Host Image select the proper image that you created in the previous step from the dropdown.
    7. Upload an image


    1. From another machine log onto http://FOGSERVER/fog/management login with fog/password
    2. Click on Tasks (The Star)
    3. List all Hosts
    4. Click Upload next to the PC.
    5. Upload image.
    6. Click on active Tasks, and either wait for the PC to check in and autoreboot or Reboot it manually.
    8. Test Restore/Deploy
    1. Click on Tasks (The Star)
    2. Click Deploy next to your PC.
    3. Click image All computers.
    4. Verify image by booting computer and making sure everything works.
    Conclusion

    This is more than worth the effort. Make sure you have enough storage for your images. This tutorial should have gotten you to the point where you can start to play with FOG yourself even if you have absolutely NO idea how to run Linux.
    From here you can start creating groups to image, advanced tasks and start shaping things to your environment.

    UPGRADE NOTE: If Upgrading Ubuntu from 9 to 10, you will need to re-install fog. Ubuntu 10 changed around some stuff in the init folders. I am not a linux geek so I cant explain it. But for further information see paul2019's comments below.
    Az2 and benneta like this.
  2. Bill Hildenbrand New Member

    WOW.. Guys.. I guess I couldn't ask for more. Well, I could forgo all the fun.. neah, you've made it too obtainable.
    Very cool!!

    Notably, I experienced one difference; in Step 2 #19, "DATABASE_PASSWORD", "your_password" seemed to not apply to my config file.. instead, I set define( "MYSQL_PASSWORD", "********" );
    ... and have one question..Does the A-record in DNS just need to point to the Host's IP, 4 octets with no additional directory information? -because my pointer is not pointing :?
    Nevermind.. I had created the pointer in the wrong FwdLZ.

    ROCKIN!
  3. smshahan New Member

    One question. How do you add the FOG configuration menu to the Ubuntu server startup? I ask because I'm transitioning from FOG VM to a physical server. Much help would be appreciated.
  4. John Denholm New Member

Share This Page