I had a 32GB SD Card with this structure (or very close):luis@Fresoncio:~$ sudo fdisk -lDisk /dev/mmcblk0: 29.2 GiB, 31393316864 bytes, 61315072 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xec4e4f57Device         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 LinuxAnd 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 (ddcfld, in fact):# ddcfld if=/dev/sda of=/dev/sdb bs=1MSo now, my new 64GB SD Card is:luis@Fresoncio:~$ sudo fdisk -lDisk /dev/mmcblk0: 59.5 GiB, 63864569856 bytes, 124735488 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xec4e4f57Device         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 LinuxWell, 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 ddcfldWhat may I do?Can I use dd or ddcfld ? 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 or gparted did not work (the Raspberry does not boot). Only dd seems to do the cloning without flaws.Similar question, but I think not the same.The ddcfld tool has the same syntax and behavior as dd. It just gives more info (progress... etc).
Using DD to copy only half (part) of removable device
dd
Assuming sda is your 64GB source SD card and sdb is your 32GB destination SD card.You can limit dd to only copy the number of required sectors with:dd if=/dev/sda of=/dev/sdb bs=512 count=61315072