If you have to duplicate many SD cards for example to boot Raspbian on multiple Raspberry Pi board, one option is buy one of those SD card duplicators, but the problem is that they are not really cheap, for example the Systor 1-to-7 cards model sells for $540.
Bob Brown, a retired senior lecturer, is now teaching K-12 students how to get started with Raspberry Pi boards, and must prepare bootable SD cards for his class. In order to save time, a duplicator would have been nice, but the price is too high, so instead he went with a DIY solution.
You’ll first need some hardware, including a powered USB hub with the number of cards you want to duplicate, and corresponding SD card reader, and a larger micro SD card to hold Raspbian and/or other operating systems (optional, only for Raspberry Pi based duplicator). Mr. Brown made a 10-port SD card duplicator (1-to-9) for just under $100.
One the software side, he’s used to utilities. PiShrink used to reduce to size for the firmware image of the SD card you want to duplicate so that it can fit into SD card with a slightly smaller size, and dcfldd to handle dumping the firmware to multiple cards in one command.
Example for PiShrink:
sudo pishrink.sh my-rpi-os.img
Example for dcfldd to copy the firmware to 4 SD cards in one go, after installation:
sudo apt install dcfldd
sudo dcfldd bs=64k if=my-rpi-os.img of=/dev/sda of=/dev/sdb of=/dev/sdc of=/dev/sdd
Mr. Brown used a Raspberry Pi to run the command, you could also use your Linux PC instead. It takes about eight minutes for one card, and up to 20 minutes for 10 cards with the Raspberry Pi board. You’ll find the full details about the setup on Kennesaw State University website.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
|Support CNX Software - Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples|