Announcement

Collapse
No announcement yet.

How to clone your HD - what Clonezilla tutorials don't tell you

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to clone your HD - what Clonezilla tutorials don't tell you

    Clonezilla is a very powerful tool. There are various reasons why you might want to use it. Maybe you experiment a lot with your computer and are tired of reinstalling everything every time you make a mistake. Or maybe you put a lot of work into making your computer exactly the way you want it and want to be able to recreate it if something should go wrong.

    In my case, nothing has gone wrong since I started using Clonezilla, so I haven't been forced to try the "restore" option. But I very much enjoy feeling that I am getting a perfect clone of all five partitions on my laptop, grub2 and all, while Clonezilla cheerfully informs me with every step on the way, including at the end of every partition, that everything has gone well, before it courteously follows me to the door, and informs what keys I might want to press to shut down or restart.

    However, this state of affairs was not always as painless. It took quite a while before I understood how to get a good working relationship with Clonezilla. In fact, just as Clonezilla is very talkative when all goes well, it will repeat the same cryptic error message for hours, if anything goes wrong.

    The reason I am writing this is that backing up a system is as important for some people as backing up data. Unless you merely use your computer as a toy, you will resent its going down because you are unfamiliar with some aspect of Ubuntu. Cloning a computer need not be much more complicated than taking a backup of your data.

    You should download the latest release of Clonezilla:
    http://clonezilla.org/downloads.php
    I use the stable Debian-based release. I have a 64-bit computer so I go for the "clonezilla-live-1.2.6-59-amd64.iso" (as at 27 Jan. 2011) but there are isos for 32-bit too.

    Burn the Iso-file you downloaded to a CD (right-click downloaded file -> actions -> write image to disk with k3b)

    Now, according to the help files from Clonezilla, you could just leave the CD you have just burnt in your CD-rom and reboot from it. But that is where the missing link comes in!!! You will first have to clean the partitions you are going to clone, and Clonezilla does not tell you this! If no 'fsck' has been run for a while, you will get a cryptic error message.

    If your PC has only the one partition you use every day, you cannot simply clean it while you are at home, as it were. The partition you are going to clean has to be "unmounted": Open your Konsole (terminal) and paste:
    sudo touch /forcefsck
    This will make your computer check the disk automatically when you reboot your computer.
    Reboot


    If your computer has other Linux partitions, you have to find out what they are called. I know what mine are called, and so I run, in Konsole, for instance:
    sudo fsck /dev/sda5
    If you don't know the name of your partitions, you will first have to run (in Konsole)
    df
    Mind you, 'df' will only tell you the names of partitions that are mounted, so you have to mount them (You can do so simply by clicking on them in Dolphin file manager before you run 'df' in the console..) After you have written down their names, you will have to unmount them (or you can reboot) before you run "fsck /dev/...."

    If Windows partitions give you error messages, you will have to clean them up too. In the old days this was done with Scandisk, but I am not going to tell you how this is done in Win 7.

    This sounds like an awful lot of work, but it only takes time the first time, while you are reading my wordy explanation and, hopefully, understanding the crux of the matter, which is - repeat:
    Before you run Clonezilla, you need to run "fsck" for each of your unmounted Linux partitions.

    Now, since you presumably have the latest Clonezilla suited to your computer burnt as an ISO on a CD sitting in your CD-rom, and you have run the "fsck", you are ready to reboot from your CD. How you do this will depend on your computer.

    If you are going to clone your computer to a USB external hard disk, you can probably mostly go for the default choices as you are guided by the wizard. However, you might want to take a look at a Clonezilla guide, http://clonezilla.org/clonezilla-live-doc.php so as not to get confused. You will also have to pick (from a list) your source and target. (Cloneziila asks you for the target first.)

    The duration of the operation will of course depend of various things. You will be kept informed about progress. When the operation is through you should take the time to exit gratefully – just follow instructions.

    And yes, Clozilla handles a virtual machine guest (XP 32-bit, sitting on my Kubuntu 64-bit partition) and Win7 and of course ext4 journaling system.

    Please also refer to Snowhog's recent post
    http://kubuntuforums.net/forums/inde...opic=3115103.0






    #2
    Re: How to clone your HD - what Clonezilla tutorials don't tell you

    Thank you very much for your report. It is useful to read about other users' successes (and sometimes failures) with various programs.

    I have one small concern though.

    Originally posted by kle
    In my case, nothing has gone wrong since I started using Clonezilla, so I haven't been forced to try the "restore" option. But I very much enjoy feeling that I am getting a perfect clone of all five partitions on my laptop, grub2 and all, while Clonezilla cheerfully informs me with every step on the way, including at the end of every partition, that everything has gone well, before it courteously follows me to the door, and informs what keys I might want to press to shut down or restart.
    If you have never tested the restore function then how can you feel confident in your backups? If your system is valuable enough to backup in its entirety (as opposed to a fast file copy) then I think you most certainly should be testing your backups periodically.

    Before you restore your system from one of these images, better copy off any valuable data to an external medium as a secondary backup. In case something goes drastically wrong, you can never have too many backups.
    Welcome newbies!
    Verify the ISO
    Kubuntu's documentation

    Comment


      #3
      Re: How to clone your HD - what Clonezilla tutorials don't tell you

      There's another caveat to using Clonezilla. If you clone, say partition #3 and then rearrange your partition or just want to restore it to another partition #, Clonezilla won't allow it. I've question this behavior with the author, and was told that some time in the future they hope to rectify this. There is a hack that someone came up with, but for normal users that just won't do.

      How I got around this was to use partclone itself to restore to any other partition#. By the way, if your using Clonezilla, and normal linux partitions, it uses partclone to do the heavy lifting.

      I use to use Clonezilla a ot in the yerly years but found myself lately just using partclone only. By the way, you can verify your image using partclone's, "partclone.chkimg" command.
      Boot Info Script

      Comment

      Working...
      X