Serve clonezilla using PXE on a freebsd host with nfs.


March 2011.

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 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

Ports


You will need the following ports:

DHCP server


Configure your dhcp server to serve pxelinux.0

#/usr/local/etc/dhcpd.conf
subnet 192.168.242.0 netmask 255.255.255.0 {
range 192.168.242.4 192.168.242.250;
next-server 192.168.242.3;
filename "pxelinux.0";
}

TFTP server


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

#/etc/inetd.conf

#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




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

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

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=192.168.242.3:/usr/local/clonezilla_nfs 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 255.255.255.0

Copy or mount the cd into the folder.

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

Run


Boot the client and use clonezilla.

References: