Jump to content


A guide to using Clonezilla


  • Please log in to reply
10 replies to this topic

#1 OFFLINE   Frank Golden

Frank Golden

    Migrant Nuclear Worker

  • Forum MVP
  • 1,516 posts

Posted 13 September 2010 - 08:54 PM

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, 01 October 2012 - 10:26 PM.

Frank Golden

Acer Aspire as5672WLMi, Core 2 Duo Merom (T7200/2.0 GHz) Centrino, 500 GB Seagate Momentus 7200 rpm (SATA) HDD,   4 GB Corsair DDR2-PC5300 ram, ATi Radeon X1400 (128 MB built-in vram/384 MB system ram),
Win 7 Home Premium | Ubuntu 10.04 LTS  & Ultimate Edition 2.8 | Mandriva 2010.2 Gnome | PCLinuxOS 2010 Gnome & KDE ]
Registered Linux User #423741
Registered Ubuntu User # 6235


"Any sufficiently advanced technology is indistinguishable from magic"-Arthur C. Clarke

#2 OFFLINE   goretsky

goretsky

    Forum Fiend

  • Forum Moderators
  • 1,510 posts

Posted 13 September 2010 - 10:33 PM

Hello,Very nicely done, Frank!Regards,Aryeh Goretsky
Dexter is a good dog.
Aryeh Goretsky
Microsoft MVP Windows Expert - ITPro
My blog.

#3 OFFLINE   striker

striker

    handyman

  • Honorary Moderators
  • 8,501 posts

Posted 14 September 2010 - 03:13 AM

: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.or...=/00_ClonezillaThanks for posting Frank!
striker

#4 OFFLINE   Frank Golden

Frank Golden

    Migrant Nuclear Worker

  • Forum MVP
  • 1,516 posts

Posted 14 September 2010 - 09:57 AM

View Poststriker, on Sep 14 2010, 12:13 AM, said:

: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.or...=/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.
Frank Golden

Acer Aspire as5672WLMi, Core 2 Duo Merom (T7200/2.0 GHz) Centrino, 500 GB Seagate Momentus 7200 rpm (SATA) HDD,   4 GB Corsair DDR2-PC5300 ram, ATi Radeon X1400 (128 MB built-in vram/384 MB system ram),
Win 7 Home Premium | Ubuntu 10.04 LTS  & Ultimate Edition 2.8 | Mandriva 2010.2 Gnome | PCLinuxOS 2010 Gnome & KDE ]
Registered Linux User #423741
Registered Ubuntu User # 6235


"Any sufficiently advanced technology is indistinguishable from magic"-Arthur C. Clarke

#5 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 15,173 posts

Posted 14 September 2010 - 05:34 PM

Added to the Bruno's Classroom--Standard Tutorials section of BATL earlier today http://forums.scotsn...showtopic=33158Thanks for the great tutorial Frank!!
Posted ImagePosted Image Posted Image
CNI Radio/Archlinux G+/Configs/PGP Key π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#6 OFFLINE   Temmu

Temmu

    The Assimilator

  • Forum MVP
  • 11,491 posts

Posted 16 September 2010 - 05:31 PM

nice work, frank!
Posted Image

#7 OFFLINE   Frank Golden

Frank Golden

    Migrant Nuclear Worker

  • Forum MVP
  • 1,516 posts

Posted 17 September 2010 - 01:25 AM

Thanks everyone for the comments.
Frank Golden

Acer Aspire as5672WLMi, Core 2 Duo Merom (T7200/2.0 GHz) Centrino, 500 GB Seagate Momentus 7200 rpm (SATA) HDD,   4 GB Corsair DDR2-PC5300 ram, ATi Radeon X1400 (128 MB built-in vram/384 MB system ram),
Win 7 Home Premium | Ubuntu 10.04 LTS  & Ultimate Edition 2.8 | Mandriva 2010.2 Gnome | PCLinuxOS 2010 Gnome & KDE ]
Registered Linux User #423741
Registered Ubuntu User # 6235


"Any sufficiently advanced technology is indistinguishable from magic"-Arthur C. Clarke

#8 OFFLINE   Andy Gardner

Andy Gardner

    New Kid

  • Members
  • Pip
  • 1 posts

Posted 21 October 2010 - 12:09 PM

View PostFrank Golden, on Sep 17 2010, 05:25 AM, said:

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.

#9 OFFLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 15,173 posts

Posted 21 October 2010 - 12:27 PM

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.
Posted ImagePosted Image Posted Image
CNI Radio/Archlinux G+/Configs/PGP Key π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#10 OFFLINE   ChipDoc

ChipDoc

    Forum Fiend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,752 posts

Posted 21 October 2010 - 02:29 PM

Welcome, Andy!  Frank's the guy to chat with about Clonezilla.  When I see him, I'll point him to this thread - if he hasn't already seen it and replied!
Think! It's patriotic!
Enlighten the people generally, and tyranny and oppressions of body and mind will vanish like evil spirits at the dawn of day.
Thomas Jefferson, 1816
  Registered Linux User: 526339 , Check out The Bodhi Guide To Enlightenment

#11 OFFLINE   Frank Golden

Frank Golden

    Migrant Nuclear Worker

  • Forum MVP
  • 1,516 posts

Posted 22 October 2010 - 06:17 AM

View PostAndy Gardner, on Oct 21 2010, 09:09 AM, said:

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/
Frank Golden

Acer Aspire as5672WLMi, Core 2 Duo Merom (T7200/2.0 GHz) Centrino, 500 GB Seagate Momentus 7200 rpm (SATA) HDD,   4 GB Corsair DDR2-PC5300 ram, ATi Radeon X1400 (128 MB built-in vram/384 MB system ram),
Win 7 Home Premium | Ubuntu 10.04 LTS  & Ultimate Edition 2.8 | Mandriva 2010.2 Gnome | PCLinuxOS 2010 Gnome & KDE ]
Registered Linux User #423741
Registered Ubuntu User # 6235


"Any sufficiently advanced technology is indistinguishable from magic"-Arthur C. Clarke




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users