Clonezilla

The Free and Open Source Software for Disk Imaging and Cloning

Clonezilla Live on PXE Server

Besides Clonezilla Live CD and Live USB, Clonezilla Live can be put on a PXE server so that a client can be booted via network to use Clonezilla live. This is how:

  1. Prepare a PXE server. You may refer to some doc, e.g. this one or DRBL (Diskless Remote Boot in Linux). We assume the pxelinux config file is /tftpboot/nbi_img/pxelinux.cfg/default, and the image files are in /tftpboot/nbi_img/.
  2. Download Clonezilla live zip file (You have to use Clonezilla live 1.2.0-25 or later), and unzip the required files (vmlinuz, initrd.img, and filesystem.squashfs in dir live) to /tftpboot/nbi_img/. You can make it by something like: "unzip -j clonezilla-live-*.zip live/vmlinuz live/initrd.img live/filesystem.squashfs -d /tftpboot/nbi_img/" (Replace clonezilla-live-*.zip with the file name you just downloaded).
  3. Edit your PXElinux config file /tftpboot/nbi_img/pxelinux.cfg/default, and append the following:
    -----------
    label Clonezilla-live
    MENU LABEL Clonezilla Live (Ramdisk)
    KERNEL vmlinuz
    APPEND initrd=initrd.img boot=live config noswap nolocales edd=on nomodeset ocs_live_run="ocs-live-general" ocs_live_extra_param="" keyboard-layouts="" ocs_live_batch="no" locales="" vga=788 nosplash noprompt fetch=tftp://$serverIP/filesystem.squashfs
    -----------
    //NOTE//:
    1. Replace $serverIP with your IP address of tftp (DRBL) server.
    2. Remember to check kernel, initrd file names and boot parameters in syslinux/syslinux.cfg from the zip file, copy them to here. It might be different from here, say vmlinuz path maybe different.
      For more info about pxelinux, you can refere to here.
    3. Here we do not put "ip=frommedia" in the boot parameters because the /etc/resolv.conf get in live-initramfs won't exist in the system after initramfs is done.
    4. "fetch" also supports http or ftp, if you want to use http or ftp instead of tftp, you have to put the file filesystem.squashfs in your http or ftp server and the corresponding path.
    5. If you want to do unattended clone, you can assign clonezilla live parameters (ocs_live_run, ocs_live_extra_param, ocs_live_keymap, ocs_live_batch and ocs_lang) in kernel parameters. For example, you can use:
      ------------------------------------------------------
      append initrd=initrd.img boot=live union=aufs noswap noprompt vga=788 keyboard-layouts=NONE locales=en_US.UTF-8 fetch=tftp://$serverIP/filesystem.squashfs
      ------------------------------------------------------
      in the above example to assign your PXE client to use default keymap (US) and English environment. For more info about those parameters, you can refer to this Clonezilla live doc.