Posts: 2
Joined: Sun Jun 10, 2018 6:19 pm

Clone my customized sd

Sun Jun 10, 2018 7:13 pm

hi over there to every one

After install my OS and write some python scripts and every thing work as i expect
i want to clone it to many raspi with minimal human intervention
so i want take my sd , put it in a sd reader in my desktop running Ubuntu or Windows and save it as it
for example: My_os.img then connect empty sd and write this img to it
Need help please

User avatar
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Clone my customized sd

Mon Jun 11, 2018 7:08 pm

For Ubuntu, to make image of card:

Code: Select all

cd ~
sudo dd bs=1M if=/dev/sdb of=my_os.img
Then, to copy to other cards:

Code: Select all

sudo dd bs=1M if=my_os.img of=/dev/sdb
Be very careful with the /dev/sdb - this must be the path of your SD card reader (use dmesg to check after plugging in the card).

Also make sure destination card is big enough to receive the image otherwise you'll have problems. There is a tool called (I think) PiShrink that will make the image file smaller, giving a better chance of it fitting on other cards.

Or is this still too much human intervention?


Paul Hutch
Posts: 353
Joined: Fri Aug 25, 2017 2:58 pm
Location: Blackstone River Valley, MA, USA
Contact: Website

Re: Clone my customized sd

Fri Jun 15, 2018 12:17 am

Yes the tool to remove the unused portion of the image is PiShrink and it works very well. PiShrink even sets up the card to run the file system expansion command on first boot to make the all the space on card usable on the new Pi like a fresh Raspbian install does.

Posts: 2
Joined: Sun Jun 10, 2018 6:19 pm

Re: Clone my customized sd

Sun Jun 17, 2018 10:35 pm

Ok thx
I will try it
and see
thx again

Posts: 553
Joined: Mon Aug 08, 2016 9:27 pm
Location: Chicago, IL

Re: Clone my customized sd

Sun Jun 17, 2018 11:36 pm

If you are using Raspbian on your Pi, you can use the SD copy utility to make a backup of the OS on a new SD card in a USB card reader. This tool will resize the OS copy to fit the new SD card as long as that card can hold the copied image with the free space removed. If the SD card is larger than the source SD card the copy will be expanded to use the entire card.

Return to “Advanced users”