CloneZilla

From wiki.breedveld.net
Revision as of 15:29, 24 February 2009 by Roland (Talk | contribs) (Protected "CloneZilla" [edit=sysop:move=sysop] [cascading])

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Clonezilla Live CD via PXE

A simple documentation to quickly setup up Clonezilla on a PXE server.

What is Clonezilla

Clonezilla is a partition or disk clone software similar to Ghost. It saves and restores only used blocks in hard drive.

Features of Clonezilla

   * Free (GPL) Software.
   * Filesystem supported: ext2, ext3, reiserfs, xfs, jfs of GNU/Linux, and FAT, NTFS of M$ Windows. Therefore you can clone GNU/Linux or M$ windows. For other file system, Clonezilla uses dd to dump the whole partition.
   * LVM2 under GNU/Linux is supported.
   * Based on Partimage, ntfsclone and dd to clone partition. However, clonezilla, containing some other programs, can save and restore not only partitions, but also a whole disk.
   * If file system is supported (ext2, ext3, reiserfs, xfs, jfs, fat, ntfs), only used blocks in harddisk are saved and restored. This increase the clone efficiency. For unsupported file system, sector-to-sector copy is done by dd in Clonezilla. 

Requirements:

   * A working DHCP, PXE, TFTP, and NFS server
   * Clonezilla LiveCD 

References:

   *
     Clonezilla: http://www.clonezilla.org/
   *
     Clonezilla LiveCD Download: http://www.clonezilla.org/download/sourceforge/ 

NFS Server Config:

Setup directories

mkdir -p /mnt/isoimage mkdir -p /exports/clonezilla

Download the clonezilla-live-$LATESTVERSION.iso to /tmp

Mount the iso image and copy contents to the export directory.

mount -o loop /tmp/clonezilla-live-$LATESTVERSION.iso /mnt/isoimage cp -a /mnt/isoimage/. /exports/clonezilla umount /mnt/isoimage

Restart NFS

add /exports/clonezilla *(ro,sync) /etc/exports service nfs restart exportfs -ra

Tftp Server Config:

Setup directories

mkdir -p /tmp/clonezilla mkdir /mnt/isoimage mkdir /tftpboot/images/clonezilla/

Mount the Clonezilla iso image and copy the boot files to the clonzilla tftp server directory.

mount -o loop clonezilla-live-$LATESTVERSION.iso /mnt/isoimage cp /mnt/isoimage/casper/initrd1.img /tftpboot/images/clonezilla/initrd.gz cp /mnt/isoimage/casper/vmlinuz1 /tftpboot/images/clonezilla/vmlinuz

umount /mnt/isoimage

PXE menu entry

MENU DEFAULT MENU LABEL Clonezilla live

label clonezilla kernel images/clonezilla/vmlinuz

  1. Older Clonezilla
  2. append initrd=images/clonezilla/initrd.gz boot=casper netboot nfsroot=$NFSSERVER:$NFSEXPORT
  3. Clonezilla 1.1.0-8

append initrd=images/clonezilla/initrd.gz boot=live union=aufs netboot=nfs nfsroot=$NFSSERVER:$NFSEXPORT