You are here

Serve clonezilla using PXE on a freebsd host with nfs.

Not so frequently asked questions and stuff: 

System used

The server system used was a soekris net4801 running freebsd.

uname -a
FreeBSD net4801 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011  i386


You will need the following ports:

  • ftp/tftp-hpa (I tried using the builtin tftp server but it sometimes failed for no reason).
  • net/isc-dhcp41-server (or any other dhcp server you fancy)

DHCP server

Configure your dhcp server to serve pxelinux.0

subnet netmask {
  filename "pxelinux.0";

TFTP server

Configure your tftp server to listen and serve the right folder.


#if you are using tftp:
tftp   dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -l -s /usr/local/tftpboot

#if you are using tftp-hpa:
tftp    dgram   udp     wait    root    /usr/local/libexec/in.tftpd     in.tftpd -p -s /usr/local/tftpboot

Check that the server is running:

netstat -a | grep tftp
udp4       0      0 *.tftp                 *.*

TFTP files

  • Copy the kernel (vmlinux) and the initrd (initrd.img) from the cd/usb/zip to the folder /images/clonezilla.
  • Download or find elsewhere a working copy of pxelinux.0 and copy it to /
  • Add an entry to the file pxelinux.cfg/default
ls /usr/local/tftpboot/
images          pxelinux.0      pxelinux.cfg

ls /usr/local/tftpboot/pxelinux.cfg/

ls /usr/local/tftpboot/images/clonezilla/
initrd.img              vmlinuz

cat pxelinux.cfg/default
MENU LABEL Clonezilla live
DEFAULT clonezillanfs

label clonezillanfs
kernel images/clonezilla/vmlinuz
append initrd=images/clonezilla/initrd.img boot=live live-config noswap union=aufs netboot=nfs nfsroot= ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" vga=788

NFS Server

Configure your nfs server to serve the folder /usr/local/clonezilla_nfs.

cat /etc/exports
/usr/local/clonezilla_nfs    -network 192.168.242 -mask

Copy or mount the cd into the folder.

ls /usr/local/clonezilla_nfs/
COPYING                 isolinux                syslinux
Clonezilla-Live-Version live                    utils


Boot the client and use clonezilla.