Cloning SD card in CLI to use in another pi question.

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Cloning SD card in CLI to use in another pi question.

Post by /RaspberryPi »


can i just use dd like this:

sudo dd if=/dev/mmcblk0 of=/dev/sda will this work?

i read a reddit post saying that i would need to do it as an image file

something like this in linux. Where hdx is the sdcard device,

To Backup:

dd if=/dev/hdx | gzip > /path/to/image.gz

To Restore:

gzip -dc /path/to/image.gz | dd of=/dev/hdx



can yall explain why or why not the first one will not work?

also if not too much trouble can yall explain why the other one would work and how it does?

its my first time using dd like this so im having some trouble understanding, the if=/dev/hdx would be the sd card thats running the os right? the restore one i would put the of=/dev/hdx as the sd card i want to put the clone on right?
submitted by /u/subaru_natsuki337
[link] [comments]

Source: https://www.reddit.com/r/raspberry_pi/c ... nother_pi/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”