Friday, April 11, 2008

Imaging With Partimage

One common task for system administrators is desktop management. When managing multiple desktops a very common practice is to install the desired operating system on a desktop and configure everything on it so it is ready to be used in the environment. Then an "image" is created and saved to a disk or to a file share on the network. Creating these images is done by using a tool such as Norton Ghost. The image can then be restored on additional systems with the same hardware specs.

Most of the commercial products for accomplishing this charge a fee for each system that will either have an image created from it or restored to it. This means that if I have 100 computers systems to manage with the imaging software, and the imaging software costs about $25 per license, totaling $2500 in licensing fees. Granted that $2500 provides a lot of nice features.

For IT shops on a strict budget there is Partimage. Partimage is an open source imaging solution that works with Linux and Windows. According to the official site imaging partitions with NTFS is experimental, but I haven't had any issues yet. Actual experiences may very. In other words, please test this extensively before becoming dependent on it.

I tested Partimage with a Kubuntu installation and a MS Windows installation. Creating the image worked pretty much the same with both. The easiest way to use Partimage is to download the System Rescue CD iso image, burn it to a blank CD, and boot the target system from it. Once booted a few steps need to be completed before actually starting Partimage.
  1. Setup the network. By default the System Rescue CD does not initialize the network. To get it going simply run the command "net-setup eth0" and answer the questions. I didn't try a wireless connection because lets face it, no one wants to copy a multiple gigabyte file across a wireless connection.
  2. If you want to save the image file to a network share that share must first be mounted. I have a samba share on one of my Ubuntu servers to store the images on. To mount the Samba share I used these commands:
    mkdir /mnt/samba
    mount -t smbfs //ubuntuserver/images /mnt/samba
Be sure to replace the server and share names with actual server and share names.

To run partimage simply use the command "partimage". This will launch partimage in interactive mode with a GUI and everything. First select the partition to create the image from or restore the image to. Next type the full path of the image file. The downside here is that there is no browsing so you have to know the full path and filename of the image you want to use. When typing the image path be sure to use /mnt/samba rather than trying a UNC path.

On the next screen there are options to save the image file using no compression, gzip compression, or bzip compression. I opted for gzip compression as I don't want to waste drive space but I also don't want to wait forever for the bzip compression.

Here are the statistics of creating image files for the Xubuntu and Windows installations on the same hardware.





OSPartitionRaw DataImage SizeCreate TimeRestore Time
Xubunturoot1.4 GB620 MB8m1m40s
Xubuntuhome3.71 GB3.2 GB39m7m 46s
Windows XPC:4.4 GB2.7 GB28m11m 22s

When restoring an entire system where the existing partitions don't match you can restore the partition table from one of the images first which will recreate the partitions like they were on the system the images were created from.

Partimage is an imaging utility that provides basic functionality at a price that can't be beat. If using it to manage Windows installations it could be combined with the Microsoft sysprep utility it could be used to create one image file that supports multiple hardware configurations.

Good luck, and let me know how it works for you.

No comments: