Jump to content

A guide to using Clonezilla


Frank Golden

Recommended Posts

HOW TO USE CLONEZILLA-LIVE TO IMAGE\CLONE A PARTITION

 

Please excuse my clumsiness here this is my first attempt at writing a guide.

 

I hope I've succeeded in making Clonezilla easier to use. If further info is needed PM me (Sadly, our friend Frank in no longer with us). I welcome comments and constructive criticism. At first glance Clonezilla seems daunting, hopefully this guide can help folks master this great tool.

 

It is important to emphasize here that the speed at which Clonezilla completes its job is dependent of such factors as the amount an clock speed of the ram installed and the CPU type etc. Of course the amount of data that will be copied is a factor. Since the only data that will be copied is the used space on the partition the actual partition size isn't a factor.

 

This is very important: make sure any personal data is backed up before using Clonezilla.

 

For this guide I will be describing the steps needed to use Clonezilla for creating an image of a drive partition and also restoring the image. This applies to partition imaging not imaging a complete drive.

 

The .iso I used to create Clonezilla-live is a stable release (this is the latest as of 9-13-2010).Clonezilla-Live-1.2.6-59-i686.iso -->

http://clonezilla.org/downloads.php This version is optimized for use with dual\multicore processors. The i486 versions will work with multicore processors but won't be optimized for multicore.

 

Note: The partitions mentioned in this guide are examples.

 

The user should substitute the partition designators appropriate to his or hers situation. The examples outlined below are based on the steps I use to image my own personal Win 7 partition. The example I will use throughout is for imaging a 23,069.9 MB NTFS partition that has Win 7 installed on it. The space used by Win 7 is approximately 11 GB.Clonezilla will only copy the used space to create the image. This combined with the default compression will create an image that is approximately 5.5 GB in size.

 

Note: a limitation of Clonezilla and most other cloning tools relates to the actual size of the partition that is cloned. The image can only be restored to a partition that is exactly the same size as the source partition. It also must use the same filesystem and have the same sda* or hda* (* being a number). The size of the used space has no bearing on this limitation.In keeping with the examples here that means that I can restore my Win 7 image to another drive as long as the partition I restore it to is exactly 23,069.9 MB in size, is NTFS formatted and Clonezilla recognizes it as sda1. Sda1 also must be located at the start of the drive like the original. The destination partition can however be larger as long as the other conditions are met.

 

Having said this I recently used Clonezilla to migrate all my OS's from a 320 GB drive to a new 500 GB drive. I used Gparted to prepare the new drive exactly like the old with my NTFS & Fat32 data partitions (one of each) expanded to make use of the extra space available with the larger drive. About an hour with Gparted and Clonezilla did the trick.A quick restore of GRUB using the SuperGrub CD and I was up and running. When done I had the exact same partitions (with their corresponding OS's) on my new drive with 2 much larger data partitions.

 

Back to the guide.

 

The partition that will be imaged will be designated sda1 by Clonezilla and is the first one on the computer's hard drive. We will be saving the image to a 16 GB NTFS formatted USB flash drive.Clonezilla will call this flash drive sdc1. Clonezilla is run by booting to the media it is installed on, either a CD or USB thumb drive. If a thumb drive version of Clonezilla is used the computer must be capable of booting a USB device.

 

Most newer computers (the last 3-4 years) are able to boot from USB devices. The first thing is to boot Clonezilla live. When the scrolling text is finished the first of several graphic screens will appear. The first one is titled "Choose Language". The default choice is highlighted and is "US English". Unless you need otherwise use the default by pressing "Enter".

 

The next screen is titled "Configuring Console-Data" "Don't touch keymap" is the highlighted default. Unless there is a need to mess with the keymap don't change just press "Enter".

 

The next screen is the "Start Clonezilla" screen. The highlighted default is "Start-Clonezilla Start Clonezilla" Don't change just press "Enter".

 

The next screen is titled "Clonezilla". The highlighted default is "Device-image work with..." Don't change just press "Enter".

 

The next screen is titled "mount clonezilla image directory" the highlighted default is "local dev...". Don't change just press "Enter". At this point, if you want to plugin an external drive or USB flash device to save your image to do so now and wait for the 10 seconds or so for Clonezilla to recognize it. The text will stop scrolling when Clonezilla is done recognizing the new device. I would like to see Clonezilla report that is finished detecting the new device but it doesn't so just wait for no further activity. When Clonezilla finishes recognizing the device press "Enter".

 

