clone copy of sd card

hi all .

i tried clone copy of sd card .

by kali linux ,

dd if=/dev/mmcblk0 of=/dev/sdb bs=16M

/dev/mmcblk0 is original sd card , and /dev/sdb is cloned sd card .

but this method is to be cloned bigger size sd card .
what to do to clone to smaller seze sd card ?


regards
the clone methods by using rsync are failed , i do not know the reason .

You should not clone a active partition.

Your best bet would be to plug the SD card into a usb reader, then something like:

dd if=/dev/sda of=/dev/sdb

Where /dev/sda is the SD card you want to clone, /dev/sdb is the target card.

Or for simplicity. Win32Diskimager, click read to create an .img file. You can then write that to another SD card.

i use kali linux .

it runs on intel CPU .
and
it has both usb intterfaces and sd card interface .

so dd if=sd card interface of=usb intterfaces .


by the way
i can clone sd card on running arm machine which runs armbian .
see http://odroid-akita.blogspot.jp/2016/05/odoroid-c2-arch-linux.html

another example of cloning on running arm is https://www.youtube.com/edit?o=U&video_id=k1vJzOUqiwQ

Ah, my bad, I assumed you were trying to run DD the active SD card on a SBC, apologies.

recently i backup micro sd card to hard disk by archlinux .

fdisk -l /dev/sdb
x=`date +%m%d-%H`
echo $x
read X
echo $X
dd if=/dev/sdb of=./MBR-$x.img bs=512 count=10000
partclone.ext4  -c -s     /dev/sdb1          -o    ./sdb1-$x.pcl
partclone.ext4 -c -s     /dev/sdb2          -o    ./sdb2-$x.pcl

restore namely clone is easy .
for example about sdb1

dd if=./MBR.img of=/dev/sdb bs=512 count=10000
partclone.ext4 -r -s ./sdb1.pcl -o /dev/sdb1

this is time sparering and more volume sparing :rofl: .
i also use this for btrfs :arrow_right: .

regards
http://nanopi-akita.blogspot.jp/2017/02/nanopi-m1-dietpi.html
:arrow_right: http://hatahata50.blogspot.jp/2016/12/uefi-btrfs-arch.html http://hatahata50.blogspot.jp/2017/01/bluetooth-cloning-snapshots-png.html