Saturday, April 14, 2012

Clonezilla cloning fully unattended

(Updated 24 August 2012) Clonezilla full automated cloning with a bootable USB-Stick. Tutorial with deep explanation.
At the end 0 Steps are required to clone a hard disk.

Clonezilla unattended.pdf

Let me know if you have something to add, if I missed something or if it is working well for you!

16 comments:

  1. very nice blog, howerver, I have one more question do you know how to edit the menus in clonezilla prompt? for example the word in the selection of the drive to clone.

    ReplyDelete
  2. I do not understand your question, can you be more clear? Maybe post and image from what you are meaning.

    ReplyDelete
  3. Very nice doc indeed, I have been looking for this several hours...
    I have seen a little error I think, you say we can use the "auto" option to get the name of the image automatically but it seems that it's "autoname" instead.

    Gilles

    ReplyDelete
  4. Thanks for the hint. It should be "autohostname". I will double check it and update the doc.

    ReplyDelete
  5. autohostname is correctly informed in your doc, but if you want to name the image with the MAC address, that's then "autoname" I think.

    Some other comments:

    I would may be use "-z2p" instead of "-z2" to have faster compression on multi-core computers.

    If you backup a Linux with ext4, you could write in your doc that "-q2" option should be used.

    Thanks again.

    ReplyDelete
  6. Dear David,
    Thanks for the post. I'm trying a completely silent run of Clonezilla from a PXE server with tftp and samba. I edited the isolinux.cfg for my samba server information. However my script goes into the ocs-live-general mode. Maybe you have some suggestions?

    1) On my PXE server I have these files under my tftp directories with vmlinux,isolinux.cfg,filesystem.squashfs

    2) While vmlinux loads I see these errors that look odd:
    "modprobe: module dm-raid45 not found in modules.dep
    modprobe: module unix not found in modules.dep"

    3) I added this line to the isolinux.cfg to get the filesystem.squashfs file: "fetch=tftp://myserver/filsystem.squashfs"

    4) Before ocs-live-general starts, I see this message displayed very quickly:
    "The jobs in /etc/ocs/ocs-live.d are finished. Start "ocs-live-general" now. Found ocs_prerun* parameter in boot parameters ... The order to run: ocs_prerun ocs_prerun1 ocs_prerun2 ocs_prerun3"

    5) Then I see the "ocs-live-general" menu now with "Start_Clonezilla Start Cloneyilla" or "Enter Shell"

    Is my fetch=.. overriding the unattended run of Clonezilla.

    thanks for any help and/or suggestions!

    ps: If I follow the ocs-live-general instructions, Clonezilla works fine.

    ReplyDelete
    Replies
    1. I do not have experience using clonezilla with a PXE Server. If you have not yet, ask the question in the clonezilla Forum, if you are clear with your Problem, they always help you a lot.

      Delete
    2. i got exactly this issue, but dont know how to stop that screen to debug :(

      Delete
  7. Hi David, How can I create an unattended disk to disk cloning with advanced -ICDS function?

    Thanks,
    Raj

    ReplyDelete
  8. This script is the same as i want. but when I us copy/paste its not correct. So i have tried to correct the script butt when it boots i got the opportunity to restart, shutdown.. after about 15 seconds.

    ReplyDelete
  9. I recieved the same thing.. when I copied and pasted it (I did change the hostname/server/username/password but It errors out and does not let me continue.. I get the option restart or shutdown..

    ReplyDelete
  10. hello there,

    I know its an old entry on a blog but I'm just wondering which method do you use to encrypt the password for use in the syslinux.cfg syntax for mount a samba share?

    hope someone reads and gives a shout on that

    Thanks!

    ReplyDelete
  11. Hello Rubens, sorry but I don't remember doing anything with an encrypted password.

    ReplyDelete
  12. Thanks David for your quick reply, I might be wrong but after reading your instructions I'm just looking at your mounting syntax:

    ocs_prerun2="mount -t cifs -o user=clonezilla,domain=lnz.diakoniewerk.at,password=Ae1W4Jsm1lLcfGuvxN9c 10.3.0.16:/Images /home/partimag"

    Im looking a way to encrypt the password in this line but I can't find the way anywhere.

    Is it encrypted in your manual or its just a normal password?

    Thanks again!

    ReplyDelete
  13. Hi David, The pdf url is out of date, please fix it. thanks

    ReplyDelete
  14. Hi David, I too would very much appreciate if you would fix the broken link. Thank you!

    ReplyDelete