Sunday, September 30, 2012

Installing a Clonezilla Server


Clonezilla Server is used to clone many computers simultaneously across a network. This is done using a DRBL server and computer workstations that can boot from a network.

1 Set a static IP

Ubuntu by default uses network-manager and automatic (DHCP) configuration for the network card. For a server it better to do manual static (fixed IP) configuration.
First modify /etc/network/interfaces like this:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.1.235
    netmask 255.255.255.0
    gateway 192.168.1.1
Then remove the package network-manager and restart networking:
aptitude purge network-manager
/etc/init.d/networking restart   

2 Add a second IP address (alias) to the same card

Conezilla is based on the DRBL server (which is a kind of light termal server, whith terminals booting over the network through PXE). The DRBL server itself needs one external network interface (connected to WAN) and at least one internal interface (connected to LAN). However, if we have just one network interface, we can add an alias to it, and use it for the LAN.
Append these lines to /etc/network/interfaces:
auto eth0:0
iface eth0:0 inet static
    name Ethernet alias LAN card
    address 192.168.3.235
    netmask 255.255.255.0
    broadcast 192.168.3.255
    network 192.168.3.0
Then restart networking: /etc/init.d/networking restart
Reference:

3 Installation on the server

Here are the steps for installing DRBL/Clonezilla on a Ubuntu Server:
  1. Add the key of the DRBL repository to apt:
    wget -q http://drbl.org/GPG-KEY-DRBL -O- | sudo apt-key add -
    
  2. Create the file /etc/apt/sources.list.d/drbl.list which contains this line:
    deb http://drbl.sourceforge.net/drbl-core drbl stable
    
  3. Install the package drbl:
    apt-get update
    apt-get install drbl
    
  4. Install the DRBL server:
    /opt/drbl/sbin/drblsrv -i
    
    For the installation steps see this example: http://drbl.sourceforge.net/one4all/examples/drblsrv\_desktop\_example.txt
  5. Setup the filesystem for the clients
    /opt/drbl/sbin/drblpush -i
    
Referencies: