12

Here at Stack Exchange we're deploying a bunch of Raspberry Pi's to do various displays in our new awesome NYC headquarters. I'm trying to mass-provision the units with the same SD Card image, however writing the image at 4MB/sec is painfully slow when it's a straight 16GB image created via dd.

What options do I have to mass-provision a lot of Raspberry Pi's all from a single source image? I don't have time to get an image pre-burned by a distributor.

Peter Grace
  • 251
  • 1
  • 7
  • Great question. We had a chat about this at the latest Jamboree. I'll try and dig up the slides. – Jivings Mar 21 '13 at 21:46
  • 2
    Do you use the full 16GB or is most of it empty. If it is mostly empty you could create a smaller image and have it resize at first boot. – Craig Mar 21 '13 at 22:44
  • @Craig do you have an example or links on how to do this? I was trying to figure out how to do this conceptually but if there's prior art somewhere that'd be far preferable. – Peter Grace Mar 21 '13 at 22:46
  • 1
    The raspi-config command has an option for expanding the rootfs you could probably setup a one-time startup script to do it using that as the basis. – Craig Mar 22 '13 at 04:48

4 Answers4

2

This video shows one solution (albeit not a particularly elegant one). Essentially the user has daisy-chained a series of USB Hubs and SD Card writers in order to burn 10 SD card images at a time.

enter image description here

He suggests that the script for doing this will be available from his GitHub but unfortunately I cannot find it. This appears to be his personal website if you want to contact him for the solution.

However, I doubt the script is very complex and wouldn't take much writing from scratch.

Jivings
  • 22,538
  • 11
  • 90
  • 139
2

A USB 3.0 SD card reader should be able to feed data at the speed limit of your card. It's still going to be much quicker to burn a minimal system, and let each Raspberry Pi do the resizing on second boot.

scruss
  • 9,068
  • 1
  • 24
  • 35
1

I am doing a similar thing with u-boot for starting up, using its pxe boot for the kernel and nfs later for the root filesystem. That way you only need to write about 3 mb which is really quickly done. It also means, you can ease maintenance by updating the only master copy on the nfs. The downside is, startup will be slower.

Max
  • 217
  • 2
  • 10
0

Alex Bradbury from the Raspberry Pi foundation is currently packaging up a tool which allows you to flash a bunch of SD cards at the same time (though it is limited to the number of hardware SD card slots you have).

His Github account currently does not have it available publicly, but it should be done soon (from what he told me at a recent conference).

phalt
  • 584
  • 4
  • 14