Firstly, thanks again to Gavin Spurgeon for his assistance with getting this solution working smoothly.
Two days ago I wrote an article about setting up PXE network booting. This is very useful when it comes to quick provisioning with Kickstarts or other utilities.
You can find my article here if you’d like to run through setting up PXE in your environment.
In this article, I’ll be covering for those Windows users amongst you, how to use CloneZilla (Open Source alternative to Symantec Ghost) combined with PXE to quickly deploy your company Standard Operating Environments (SOE’s).
I’ll be relying on you having already deployed a PXE server similar to my former article, as we will be using that as a baseline.
Lets start with a bit of background. For starters, some of you may be asking “What is CloneZilla?”
Many of you will remember spending hours and hours over the years making Symantec Ghost boot floppy disks and CD’s etc. Spending all of your time searching for network drivers to work with your brand new workstations that have just arrived. Basically CloneZilla is a free open source alternative to Ghost, however it works with practically everything. No more searching for disk and network drivers and the headaches associated with making boot disks.
In short, CloneZilla is Ghost, but its free, works and basically just lets you turn that frown upside down.
You can turn CloneZilla into a bootable CD, USB stick or as we are about to do, PXE boot it.
To set up a completely bulk standard network boot version of the usual CD version of CloneZilla, you will need to download the .zip version from your local mirror.
I have used the version below in my own environment.
In my former article, I asked you to create an images folder inside of /var/lib/tftpboot to store your PXE boot environments. I have created a “clonezilla” folder in which I have extracted the contents of the CloneZilla zip file.
Once you have extracted the zip file to /var/lib/tftpboot/images/clonezilla/, add the below text to the very end of your /var/lib/tftpboot/pxelinux.cfg/default file
Note: Make sure you change the IP address to your own IP or FQDN for your environment. In my scenario, my TFTP server is 10.0.0.10.
LABEL Clonezilla MENU LABEL Clonezilla KERNEL images/clonezilla/live/vmlinuz APPEND initrd=images/clonezilla/live/initrd.img boot=live config noswap nolocales edd=on nomodeset ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="no" ocs_lang="en_US.UTF-8" vga=788 nosplash noprompt ocs_prerun="" fetch=tftp://10.0.0.10/images/clonezilla/live/filesystem.squashfs
Once you have saved the above to your default file, you will be able to boot any network boot capable computer and boot straight into CloneZilla.
This is very handy for those who use CloneZilla very regularly as using CD/DVD media for this can be rather tedious.
If you’d like to take things futher, you can add another menu item to your PXE menu to automatically deploy an exiting SOE image.
I have created a sysprep’d Windows 7 CloneZilla image, and I deploy it by selecting the menu item called “Windows 7 Image deployment”.
You will need to have the image you wish to restore saved on a network accessible location.
Add the below text to your “default” file in /var/lib/tftpboot/pxelinux.cfg
LABEL Windows 7 Image deployment MENU LABEL Windows 7 Image deployment KERNEL images/clonezilla/live/vmlinuz APPEND initrd=images/clonezilla/ive/initrd.img boot=live config noswap nolocales edd=on nomodeset ocs_live_run="/opt/drbl/sbin/ocs-sr --batch -g auto -e1 auto -e2 -r -j2 -p reboot restoredisk Windows7_x86_64_Sysprep sda" ocs_live_extra_param="" ocs_live_keymap="NONE" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 nosplash noprompt ocs_prerun="mount -t nfs 10.0.0.1:/exports/clonezilla /home/partimag" fetch=tftp://10.0.0.10/images/clonezilla/live/filesystem.squashfs
If you look on the APPEND line, I am mounting an NFS location of 10.0.0.1:/exports/clonezilla which is where I have saved my image to.
My image is called “Windows7_x86_64_Sysprep” and I am deploying this image to the device “sda”.
If you would like to connect to a Windows 2008 R2 file server for accessing your images,
ocs_prerun="mount -t nfs 10.0.0.1:/exports/clonezilla /home/partimag"
ocs_prerun="mount -t cifs -o firstname.lastname@example.org,password=mypassword //servername/sharename /home/partimag"
Its as simple as that. If you wish to deploy more images, just continue to add more menu items to your PXE menu list.