I have disk image from VirtualBox, it is a raw image, just like dd makes it, now I would like to restore the system to real machine using Clonezilla. However Clonezilla does not recognize the image (there is no "restore" option which means Clonezilla does not see it).

The question is -- how to convert dd disk image file into Clonezilla format? So I could restore the system.

Why do you want to use CloneZilla and not restore with dd?
–
jippieMay 5 '12 at 21:03

The problem is, the target partition in restore is not the same as source partition in save, it is bigger, and dd didn't handle it (I tried already).
–
greenoldmanMay 6 '12 at 6:50

did you create a disk image or a partition image with dd? And which partition is larger, is the source partition larger than the destination, or the other way around?
–
jippieMay 6 '12 at 16:39

Did justaguy's solution work for you? I tried dd of a partition to an image file(not whole disk). But clonezilla didn't seem to see it. A commmenter(psusi) says even with clonezilla it ends up the wrong size. But it may be more than just a size problem. I tried a few non-unix programs to resize after restoring the image with dd. and one couldn't see it. one resized it but the amount remaining and amount used didn't add to the claimed partition size. I didn't resize it to the image size, as even if that worked, i'd have hardly any space free, as the drive had hardly any space free.
–
barlopJan 20 '13 at 11:10

@barlop, I don't remember exactly, probably you have to match the sizes, and enlarge partition afterwards. Something like this.
–
greenoldmanJan 20 '13 at 11:21

If you made the image with dd, then you just restore it with dd. If you really wanted to, you should be able to have clonezilla create its image from the raw image just like you would from a hard drive, but there is not much reason to.

The problem is, the target partition in restore is not the same as source partition in save, it is bigger, and dd didn't handle it (I tried already). And I cannot use Clonezilla to clone the partition because it is VirtualBox image, not "real" partition.
–
greenoldmanMay 6 '12 at 6:50

@macias, neither does clonezilla; you have to resize the filesystem afterwards ( with resize2fs for ext[234] ).
–
psusiMay 7 '12 at 14:20

@psusi What if upgrading from small hdd to bigger hdd. The partition on small hdd is still quite small and 95% used. Perhaps one could resize the destination partition to that size and have it work, but one may well want the destination partition to be bigger. Is that possible, and if so, then why doesn't having it bigger to start with work?
–
barlopJan 20 '13 at 11:14

@barlop, the partition is just a container. The only thing the size of the partition has to do with the size of the filesystem is that the filesystem can not be larger than its container. Moving the filesystem to a larger container does not automatically make the filesystem larger, hence resize2fs.
–
psusiJan 20 '13 at 15:23

When using dd to restore it back (and really, that's the easiest way), you can just change the values of the if and of arguments and then the image is restored. That's just like copying a backup folder from an external hard disk back to the "normal" hard disk.