Copy One Micro SD Card to Another?
Would it work to use dd to copy one card to a second card for a second MiSTer? If so does anyone know the right dd command for that?
The online community for MiSTer FPGA enthusiasts
https://misterfpga.org/
Would it work to use dd to copy one card to a second card for a second MiSTer? If so does anyone know the right dd command for that?
There is a Migrate SD script that will clone the card directly on MiSTer and expand to a larger size at the same time. Its not the fastest due to the DE10 IO but works very well
https://github.com/Natrox/MiSTer_Utils_ ... in/scripts
Use Natrox's Migrate script - works like a charm.
Otherwise I use (g)dd on my Mac. gdd is the Homebrew version.
Switch to root:
Code: Select all
$ sudo su

Show mounted disks:
Code: Select all
$ diskutil list
Insert source SD and
Code: Select all
$ diskutil list
Note
Code: Select all
/dev/disk#
for the source SD, e.g.
Code: Select all
/dev/disk4
Insert target SD and
Code: Select all
$ diskutil list
Note
Code: Select all
/dev/disk#
for the target SD, e.g.
Code: Select all
/dev/disk5
Unmount both SDs:
Code: Select all
$ diskutil unmountDisk /dev/disk#
e.g.
Code: Select all
diskutil unmountDisk /dev/disk4
and
Code: Select all
diskutil unmountDisk /dev/disk5
Check with the mount command that both SDs are unmounted
Begin flashing the image:
Code: Select all
$ gdd if=/dev/rdisk4 of=/dev/rdisk5 status=progress bs=16M
if = input file (source SD)
of = output file (target SD)
bs = block size, 16MB (optimized for Mac + SanDisk Extreme in my test)
PS. Make sure you're writing to the right disk - dd is called Disk Destroyer for a reason
This worked great but took 8 hours for 512GB:
Code: Select all
dd if=/dev/rdisk4 of=/dev/rdisk5 status=progress bs=16M
Yup, it can take forever depending on the speed of your interface. It literally copies bit for bit, so it doesn't care about actual usage.
8 hours or so is what it takes me using this method as well.