2

I was trying to clone one Raspberry PI Image and write it to a new SD card. Unfortunately after tests i have found that the orginal SD 4G card is actually 3.69G and the new 4G SD card is actually 3.68G. :(

Am i screwed?

Cheers for looking

1

2 Answers 2

1

You're not screwed. That is not to say my solution will work, but one way or another this can be worked out.

The easiest way might be to start by using the image that was the original source of the card you want to copy (presuming it is not also 3.69G). Put that on the new card. Next, use gparted or whatever to size the data partition (for raspbian, that's the second one) on the card up. Then mount both data partitions, and update the new one from the old one with rsync:

rsync -aE /mnt/data-old /mnt/data-new

The -aE switches ensure permissions (including the executable bit) remain the same.

I have done this (for different reasons) before with raspbian and there were no problems.

Just to be clear: make sure you do this with the two cards mounted on a computer. Although you could use rsync over a network to update / on a running Rpi system, it is a very bad idea, if the pi is the destination of the sync.

1

This problem is taken care of by the built-in accessory "SD Card Copier" that is part of the RPi3 op system. It seems size tolerant: I copied my 32 GB card to a 16 Gb card.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.