I was limited to 7 adapters, but there's no reason to think it wouldn't work with a larger number of cards, albeit speeds will be limited to that of the slowest destination card. It's pretty much fire-and-forget once you get the parameters set correctly. Prior tests to a 3 port USB 2.0 hub on an A+ also worked. I did some casual testing, and was able to copy a microSD card image on a RPi 3B to a mix of 7 cards plugged into 3 types adapters on a USB hub. It's an enhanced version of GNU dd, with the ability to simultaneously write to multiple images. It is available in the raspbian jessie repositories.
So far as burning a lot of base images simultaneously, check out dcfldd. I've tested using a 13 port USB-3 hub and cheap (< $1) microSD-USB adapters. To address only having a single SD card slot on your computer, the easy answer for burning multiple images efficiently is a powered USB hub and a number of inexpensive microSD-USB adapters. Scripts could automatically detect that a card has been inserted and indicate when the copy completes.Īs darrenjw mentioned in comments though, you will want to replace the ssh certificates in each of the cloned images the first time they are booted, so you may want to make sure that this first boot is done while connected to a private network segment before connecting it to an internet connected network. You could even write a script to automatically write your chosen Raspberry Pi image onto any empty SD card slot inserted in a slot.
Given that no-one seems to have produced a multi-card SD card reader (one that can hold multiple SD cards at once) and the fact that that you can buy a USB hub and a bunch of single SD card USB readers very cheaply, one way to speed up the process would be to make your own SD card duplicator.
This technique would be largely experimental so your mileage would vary, but the theory of it sounds like an interesting experiment.Īlthough How do I backup my Raspberry Pi? provides excellent instrictions on how to clone a single SD card, doing it one at a time for dozens of cards will get tedious. Obviously this technique won't write all of your cards in one go, but it would cut back on the amount of time it takes to complete writing all of the cards. The more SD cards you image the more Raspberry Pis you can use to image new SD cards. Step 7: Repeat steps 3-6 until you have all of your cards written. Step 6: Inside of multixterm's stdin window you can use dd as you normally would to write images to the SD cards but now multixterm will send that dd command to both Raspberry Pis simultaneously. Step 5: Now here's where it gets interesting, from your main computer use multixterm like so from the command line multixterm -xc "ssh %n" host1 host2 where host1 and host2 are the ip addresses of the Raspberry Pis. Step 4: Put 2 empty SD cards into the USB stick adapters and plug them into the 2 running Rapsberry Pis. Step 3: Put the 2 SD cards with images into 2 Raspberry Pis and get them connected to your network and powered up. Step 2: Use the standard methods to write 2 of the SD card images with your main computer.
Step 1: Buy a bunch of the USB stick SD card adapters. You should be able to find multixterm in many distro's package managers. You could use the Raspberry Pis themselves along with multixterm on your main computer to "boot strap" your SD card writing.