What is computer imaging? Well, when you install an operating system, you typically install from a cdrom. When you have to install a massive amount
of machines, you look for an imaging solution. I've been working on a project for about 7 years now, and a large bulk of that is mass imaging of
laptops, various makes and models. Over the course of the years we stopped using Norton Ghost as our imaging solution as they changed the licenses
and made it far to expensive for our needs and budget.
So I found F.O.G.
Fog Project
FOG is a free, open source, replacement for ghost. It's quite powerful and with some customizations, it can be a pretty useful system to have in your
network. I'm going to outline the steps I took to customize my sever for my own needs, from start to finish. i will have to edit some sensitive
information out of course, but by following this guide, anyone should be able to set this system up.
This guide assumes you are using Ubuntu 12.04 as your OS for the server, but it could be one of many linux distros, with very slight differences. It
can also be other versions of ubuntu, but this guide is 12.04 specific. This guide also assumes you are using fog.32 but most if not all of the steps
still apply to fog.29
Lets begin!
A few things to remember. Linux is case sensitive for commands most of the time assume it is always. Second, you will use “sudo” before most
commands to let your user run them as root, think run as administrator in windows. The first time you use it in a terminal session you have to
provide the password, as long as you keep doing commands in that terminal, you won’t have to enter it every time. For commands that have you
editing files, in most cases you have to edit it the way listed, a simple copy and paste will not always work. Linux names your wired lan Eth0 by
default.
When logged in as root graphically, you do not need to use “sudo” before commands, but you shouldn’t be doing much else other than copying files
as root.
Linux has an administrator account called "root". Much like windows 7, you aren't supposed to login and use that account. Because of some of the
steps that require a graphical root login, I have enabled the root account with a hack. When logged in as a normal user in linux, you will be using
command lines. Most of them will require the "sudo" command. You can think of that as "run as administrator" in windows.
Getting Ubuntu installer on a Flashkey
Not all machines will have an optical drive, so here’s the steps for making a bootable flashkey with the Ubuntu installer. Download and install
unetbootin-windows-583.exe. Run it. For distribution select Ubuntu 12.04. Check ‘diskimage’ and select ‘iso’ then point to your downloaded
ubuntu-12.04.1-desktop-i386.iso. Once it’s finished you should have a bootable LiveUSB ubuntu installer.
Installing Ubuntu
Use ‘unetbootin-windows-583.exe’ to create a bootable flash key using ‘ubuntu-12.04.1-desktop-i386.iso’. Boot the flashkey and select
"Install Ubuntu to Hard Disk". Enable 'Download updates while installing' and 'Install this third-party software'. Replace the OS, if present, with
Ubuntu, do not do a dualboot.
Select login automatically and do not encrypt home folder for ease of use, don’t encrypt the home folder either way.
Anytime you need to replace a system file, you will have to switch to the root user to do it.
To enable you to login as root you have to manually enable the manual login screen.
Press Control+ALT+T to bring up a terminal. Enter the following commands:
sudo passwd root
This will ask you for your “sudo” password, which you can think of as run as administrator from windows. It will be whatever password you set for
your user account. Once you enter your sudo password, it will ask you for a new unix password, this is the root account password. It will make you
confirm it.
sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'
This actually sets the manual login screen to appear. Make sure to get it exact, including the ‘ ‘. Then shutdown the computer. From this point
on, you will have to select ‘shut down’ from the power menu as a logged in user, any other option will take you to the manual login screen. If
you have more than 1 user logged in, you will need to log out from that user then shutdown from the other user. Yeah, it's weird.
Once you reboot, you will be able to select “switch user account” from the login menu and when the classic login screen appears, you can select
‘Login’ then for the user enter ‘root’ and the password you set in the steps above. Anytime you need to replace a system file, you will have
to switch to the root user to do it.
Installing FOG
Download fog_0.32.tar.gz or copy it from the flash key to ‘Downloads’ and open a terminal window, navigate to it’s download location and run
this command(you could also right click and select "extract here"):
sudo tar -xvzf fog_0.32.tar.gz
Enter your password if it asks. This extracts the FOG installer with the appropriate switches. Once done run this command:
cd fog_0.32/bin/
This will move you into the folder that FOG extracted to. Run this command next:
sudo ./installfog.sh
This will begin the FOG installation wizard. When prompted for which linux to create it for select “2” as this setup is using Ubuntu. When
prompted for what type of installation, select “N” for normal. “S” is for storage nodes. You must create the master server before any
storage nodes can be setup. Leave the IP at it’s defaults. Do not specify a router, do not specify DNS. Do not enable FOG DHCP. Do Not enable
international support.
Do NOT specify user names or passwords for MYsql, it might prompt you a few times, leave them blank.
Once the installer is complete, carefully copy down the username and password it provides on screen, then click the link it provides to update the
schema. You can now open a webbrowser and load the FOG management page. If you receive any errors, choose work in offline mode.
hxxp://localhost/fog/management/index.php.
(localhost would be the server ip, but if for some reason it's not correct, localhost will always work.)
Overwrite Fog Settings
In the event you made a mistake setting up the fog server or node, use the following command to replace the settings with the firstinstall switch, to
let you run through the installer again. This will NOT recover a lost fog service password. Open a terminal and use the following command:
sudo mv /opt/fog/.fogsettings /opt/fog/fogsettings-firstInstall
In the event that your server or nodes changed IPs, open a terminal and
Cd /opt/fog_0.32/bin/
sudo ./installfog.sh --no-upgrade
This will run the installer again, without the need to have internet access, and will show you the IP again, it will NOT show you the fog username and
password.
>>>>>>>>>continued
edit on 26-7-2013 by phishyblankwaters because: (no reason given)