Wednesday, October 19, 2011

Clonezilla disk imaging



If you haven't tried it yet, let me highly recommend Clonezilla for simple disk imaging. An indispensable tool for us techies who want to save an existing disk state before effing up someone's server or PC, the fact that you can create a usb bootable version and carry it around with you is priceless.  I can't tell you how many times I've used this utility and the countless number of times it has saved my arse by being able to restore a disk (or just a single partition) to it's previous state.

You can visit the Clonezilla.org website to get the details and I'll outline here the step necessary for creating a bootable USB stick.  You can go here to download the ZIP file you'll need to create the USB bootable install or just let Tuxboot do all the work for you (my preference).  You'll need Tuxboot which you can get here and a USB stick which you'll need to insert and determine the drive letter assigned before we get started.  If not already formatted as FAT32, you can do so in Windows Explorer.  That said, the install is very small (less than 200MB) so an small USB stick will be perfect for this use - surely you have some 256MB or 512MB drive laying around that you thought you had no use for anymore.

Ok, the next steps are pretty easy once you have the Tuxboot file downloaded and USB stick inserted.

1) Run the Tuxboot executable (no install necessary)
2) By default the Clonezilla Live option button is selected at the top left.
3) click the button to the right to get the latest version
4) go to the bottom of the installer screen and select USB Drive (the default)
5) select the USB to install to and click on OK
6) let Tuxboot do it's magic and once done - you have a bootable USB drive with Clonezilla installed

I won't go into the details of using CloneZilla since you can get all the detailed use instructions here directly from the CloneZilla site. For you Windows 7 users, when you exit Clonezilla it will give the an error message, just click on "this program installed correctly" and all will be fine.

I recently used this on a brand new HP Slimline PC I had bought for testing some VMware ESXi v5.0.  I imaged the disk on the PC (first ever boot was to the USB via HP's F11 select boot option) to an external 1TB USB disk drive (whole disk image).  I installed my VMware ESXi 5.0 which proceeded to wipe the internal disk clean and install a multiple partitions and VMFS on the drive and was able to complete my testing.  Once done, I simply rebooted to the Clonezilla USB stick, restored the drive to it's original state and all was well.  Actually, I tested to make sure it worked by booting and making sure the disk came up to the "first boot" screens for HP setup and then shut down and re-imaged.  Not a lack of confidence in the Clonezille restore, just my good ole' "measure twice, cut once" approach.  Oh, and for those older PCs or servers that won't boot from USB, just download the Clonezilla ISO and burn a CD - some greatness available there albeit a little slower.