How to clone SD cards on Linux

You can activate several devices by flashing and cloning your sd card. This article explains how to clone your SD card on linux.

Note: You will need to undertake a couple of steps beforehand. Take a look at our tutorial.

  1. Insert the SD card into your PC, through a USB or a built-in card reader.
  2. Open Terminal and enter the following command:
    sudo fdisk -l

    This will list all drivers on your system.

  3. Search in this list for the drive name of the inserted SD card.
    In our example it is: sdd.
    CloningSDcards-5-linux
  4. If you want to write the backup to a backup drive instead of the system drive, you have to first mount this drive.
    In our example it is: sdb1.
    CloningSDcards-6-linux
  5. Create a mount point:
    sudo mkdir /mnt/sdb1
  6. Mount the backup drive (sdb1) to this point:
    sudo mount -t auto /dev/sdb1 /mnt/sdb1
  7. To write the image to your backup drive use the dd command. The current date will be attached to the file name:
    sudo dd if=/dev/sdd of=/mnt/sdb1/emteriaBackup'date +%d%m%y'.img
    CloningSDcards-7-linux
  8. Insert the new SD card into your PC.
  9.  Before you restore the image, it is important to make sure that the SD card’s partitions are unmounted. To verify this, open the Terminal, and execute the following command:
    sudo mount | grep sdd

    Here sdd is the new SD card’s device name.

  10.  Use the dd command to write the image to your new SD card:
    sudo dd if=/mnt/sdb1/emteriaBackup'date +%d%m%y'.img of=/dev/sdd

 

Follow this tutorial to clone your SD cards on Windows.