Free Imaging software - CloneZilla & PartImage - Tutorial
Updated: November 3, 2008
I have written a new tutorial on CloneZilla, including restore on both Linux
and Windows.
Backing up your system (and documents) is more than just copying a lot of files to another location. Here's an
example for you: Let's say you want to backup your operating system, Windows, for example. So, you copy every
single file on the drive C: to an external device and then copy the contents to a hard disk on another machine.
And then you try to boot the other machine. Nothing will happen.
The other system will not be bootable, even though you have copied just about any file you can see and access.
This is because operating systems do not work the way we perceive them. We see files, but these files are only
meaningful to a file system that can read and interpret them. For example, the NTFS file structure is only
useful to systems that can read this file system, like Windows, Mac and some Linux distributions. An old DOS
machine cannot read a hard disk formatted with NTFS, for instance.
Introduction - what is imaging?
Beneath the file system, resides the most basic structure of any device - disk sectors. These are actual, physical parcels containing the
data, regardless of the file system used. If this structure is mirrored to another device, it is possible to
create an exact clone. Any operating system that exists on the device will not know any difference.
This is what imaging is all about. Imaging is a process during which the device structure and the entire
contents are copied, sector by sector to a backup file called image. If you take the image and extract it to a
device, overriding any existing, previous structure, you will have created a perfect copy of the imaged system,
the way it was the moment the image was taken.
This grants computer users the ability to not only save the actual files, but the actual status of a device, be
it a hard disk, a partition or any other, frozen in time at the moment it was created. These temporal snapshots
can then be restored at later times, allowing the users to undo changes to their devices (and the relevant
operating systems). This opens a huge window of opportunity and flexibility, in regard to backup, testing and
disaster recovery.
Any serious computer user will deploy some sort of imaging software in his/her arsenal and use them
periodically, to backup their operating system and also restore them, if needed.
I can give you a personal example. In the last 3 years, I have backed up my systems at least 200 times and
restored some of them about 20-30 times, for various reasons, mainly software testing. Imagine that I had to
reinstall the systems instead of image-restoring them every time. Imagine the time cost, the long hours needed
to reinstall everything and configure the applications, to say nothing of the additional nuisance the Windows
operating system poses with its Activation policy.
Unfortunately, most imaging software products cost a lot of money. Furthermore, since imaging is such an
important and crucial procedure, you cannot risk the chance of using a second-hand imaging software. Luckily,
there are two excellent free programs that offer the reliability and quality that you require - CloneZilla and
PartImage.
Both these programs are relatively easy to use, if not the easiest. On the other hand, they are fast, reliable
and very much free. They will also work with practically any filesystem, including Windows NTFS.
In this article, I will reach you how to use them to backup your system, demonstrating the use of each in rich
detail. I will use CloneZilla to backup an Ubuntu station and then I will use PartImage to backup a Windows
machine.
Requirements
Both of these programs require that you be able to burn ISO files to CD/DVD, boot from a live CD and in
general, understand the Linux notation of hard drives and partitions - and, of course, know what hard disks and
partitions are. There is also some use of the command line involved.
If you're not ready for this, maybe CloneZilla and PartImage are not for you. Just be aware that many payware
imaging solutions also require some knowledge of the hardware terminology. It is definitely worth spending some
time reading and learning how to master this area.
But do not let this deter you. The programs ARE rather simple - and you have my tutorial to guide you, step by
step. Furthermore, here's a list of several other articles I have written, which can help you prepare for the
task at hand.
Installing SUSE Linux - Full tutorial
Installing (K)ubuntu Linux - Full tutorial
Dual booting - Windows & Linux
Highly useful Linux commands & configurations
CloneZilla
CloneZilla is a fast, light imaging software that runs from a CD. It is well suited for desktop use, as well as
massive deployment in server environment. CloneZilla is rather simple to use. Let's demonstrate.
First, download the ISO and burn it to CD/DVD. Next, choose a computer that you want to test it on and boot
from the CD on that machine. For testing purposes, this can also be a virtual machine, in case you're afraid to
tamper with your real system.
The boot menu offers you to launch the application in a number of graphic modes, switch to the local hard disks
and boot from them, boot from the network, run a memory test, or boot into FreeDOS. We'll choose the first
option.
Next, choose your language and keyboard map.
Confirm your choice:
Start CloneZilla:
First, you need to decide whether you wish to image or clone your system. The difference is in the output.
Imaging results in a file being created. Cloning results in a target drive / partition being rewritten during
the cloning process - for instance, this is useful if you have bought a new hard disk and want to use it
instead of the old one. However, for now, we just wish to image our system.
Now, we need to mount a local partition that will be our target. We will create
the image and save it to this partition.
Before we do that, let us understand what we have here. Our system is Ubuntu, with three partitions, root, home
and swap. root is a primary partition, hence the notation hda1. The second partition is hda2, which is the extended partition, inside which numerous logical partitions
can reside. Logical partitions begin with the notation hda5 - or sda5 for SCSI disks, because the first four numbers are reserved for primary partitions. Swap
is our hda5.
Type
Partition
root (/)
hda1
Extended partition
hda2
swap
hda5
home
hda6
Now, hda6 is thus the second logical partition - and it is the home partition of our Ubuntu system. This is
where we will save the image of the root partition.
Please notice the last entry in the image above. /dev/hda6 is the target
partition that we mounted. Now, you need to decide what you want to do, backup or restore your system. The
option savedisk allows you to backup the entire hard disk. The option
restoredisk allows you to restore an image of an entire hard disk. The third
option, saveparts, allows you to backup only individual partitions. And
accordingly, restoreparts allows you to restore individual partitions. We wish to
backup individual partitions.
Some advanced options, no need to tamper with:
Choose the compression:
Choose the name for the image:
Next, you need to select the source partition - the one we want to image. This is our root, hda1. Please note
that hda6 is no longer available. This is because mounted partitions cannot be imaged. They need to be
unmounted. CloneZilla automatically removes mounted partitions from the menu.
You are ready to image.