0
I have an 8G bootable SD card used for Raspberry Pi. Currently I bought an exactly same card, in order to clone the card. I have tried the following steps:
Create an image from the old card:
sudo dd if=/dev/rdisk3 of=SD.img bs=1m
It succeeded and the output shows:
7681+0 records in
7681+0 records out
8054112256 bytes transferred in 386.217068 secs (20853849 bytes/sec)```
Write the image into the new card:
sudo dd if=SD.img of=/dev/rdisk3 bs=1m
Here It failed and the output shows:
dd: /dev/rdisk3: Input/output error
7581+0 records in
7580+0 records out
7948206080 bytes transferred in 568.141243 secs (13989842 bytes/sec)```
I think the problem may be the difference between the number of blocks. Does it imply that these two cards don't have exactly the same size? (The new one looks smaller.) I would have to clone the card many times, so I wonder how can I make the image smaller (There's available space in it) so that I can write them to other cards, even with a little smaller size?
One seems to be 100mb smaller. Use gparted to make the larger one 110mb smaller. Then gparted can copy the contents of one to the other. – cybernard – 2014-12-30T02:06:35.103
Can you post the output of
fdisk -l /dev/rdisk3
of the original card ? If the SD Card has ~10 MB of free space at the end of the card - i.e. the/
partition ends before the end of the SD Card, then it shouldn't matter if the SD card is 10 meg smaller as nothing would get written at the end. – Lawrence – 2014-12-30T02:43:18.560That "m" needs to be upper case I believe, i.e. "...bs=1M" – None – 2015-05-12T04:05:55.773