0

I'm going to clone my 8GB SD card to my 16GB one. My current SD card 8GB Kingston SDHC Class 4, and my new one is 16 GB SanDisk Extreme 45MB/s SDHC Class 10.

I've attempted using Win32 disk imager, however I get CRC errors after it has completed the boot partition. So therefore I want to attempt to use dd and see if it works at all. I've had some experience with dd and I've been able to mount the outputted data to a .img file and then of course mount that image file when needed to access it. Question is, how do I re-add all the files and folders to the new SD card exactly how it was on my old one?

For example, the output of dd will likely be old.img. Therefore, I know just simply coping old.img to the new SD card won't work. I need the entire contents inside old.img to be on the SD card.

Thanks!

codaamok
  • 163
  • 1
  • 1
  • 10
  • Take a look at this question: http://raspberrypi.stackexchange.com/q/942/40 – Jivings Apr 28 '14 at 18:13
  • Thank you @Jivings, the link you gave took me to another question which included a similar answer to what user60684 gave. – codaamok Apr 28 '14 at 21:15

4 Answers4

2

Use this command:

dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=4096 conv=notrunc, noerror This assumes mmcblk0 is the source SD card and mmcblk1 is the new one.

If you only have one SD slot you can make an image, which can also be used for backups.

dd if=/dev/mmcblk0 of=backup-MM-DD-YYY.img conv=notrunc, noerror Swap SD cards then:

 dd if= backup-MM-DD-YYYY.img
   of=/dev/mmcblk0 conv=notrunc, noerror

notrunc means do not truncate the output file, noerror means to keep going if there is an error.

Boot into your new SD card and select expand file system on raspi-config.

user60684
  • 203
  • 2
  • 7
1

CRC error when cloning SD card for RPi seem to be just Kingston SD cards issue - this can be found else where on the internet. DD (for Windows) does not work for me either - same CRC error like in Win32 Disk Imager. Try to use some "cloning" SW where you can ignore CRC check error - i.e. Partclone (http://www.partclone.org/usage/partclone.restore.php) - this one works for me or try Ghost2k3 - this one I did not try, but there is possibility to turn off CRC error check in the menu.

Dew-spec
  • 11
  • 1
0

Just use dd or the Window's disk imager to copy the image to the new card.

Then boot from the new card.

If you are using Raspbian you can then use raspi-config to expand the user partition to use the full card.

joan
  • 71,024
  • 5
  • 73
  • 106
  • 1
    Please read the second paragraph of my question. – codaamok Apr 26 '14 at 20:03
  • There are several parts to the paragraph. What is your concern? – joan Apr 26 '14 at 20:15
  • That I'm unable to use Win32 Disk Imager due to CRC errors. – codaamok Apr 26 '14 at 21:18
  • If the SD card you are reading or writing is corrupt there's not much you can do apart from try several times. – joan Apr 26 '14 at 21:33
  • Hence my efforts for attempting to use dd... – codaamok Apr 27 '14 at 22:15
  • In case anybody comes across and interprets joan's message as the initial image creation... IT IS NOT... joan's comment is based on writing your backimage.iso back to your SD card. Reason why I'm commenting this is because without knowing that, you can completely erase the contents of your SD card otherwise. – codaamok Apr 28 '14 at 21:17
  • Good point. I've deleted the comment to prevent that happening. – joan Apr 28 '14 at 21:35
0

This happened to me when trying to copy a known working raspian SD card - win32 disk imager crashed with CRC errors. I was using a USB SD card reader. When I tried my laptop (DELL Core i3 Win 7 64bit) internal SD card reader it worked fine. I suggest you try a different SD card reader.

DaveB
  • 1
  • Nice suggestion, although my laptop does have an internal SD card reader. My issue is identical to yours though; Raspbian works perfectly, no issues, but unable to clone. – codaamok Apr 28 '14 at 21:13