MicroSD Card Duplicator

DRAFT

Overview:

A McrioSD Card duplicator (or cloner, or copier) clones multiple 16GB Micro SD Cards at a time from one image. This reduces setup time for Raspbery Pi-based security cameras, Kodi media centers and other systems where the same image is required on multiple systems.

It can also be used for making backups once the system is configured.

I need a MicroSD disk duplicator. If I were to buy one, I would get a Systor 1 to 7 SD/microSD Duplicator - 2GB/Min - Standalone Multiple Flash Memory Card Copier, but at $525 I should build one.

If I ever need to do large quantities (or bulk), say 100 or more, then there is a service to this. While I have not used this service, it is good to know these services exist and are reasonably priced.

Required Parts:

    • Vilros Raspberry Pi 4 4GB with Aluminum Alloy Case, Amazon $89.99

    • Atolla Powered 10 port USB 3.0 Hub, 12V/2.5A Power Adapter, Amazon, $36.99

      • The USB Hub must be powered, In other words, it must come with its own power supply and not draw pwoer from the Raspberry Pi.

    • 10x SanDisk MobileMate USB 3.0 Reader, Walmart, $113.00

    • 2x SanDIsk 64GB MicroSD Card, Class 10 Ultra, Amazon, $18.18

      • only one is need for the project

    • 2x Five Pack of SanDisk 16GB MicroSD Card, Class 10 Ultra, Amazon, $77.92

      • all can be used in other projects

Required Tools:

    • None

Step 1. Set up Raspberry Pi 4

Follow the directions in Step1 with the following caveats:

    • My intention is to run the Duplicator as a networked device. However, OSID can be run with or without (headless) a desktop. If you want to use the Desktop, do NOT run the script: unused_rpi.sh. This removes the Desktop.

    • This project uses a Vilros aluminum case, which comes with instructions on how to set it up. I followed these and the fan attaches with black pin to physical pin 14, and red pin to physical pin 1 (3V).

    • I set up the Raspberry Pi 4 using an 802.11ac (5GHz) SSID on my home network. Lower speeds will work fine. Since I am going for performance, I don't want any artificial bottlenecks.

    • Use the Raspberry Pi 4 power supply.

Record your-password and your-hostname

Step 2. Setup USB Hub

zzz


Step M. Mount USB Hub and Raspberry Pi on a black sheet of ???

zzz


Step N+1. Setup, configure and pull down files from github

Open terminal and login to RPi

Initialize git

$ git init

Configure git

$ git config --global dumbo25.osid-python3 dumbo25

$ git config --global dumbo25.email "your-email@gmail.com"

$ git config --global core.editor nano

Pull down the files

$ git clone https://github.com/dumbo25/osid-python3

rewritten from Django site:

A Django project equates to a website with a configuration and one or more apps

Each Django application contains a python package that follows Django conventions.

python3 manage.py startapp <app> # automatically creates directory structure and associated python scripts for an app


An app is a Web application that does something specific.


A project can contain multiple apps. An app can be reused


After any changes, run these as a group

cd ~/newt_site

sudo systemctl restart apache2.service

python3 manage.py runserver


Check apache2 configuration

apachectl configtest


Check log files for error

cat /var/log/apache2/access.log

cat /var/log/apache2/error.log


Step N. Pull down files and install on Raspberry Pi

Open terminal and login to RPi

wget

Test Results:

    • Systor 1 speeds Up to 33MB/Sec

    • Run Tests to measure speeds

Comparison: Which is Best?

  • Test 3 in RPi

  • Test 3 in USB Hub connected to RPi

  • Test 3 in USB HUB connected to MacBook

  • Difference in card speeds

Time:

      • Test 1, 2, … N from whichever is best above


References:

    • Connect Box, Making a Low-Cost microSD card Duplicator

    • Kennesaw University, Duplicate Micro SD Cards with Your Raspberry Pi

    • Aaron Nguyen github, Open Source Image Duplicator (OSID)

      • Netting, Tarot, github, didn't find this until later. Seems more recent and could have been used as the base. At first glance, seems more complicated than OSID