I had a 32GB SD Card with this structure (or very close):
luis@Fresoncio:~$ sudo fdisk -l
Disk /dev/mmcblk0: 29.2 GiB, 31393316864 bytes, 61315072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xec4e4f57
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 1 125000 125000 61M c W95 FAT32 (LBA)
/dev/mmcblk0p2 125001 33292287 33167287 15.8G 83 Linux
/dev/mmcblk0p3 33292288 61315071 28022784 13.4G 83 Linux
And I transferred (from another computer, so the devices where sda
and sdb
) it to a (I choose the wrong one) 64GB SD Card via dd
(dcfldd
, in fact):
# dcfldd if=/dev/sda of=/dev/sdb bs=1M
So now, my new 64GB SD Card is:
luis@Fresoncio:~$ sudo fdisk -l
Disk /dev/mmcblk0: 59.5 GiB, 63864569856 bytes, 124735488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xec4e4f57
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 1 125000 125000 61M c W95 FAT32 (LBA)
/dev/mmcblk0p2 125001 33292287 33167287 15.8G 83 Linux
/dev/mmcblk0p3 33292288 61315071 28022784 13.4G 83 Linux
Well, no problem for now, but now I don't have the source 32 GB SD Card anymore, only the 64GB SD Card remains, and I would like to transfer it to some empty 32 GB SD Card again.
In this case, I assume I can not use dd
or dcfldd
What may I do?
Can I use dd
or dcfldd
? What could happen when the transfer arrives to the 32 GB boundary on the destination SD Card (data integrity problems)?
Further notes:
Any other method to clone the SD cards would be OK, but I have a problem: this case scenario is some SD card boot drive for a Raspberry Pi 2, and cloning via
partimage
orgparted
did not work (the Raspberry does not boot). Onlydd
seems to do the cloning without flaws.Similar question, but I think not the same.
The
dcfldd
tool has the same syntax and behavior asdd
. It just gives more info (progress... etc). Here is the man page.
ddcfld
, but plaindd
has a count flag where you can do thing likedd if=inputfile of=outputfilename bs=1M count=x
which transfers x times 1M blocks. – Hennes Oct 20 '16 at 22:58