Clonezilla will then take a few seconds to detect all available partitions and then switch to the next screen titled "Clonezilla-Open Source System (OCS) screen". Using the example mentioned earlier the Win 7 partition will be sda1 and the 16 GB Flash drive will be sdc1. It is important to remember that the drive\partitions mentioned here and throughout this guide are examples. The user should use the drive\partition designations appropriate to his\her situation.

 

Use the up\down arrow keys to select your external drive, Flash drive or partition that you want to use as the repository for your image. We will use sdc1, the Flash drive.Another limitation of Clonezilla is that the saved to partition cannot be the same partition that we are trying to image.

 

Clonezilla will mount that partition in the /home/partimag mount point that is a special mount point in ram when you press "Enter".

 

The next screen "Clonezilla-(OCS)" press "Enter" for the highlighted selection.

 

This sets the root of the external drive, Flash device or partition just mounted as the destination for your image.

 

On the next screen select the "Expert Mode" option using the down arrow key and pressing "Enter".

 

"Beginner Mode" should be avoided because it makes generic assumptions about settings that may not be appropriate for all situations.That is my experience anyway.

 

At the next screen titled "Clonezilla: Select mode", use the down arrow key to highlight "saveparts" and press "Enter".

 

At the next screen we will name the image. Just type in a name at the cursor don't use punctuation marks or spaces. Be descriptive.

 

In this example we will name our image win7, the complete image name will be 2010-09-09-19win7 in this example.The 2010-09-09-19 prefix will be provided by Clonezilla just type your desired name after that.

 

Press "Enter".

 

Wait for Clonezilla to exclude busy partitions and select the source partition from the next screen.This is the partition you want to create an image from.In this case, per the example that would be sda1 our Win 7 install

 

Press "Enter".

 

Press "Enter" again.

 

On the next screen deselect -j2 by using the down arrow key and pressing the spacebar.

 

Press "Enter".

 

On the next screen use the default highlighted compression scheme (-zip).This compression scheme provides the best balance between small image size and the time it take to create it.

 

This default scheme is optimized for multicore processors.We can expect the image size to be about 50% the size of the used space on your partition.

 

The nice thing about Clonezilla is that it only copies the used space, ignoring the free space of your drive or partition.

 

After selecting the compression mode press "Enter".

 

Press "Enter" again.

 

At the next screen select "True" if you want to start Clonezilla again after then process completes.If it is desired that the program exit after completing the imaging process then select the option "Poweroff".

 

If "Poweroff" is selected then the program will exit and the computer will shutdown after completing the image. For this step, and this example choose "true".

 

We will be performing a restore of the new image right after we create it without completely exiting Clonezilla.This will "prove" that the image will work when\if it is needed.

 

Press "Enter".

 

Press "Enter" again.

 

Type Y and then press "Enter".

 

Wait for Clonezilla to complete the image.

 

In this example about 10-15 minutes will do the trick.When finished the command line will reappear with the text "Enter" to continue...".

 

At this point and in keeping with the example a new image of the used space on sda1 (Win 7 install) will have been created in the root of the USB flash drive designated sdc1.

 

As we will see we can restore this image using Clonezilla from this Flash device.

 

I've found that restoring an image stored on a USB flash device is very fast.

 

Using the example the restore rate is about 2.5 GB a minute(about 3 minutes total)

 

At this time we will restore the image just created from it's storage location on sdc1 to sda1.

 

This is a somewhat risky step because by performing a restore we are actually overwriting everything on sda1.

 

By this point any important data should have been backed up as mentioned at the start of this guide.

 

This step is optional.It's worth the risk however to be sure the image will work when needed.If a restore succeeds here it will work later when disaster strikes.

 

It's all about peace of mind.

 

I've never had Clonezilla fail but there is always a first time so it's important that any data be backed up..

 

OK lets restart Clonezilla.

 

Press "Enter" and type 3

 

Press "Enter".

 

This will restart Clonezilla.

 

Accept the defaults through the screen where Clonezilla detects the drives\partitions available.That would be the screen titled "mount clonezilla image directory".

 

Since the USB device is already plugged in simply press "Enter".

 

The next screen is "Clonezilla-mode".

 

Per this example we select sdc1 for our USB Flash drive since this the location of our image.

 

Press "Enter".

 

At the next screen select "Expert Mode" and press "Enter".

 

At the next screen select "restoreparts".

 

Press "Enter".

 

At the next screen select Win7 as per our example as the image file we will restore.The full name of the image will include the date that the image was created.

 

Next is as an example of what the image title will look like 2010-09-09-19-Win7

 

Note: This is an actual image title of an image I created while preparing this guide.

 

Press "Enter".

 

