jklondon
Posts: 23
Joined: Thu Dec 31, 2015 1:58 pm

Best way to create image of raspbian setup?

Tue Mar 08, 2016 11:30 am

Hi - I have been working on a project with a developer which uses sensehat. I want to port the application to a clean RPi. The setup manually is cumbersome as there are bunch of things that need to be setup as root first. I was wondering if the best way to achieve this would be to take an image (perhaps using docker?) and transfer that to a clean SD card.

Any help welcomed here.

JK

fruitoftheloom
Posts: 23132
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Best way to create image of raspbian setup?

Tue Mar 08, 2016 11:38 am

jklondon wrote:Hi - I have been working on a project with a developer which uses sensehat. I want to port the application to a clean RPi. The setup manually is cumbersome as there are bunch of things that need to be setup as root first. I was wondering if the best way to achieve this would be to take an image (perhaps using docker?) and transfer that to a clean SD card.

Any help welcomed here.

JK
:?:
https://github.com/billw2/rpi-clone
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Best way to create image of raspbian setup?

Tue Mar 08, 2016 11:40 am

Sounds sensible approach for the initial build at least. I use win32diskimager to create the master .img file then transfer to the target sd card(s). Just make sure the target has at least as much capacity as the master. You might want a different approach once the target units go live and only certain applications need updating.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

jklondon
Posts: 23
Joined: Thu Dec 31, 2015 1:58 pm

Re: Best way to create image of raspbian setup?

Tue Mar 08, 2016 12:08 pm

Thanks - used win32diskimager before so will try that first.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Best way to create image of raspbian setup?

Tue Mar 08, 2016 12:39 pm

Using rpi-clone to make a master backup has the advantage that the backup will fit onto any microSD card large enough to hold the occupied file space of the original so, for example, a 32GB card can be cloned to an 8GB or 16GB card if the 32GB card has less than 8GB or 16GB occupied. It's then just a matter of expanding the filesystem back out again via raspi-config when it's cloned back to a larger target.

By contrast, Win32DiskImager is a PITA because the target card must be EXACTLY the same size or larger than the original. Check the capacity of any, let's say, 32GB cards you have to hand and the chances are high that their capacities will almost certainly be different unless they're all from the same batch and are all the same make and model, so there's a fair chance that a clone of one won't fit onto another.

If you want a quick-launch installation of Bill Wilson's rpi-clone on a master Pi, take a look at my guide here...

viewtopic.php?f=29&t=137693&p=914109#p914109
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

Return to “General discussion”