Sunday, July 6, 2008

Clonezilla HOWTO: Quick and Dirty Setup

Since I wrote the post 'Clonezilla' in January, our blog has been getting a lot of hits, apparently from people looking for advice on how to set up Clonezilla. This is understandable, since DRBL (of which Clonezilla is just a piece) is a complex piece of work, with loads of possibilities. So I decided to write up a small HOWTO, a quick and dirty method of getting Clonezilla up and running.

Before I go on, a bit of a disclaimer: Following the instructions below may not provide you with results that fit your particular needs. If you have specific and detailed requirements, see the DRBL documentation. If you would like to hire LightCube Solutions to provide assistance in setting up a Clonezilla solution for your organization, see our Contact page.

The Steps


1. Install Ubuntu Hardy


You'll need a Linux machine to run your Clonezilla services. I chose Ubuntu because it's easy to set up and is quite popular. DRBL will also run on Debian and Fedora.

2. Install DRBL


First off, open up a Terminal. In Ubuntu Hardy, this is located in 'Applications -> Accessories -> Terminal'. Then change to super-user access by typing:
sudo -i
Next, add DRBL's GPG key to your system:
wget http://drbl.sourceforge.net/GPG-KEY-DRBL
apt-key add GPG-KEY-DRBL
Update your apt configuration so that you can install software from the DRBL guys:
cp /etc/apt/sources.list{,.bak}
echo "deb http://drbl.sourceforge.net/drbl-core drbl stable" \
>> /etc/apt/sources.list
Finally, install DRBL:
apt-get update
apt-get install drbl


3. Configure a Network Alias


DRBL requires that you have two network interfaces. We can get around this by adding a virtual interface:
cat >> /etc/network/interfaces << "EOF"
auto eth0:1
iface eth0:1 inet static
address 192.168.222.1
netmask 255.255.255.0
EOF
ifup eth0:1
Don't worry if you see something like this (it's just an annoying but harmless bug in Ubuntu):
(SIOCSIFFLAGS: Cannot assign requested address)

To verify that you have set up the alias properly, type:
ip addr show eth0 | grep eth0:1
You should see something like this:
inet 192.168.222.1/24 brd 192.168.222.255 scope global eth0:1

4. Configure Your New DRBL Server


If you want to just accept all of the default settings, run the following (note that this will require an internet connection and may take some time):
/opt/drbl/sbin/drbl4imp
Otherwise, if you want to specify your own settings, run the following two items:
/opt/drbl/sbin/drblsrv -i
/opt/drbl/sbin/drblpush -i

Congratulations! That's it, you have a DRBL/Clonezilla server ready to create and deploy custom images. All you need to do to start cloning is run:
/opt/drbl/sbin/dcs
Then, boot up your client machines using PXE. See, that wasn't too painful...

No comments: