clone copy of sd card

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
hatahata
Posts: 26
Joined: Thu Jul 07, 2016 3:42 am

clone copy of sd card

Post by hatahata »

hi all .

i tried clone copy of sd card .

by kali linux ,

Code: Select all

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 .
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: clone copy of sd card

Post by Fourdee »

hatahata wrote:hi all .

i tried clone copy of sd card .

by kali linux ,

Code: Select all

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:

Code: Select all

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.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
hatahata
Posts: 26
Joined: Thu Jul 07, 2016 3:42 am

Re: clone copy of sd card

Post by hatahata »

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 ... linux.html
hatahata
Posts: 26
Joined: Thu Jul 07, 2016 3:42 am

Re: clone copy of sd card

Post by hatahata »

another example of cloning on running arm is https://www.youtube.com/edit?o=U&video_id=k1vJzOUqiwQ
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: clone copy of sd card

Post by Fourdee »

hatahata wrote:and sd card interface .
Ah, my bad, I assumed you were trying to run DD the active SD card on a SBC, apologies.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
hatahata
Posts: 26
Joined: Thu Jul 07, 2016 3:42 am

Re: clone copy of sd card

Post by hatahata »

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

Code: Select all

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

Code: Select all

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 :lol: .
i also use this for btrfs :arrow: .
------
regards
http://nanopi-akita.blogspot.jp/2017/02 ... ietpi.html
:arrow: http://hatahata50.blogspot.jp/2016/12/u ... -arch.html http://hatahata50.blogspot.jp/2017/01/b ... s-png.html
Post Reply