Search Windows and Linux Networking

Wednesday, July 13, 2011

Step by step installing Clonezilla Server (Alternative to Symantec Ghost Server) on Ubuntu


Step by step installing Clonezilla (Alternative to Symantec Ghost Server) on Ubuntu

Clonezilla Server is used to clone many computers simultaneously across a network this is done using DRBL (Diskless Remote Boot Loader)  Server and computer that can boot from network.  DRBL required at list two LAN card so if your system not having two physical LAN card you can use network alias to fulfill requirement of DRBL. due to my system also not having two physical LAN card I am using alias eth0:0 and physical LAN Card eth0
(Note:- you have to make changes as per your network setup ) 

Configure network:-
$ sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
     address 192.168.0.33
     netmask 255.255.255.0
     gateway 192.168.0.1
auto eth0:0
iface eth0:0 inet static
     address 192.168.1.133
     netmask 255.255.255.0

Remove network manager service (demean):-
$ sudo apt-get remove network-manager
Add repository in sources.list file
$ sudo vi /etc/apt/sources.list
deb http://free.nchc.org.tw/ubuntu hardy main restricted universe multiverse
deb http://free.nchc.org.tw/drbl-core drbl stable

Get and Install Key:-

$ sudo wget http://drbl.nchc.org.tw/GPG-KEY-DRBL

--2011-07-12 11:11:47--  http://drbl.nchc.org.tw/GPG-KEY-DRBL
Resolving drbl.nchc.org.tw... 211.73.64.9
Connecting to drbl.nchc.org.tw|211.73.64.9|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1361 (1.3K) [text/plain]
Saving to: `GPG-KEY-DRBL'

100%[======================================>] 1,361       --.-K/s   in 0s

2011-07-12 11:11:48 (32.2 MB/s) - `GPG-KEY-DRBL' saved [1361/1361]

$ sudo apt-key add GPG-KEY-DRBL
OK
                              
Update repository and install DRBL

$ sudo apt-get update
$ sudo apt-get install drbl

Install dependencies for Clonezilla:-

$ sudo apt-get install util-linux tar gzip bzip2 procps dialog rsync parted pciutils

$ sudo apt-get install tcpdump bc grub gawk hdparm sdparm netcat file ethtool

$ sudo apt-get install syslinux mtools mkisofs reiserfsprogs e2fsprogs psmisc locales

$ sudo apt-get install wget disktype zip unzip initscripts tftpd-hpa nfs-kernel-server

$ sudo apt-get install nis ntp curl lftp libdigest-sha1-perl partclone mkpxeinitrd-net

$ sudo apt-get install clonezilla mkswap-uuid drbl-partimage drbl-ntfsprogs

$ sudo apt-get install drbl-chntpw drbl-lzop udpcast drbl-etherboot freedos lvm2

$ sudo apt-get install ntfs-3g lshw etherwake ssh
$ sudo apt-get install dhcp3-server (If you have not existing DHCP server )

Configure the boot image:-

$ sudo /opt/drbl/sbin/drblsrv-offline -s `uname -r`

Press Enter key to continue
(It will check for required packages that are not installed on system. Note down the packages name. In my system it is showing following packages are not installed)

These required packages are not installed:  lzop pigz pbzip2 patch traceroute expect partimage gpxe

If all required packages are not install it ask you to continue

Are you sure you want to continue?
Press n

This will terminate process.
Now install required packages by using apt-get install command for example in my case

$ sudo apt-get install lzop pigz pbzip2 patch traceroute expect partimage gpxe

Rerun command to configure boot image

$ sudo /opt/drbl/sbin/drblsrv-offline -s `uname -r`

It rechecks all required packages and then configure boot image

Configure environment:-

$ sudo /opt/drbl/sbin/drblpush –i
(It asks some question and setup environments as per answer you provided make necessary changes as per your environment)

Please enter DNS domain (such as drbl.sf.net):
[drbl.name]

example.com

Please enter NIS/YP domain name:
clonezilla

