Saturday, 1 December 2012

Clonezilla, its not really that scary!

Whether you are running Linux or Windows, its a good idea to clone your system before upgrading your system software, or doing anything that may brick your system.

Its easy to create a clone of your current system which you can then use to re-image your computer, in the event of a problem.


However, it should go without saying that re-imaging is a destructive process. The whole computer hard drive is going to be re-written when you restore an image.

For Windows users, the clone can be used only on the machine it was taken from, or another machine with exactly the same make/model motherboard. This is because Windows is installed using just the required hardware drivers for the target machine.

For Linux users, the clone can be used on just about any other computer. This is because Linux distributions normally have a wide range of hardware support included.

For MAC users, you need to do some research.

How Long Does It Take?

Well it depends on how much stuff you have on your computer drive, and the speed of the devices and interfaces that you use. As I write this, I'm cloning my media centre at a speed of 300MB/min. And as about 36GB of disk space contains files, it should take approximately 2hrs.

What You Will Need

  • A USB drive to save your image (the clone)
  • A CD or USB memory stick to create a boot-able version of Clonezilla

Now we need a copy of Clonezilla.
For Linux or Windows users, if you are happy to run Clonezilla on a CD, just go to: Clonezilla
...and download the iso for what is described as the latest stable release.

You then need to burn this onto a CD as an image (i.e. not just as a bunch of files) in order to end up with a boot-able disk.

For Linux or Windows users who would like Clonezilla on a USB stick we will use a free application called Tuxboot to create a boot-able device.

From this point on, all instructions and illustrations relate directly to Linux. But this guide should work pretty much the same for Windows, as TuxBoot is cross-platform, and Clonezilla is Linux based anyway.

Create a Clonezilla USB Stick

  • Download and install TuxBoot
  • Format a memory stick to FAT32 (it can be an old small stick, 256MB or larger)
  • Run Tuxboot

If you have not already downloaded the Clonezilla iso:-
  • Select On-Line Distribution and pick clonezilla_live_stable
  • click the "Update" button (the version number should appear)
If you already have the Clonezilla iso on your system:-
  • Select Pre-Downloaded: ISO
  • then browse for the ISO file.
In either case, continue:-
  • Select USB Drive and ensure the drive is displayed (this will be a drive letter on Windows, e.g. "E:").
  • click OK, and wait for your USB stick to build

 

Using Your Clonezilla USB or CD

Insert your CD or USB and boot from Clonezilla (you may need to interrupt BIOS to get it to boot from you Clonezilla device).

After a few seconds you should see the main Clonezilla screen with a number of options. Just press <enter> key to select the default "Clonezilla Live".

After lots of mostly white on black text, you should see a number of menus.

When creating a clone, you can accept the defaults for most of the screens that follow, with one exception:-
The screen where you choose where to save your Clone is important, because you need to select your USB storage device.
This is more or less what you do, just remember to press <enter> after each selection:-
  • Which language....select your language
  • Keymaps...select "Don't touch keymap"
  • "Start Clonezilla"
  • Select Mode: device-image
  • Mount Clonezilla Image Directory, Select mode: local_dev
Double check you have attached a USB storage device (e.g. a second stick or hard drive)...then press <enter>

  • ...mount a device...the drive to store your image is probably listed as sdc1 (check size)...select this.
  • Which directory...use root (i.e. /  top_directory)
  • File system disk space usage...just press <enter>
  • Choose the mode...Beginner
  • Savedisk: Save local disk as as image
  • Modify the suggested name to include computer id (e.g. 2012-11-30-Dell-D600)
  • Choose local disk as source: probably sda unless you have several disks
  • Skip checking/repairing
  • Check image: {Its your call, I'm not your mum!}
A couple more questions to agree to, then the clone starts!

Once cloning is complete, select the shutdown option "0" and allow the computer to shut down before disconnecting devices. That's all there is to it!

Restoring Your Clone

When the time comes to re-image your machine using a saved clone, the process is very similar. One important difference is that you must remember to select Restoredisk, rather than the default Savedisk.

Size Matters

You can't directly restore an image to a disk that is smaller than the original system disk. But you can usually shrink a drive (or at least shrink a disks contents into a smaller volume on a drive) using GParted.

So if you plan to roll out a Linux image to a range of machines, its best to resize with GParted before creating a clone with Clonezilla.

If you have already created a clone, you may have to restore to a suitable disk, resize with GParted, then clone from this smaller volume.

No comments:

Post a Comment