At the next screen select the target partition in this case it will be sda1.

 

Clonezilla will overwrite this volume with your chosen image so make sure you have the right partition selected.

 

Press "Enter".

 

On the next screen there are a number of options with several selected by default.

 

Deselect all of them but the -c option using the up\down arrow keys and the spacebar.

 

I've found through experience that these options aren't needed (except for the -c option).

 

Keeping some of them has even messed up my multi-boot system's GRUB bootloader.

 

After making your changes here press "Enter".

 

Press "Enter" again.

 

At the next screen choose "Poweroff" since we will be done with Clonezilla.

 

Press "Enter".

 

Press "Enter" again.

 

Type y and press "Enter".

 

Type y again and press "Enter".

 

When the restore is complete (in about 3 minutes per this example), Clonezilla will exit and the computer will shutdown.

 

Clonezilla might prompt the user to eject the CD or unplug the USB drive and press "Enter".

 

Do so if instructed.

 

Restart your computer.If everything went well your image will boot normally.

 

Save the images to at least one other location if possible so that if one location fails the other will have a copy of the the image file intact.

 

Keep the very first image you create around in case a subsequent image fails to restore.

 

As I said before that first restore is a nail-biter since you have no previous and proven image to fall back on.

 

I've made it a habit to create images of all my OS partitions (6 in all) at least once or twice a month and I always have at least 3 previous images saved on an external drive.

 

When I create new images I delete the oldest to save drive space on my storage drive.

 

I hope this guide is of some help to anyone needing to use Clonezilla.

 

Once the user runs Clonezilla a few times it should become second nature.

Edited by securitybreach
Link to comment
Share on other sites

:thumbup: This is brilliant Frank! If one can read he/she can use Clonezilla. And the best part: it's free.note: if anyone would like to see some screenshots, you can find them at:http://clonezilla.org/screenshot/?in_path=/00_ClonezillaThanks for posting Frank!
I've been meaning to do this for some time now.I roughed out the basics this last weekend in response to another members PM requesting help with Clonezilla.As it turns out I ended up walking the member through the steps on Sunday over the phone as well as emailing hime the rough guide.I figured most of the typing was done so I polished it up a bit and added a little formatting and posted it here.I hope it helps others with Clonezilla.With the screenshot links you provided plus the other documentation it should be very clear.
Link to comment
Share on other sites

  • 1 month later...
Thanks everyone for the comments.
I have been using Clonezilla recently to back up our UNIX boxes and then use the images to create a rescue cd (iso format). It makes for easy installation when sending out to customers. However, when your run the rescue cd the first thing you have to do is type exit to get into the Clonezilla part that kicks it off. Ideally I would like the rescue cd to start straight off without having to ask the user to do anything. Afterall it does seem a bit weird typing exit to actually start something. Does anyone have any ideas how to get around this or what command to add when creating the iso to kick it all off straight away. To create the iso in the first place I am using the following command in Clonezilla (BTW, if anyone wants a step by step guide to doing this I can list the steps here)/opt/drbl/sbin/ocs-iso -g en_US.UTF-8 -t -k NONE -e "-g auto -b -c restoredisk <clonezilla image> sda" <clonezilla image> where <clonezilla image> is that created using clonezilla to back up the image. I use ssh server and back up to another unix machine, then go to that other machine and create the iso.Any help would be gratefully accepted.
Link to comment
Share on other sites

securitybreach

Welcome to the forums Andy!!!As far as the clonezilla issue, I am not for sure since I have not used Clonezilla that much. I usually just use rsync to backup my partitions.

Link to comment
Share on other sites

I have been using Clonezilla recently to back up our UNIX boxes and then use the images to create a rescue cd (iso format). It makes for easy installation when sending out to customers. However, when your run the rescue cd the first thing you have to do is type exit to get into the Clonezilla part that kicks it off. Ideally I would like the rescue cd to start straight off without having to ask the user to do anything. Afterall it does seem a bit weird typing exit to actually start something. Does anyone have any ideas how to get around this or what command to add when creating the iso to kick it all off straight away. To create the iso in the first place I am using the following command in Clonezilla (BTW, if anyone wants a step by step guide to doing this I can list the steps here)/opt/drbl/sbin/ocs-iso -g en_US.UTF-8 -t -k NONE -e "-g auto -b -c restoredisk <clonezilla image> sda" <clonezilla image> where <clonezilla image> is that created using clonezilla to back up the image. I use ssh server and back up to another unix machine, then go to that other machine and create the iso.Any help would be gratefully accepted.
You might see if the Clonezilla forum can help.http://clonezilla.org/forum/
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...