Cloning a Raspberry Pi using Ubuntu PC (8 steps)

Cloning a Raspberry Pi using Ubuntu PC (8 steps)

By CryptoSaga | revtoki | 11 Mar 2020


This is a quick guide, so there aren't many details. Please comment if you have any questions.

Steps:

1. Shutdown source rpi and insert its sd-card into pc.

2. Find sd-card device id using fdisk -l  

3. Copy everything into an image file:

sudo dd if=/dev/<sd-card-device-id> of=<wherever-you-want>/<whatever-name>.img

Wait for all the gigs to copy.

4. Unmount and remove source sd-card. Insert clone sd-card and make sure sd-card adapter is set to unlock (otherwise it may be read-only).

5. Use gparted to format as fat32.

6. Make sure its unmounted (may be superfluous since you just formatted):

sudo mount | grep <sd-card-device-id>

6.5. If mounted then umount all partitions (can also be done with gparted). Examples:

sudo umount /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb4
sudo umount /dev/mmcblk0 /dev/mmcblk0p1 /dev/mmcblk0p2 ..

7. dd to copy image into clone sd-card:

sudo dd if=<wherever-you-want>/<whatever-name>.img of=/dev/<sd-card-device-id> 

Wait for all the gigs to copy.

8. Insert in clone pi and test.



How do you rate this article?

5


CryptoSaga
CryptoSaga

Metaphysics and Crypto. Photo by Athena from Pexels https://www.pexels.com/photo/black-and-gray-motherboard-2582932/


revtoki
revtoki

Engineering blog

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.