I am trying to clone an SD card which may contain a number of partitions, some of which Ubuntu cannot recognize. Generally, I want to clone the whole volume, not only some partition. So, I mount the SD card and see something like this in the Log viewer:
kernel: [ 262.025221] sdc: sdc1 sdc2 alex@u120432:~$ ls /dev/sdc* /dev/sdc /dev/sdc1 /dev/sdc2
Since I want to copy the whole disk, I execute:
dd if=/dev/sdc of=sdimage.img bs=4M
File sdimage.img, 7.9 GB (7,944,011,776 bytes) is created (SD card is 8 GB). Now I mount another SD card and execute:
dd if=sdimage.img of=/dev/sdc bs=4M
The problem is that the second dd command hangs on some stage, and never succeeds. After this, I cannot reboot or shut down computer, and I need just to switch power off.
Is this the correct approach? Maybe there is another way to clone an SD card?
OS: Ubuntu 12.04 (Precise Pangolin), 32 bit.