How can we create an image from an entire disk?

0

I've tried clonezilla live cd, and I got an image but in a kind of folder. I would need an .img file or something because afterwards I will use some images together, but that is other story.

I also used dd if=/dev/sda of=~/disk1.img but it doesn't finish the image because the disk has 500GB and the image just about 100MB the first time and 2GB the second time, so I think that stops before finish for any reason I'm not aware of.

Do you know any way of doing an image of a disk?

Joe

Posted 2014-02-07T22:13:04.623

Reputation: 115

Questions asking us to recommend or find a tool, library or favourite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. – None – 2014-02-07T22:15:10.417

I don't think that I'm asking that. I just want to create an image and I don't know how to do it. Should I change the way of asking this question? – None – 2014-02-07T22:21:40.763

"free software if it is possible" This is you asking that. – takendarkk – 2014-02-07T22:26:03.050

If the problem was that, it is already resolved! – None – 2014-02-07T22:30:58.013

This question is off-topic for [so] because it's not about programming. You could try asking on [su], but be aware that product recommendations are off-topic on every StackExchange site. – None – 2014-02-07T22:46:56.823

Yes, guys, it is not about programming, but is it worth not to help therefor? Joe, dd is already free software :-) Is the partition where you want to save the copy different from sda? What about ddrescue ? You could mount a third partition or drive and use ddrescue if=/dev/sda of=/dev/sdb/disk1.img /dev/sdc/errorlog.txt – None – 2014-02-07T22:49:42.353

>

  • dd is the correct command for this kind of jobs. But: 2) you are trying to image /dev/sda, are you sure it is not in use as you image it? 3) A disk of 500GB will produce an image of 500GB. Do you have a disk large enough to contain the image?
  • < – MariusMatutiae – 2014-02-08T10:19:58.937

    Yes, I bought a disk of 4TB for that purpose. Could I recover the copy in the point it stopped? – Joe – 2014-02-08T19:29:13.857

    Answers

    0

    Try this command and options to avoid the process to stop when it find some bad sectors

    dd conv=noerror,sync if=<whatever> of=<whatever>
    

    dd OPTION

    conv=CONVS convert the file as per the comma separated symbol list

    Each CONV symbol may be:

    noerror continue after read errors

    sync pad every input block with NULs to ibs-size; when used with block or unblock, pad with spaces rather than NULs


    More info Man dd command

    cybernard

    Posted 2014-02-07T22:13:04.623

    Reputation: 11 200

    What is this? it is a part of a command, or part of dd? – Joe – 2014-02-08T19:30:01.893

    1@Joe yes dd conv=noerror,sync if=<whatever> of=<whatever> – cybernard – 2014-02-08T19:32:09.500