Robin.te.Hofstee

Clone SD Card in MacOS

Robin te Hofstee2 min readViews1
Clone SD Card in MacOS

How to clone a SD card in MacOS.

clone your bootable SD card on macOS. Here's how you can do it using the dd command:

  1. Insert Both SD Cards: Connect both the source SD card and the target (larger) SD card to your Mac using SD card readers.

  2. Identify the Device Names: Open Terminal and run the following command to list all disk devices:

    diskutil list

    Note down the device names for both your source and target SD cards (e.g., /dev/disk2 and /dev/disk3). Be very careful to correctly identify the source and target devices to avoid data loss.

  3. Unmount the Target SD Card: Unmount the target SD card using the following command:

    diskutil unmountDisk /dev/disk3

    Replace /dev/disk3 with the actual device name of your target SD card.

  4. Copy the Source SD Card to the Target SD Card: Use the dd command to copy the entire content of the source SD card to the target SD card:

    sudo dd if=/dev/disk2 of=/dev/disk3 bs=4M

    Replace /dev/disk2 and /dev/disk3 with the actual device names of your source and target SD cards. The bs=4M option sets the block size to 4 megabytes for faster copying.

  5. Wait for the Process to Complete: The dd command will take some time to complete, depending on the size of your SD cards. Be patient and avoid interrupting the process.

  6. Eject the SD Cards: Once the copying is complete, safely eject both SD cards using the following command:

    diskutil eject /dev/disk2
    diskutil eject /dev/disk3

Now your target SD card should be an exact copy of your source SD card, including all bootable content. You can insert it into your device to test if it's working correctly.

Share this post
Robin te Hofstee

Written by Robin te Hofstee

Technology enthusiast with a deep love for programming. Sharing practical guides on React, Next.js, Linux and self-hosting.