Please enter the client hostname prefix:

Clone

The public IP address of this server is NOT found.
Which ethernet port in this server is for public Internet accsess, not for DRBL connection?
Available ethernet ports in this server:
eth0 (192.168.0.33), eth0:0 (192.168.1.133),
[eth0]

eth0

In the system, there are 3 modes for diskless linux services:
[0] Full DRBL mode, every client has its own NFS based /etc and /var.
[1] DRBL SSI (Single system image) mode, every client uses tmpfs based /etc and /var. In this mode, the loading and necessary disk space of server will be lighter. NOTE! (a) The client machine memory is recommended at least 256 MB. (b) The setting and config files of client will not be saved to the DRBL server! They are just used once and will vanish after the machine shutdowns! Besides, if you modify any file in the template client (located in /tftpboot/nodes), you have to run /opt/drbl/sbin/gen_ssi_files to create the template tarball in /tftpboot/node_root/drbl_ssi/. (c) If you want to provide some file to overwrite the setting in the template tarball when client boots, check /tftpboot/node_root/drbl_ssi/clients/00_README for more details.
[2] I do NOT want to provide diskless Linux service to client.
Which mode do you prefer ?

2

In the system, there are 3 modes available for clonezilla:
[0] Full Clonezilla mode, every client has its own NFS based /etc and /var.
[1] Clonezilla box mode, every client uses tmpfs based /etc and /var. In this mode, the loading and necessary disk space of server will be lighter than that in Full Clonezilla mode. Note! In Clonezilla box mode, the setting and config files of client will not be saved to the DRBL server! They just use once and will vanish after the machine shutdowns!
[2] I do NOT want clonezilla.
Which mode do you prefer ?

1

When using clonezilla, which directory in this server you want to store the saved image (Please use absolute path, and do NOT assign it under /mnt/, /media/ or /tmp/) ?
[/home/partimag]

/home/partimag
Do you want to set the pxelinux password for clients so that when client boots, a password must be entered to startup (For better security)
n
Do you want to set the boot prompt for clients ?
n
Do you want to use graphic background for PXE menu when client boots ?
Note! If you use graphical PXELinux menu, however client fails to boot, you can switch to text mode by running “/opt/drbl/sbin/switch-pxe-bg-mode -m text”.
y
Do you want to let DRBL server as a NAT server ? If not, your DRBL client will NOT be able to access Internet.
N
We are now ready to deploy the files to system!
Do you want to continue ?
Warning! If you go on, your firewall rules will be overwritten during the setup!
The original rules will be backuped as iptables.drblsave in system config directory (/etc/sysconfig or /etc/default).
y

Start the Clonezilla server

$ sudo /opt/drbl/sbin/dcs
do you want to set the mode for all the clients or just some of them? Select mode: windows
select all select all the clients.

In next switch mode windows select Clonezilla-start


In next windows select Beginner 


On next window select “select-in-client” so you can choose to backup or restore an image on a client by client basis.




On the last two windows you should select the default values provided.
 

 


That’s it. Clonezilla is ready to go only because we have not install DHCP server and want to use our existing windows DHCP server we have to configure dhcp server to work with clonezilla

Configure Windows DHCP Server for Clonezilla:-
Configure the option 066 for boot server name for ip address of Clonezilla server.
 and Configure option 067 for boot file name as pxelinux.0
Now go to client and set client system to boot from network . after first boot set to network client will boot from network and you will see boot menu like this:

More:-

Next time we will see how to capture image and how to restore by using clonezilla. 

4 comments:

  1. Christoffer JohanssonJuly 26, 2011 at 1:17 PM

    What if the DHCP I already have is set to a
    B-net? does this interfer?

    ReplyDelete
  2. Christoffer JohanssonJuly 26, 2011 at 2:32 PM

    Also I have an issue with not getting past the las image you posted it hangs on that screen sayin "Automatic boot in 0 seconds" and the screen starts blinking

    ReplyDelete
  3. only physical eth is showing not the virtual one

    ReplyDelete