Dumping and restoring sd-card contents

On occasions when a developer wants to debug a user’s issues with files they have on sd-card, if we are unable to replicate locally in any way, another thing we can try is to ask the affected user to dump some of their sd-card contents for us to assess by copying it to our own sd-card.

 

Dumping the full 1st partition of your sd-card

Linux/Mac systems may come with a tool like dd (or you could install it via some package manager).

E.g., if your sd-card is device /dev/sdb, then something like:

dd if=/dev/sdb1 of=sdcard_partition1.bin bs=1M

If it's sd-card that came with the MEGA65, this should result in a 13GB file called sdcard_partition1.bin.

 

Dumping a portion of the 1st partition of your sd-card

If the user’s sd-card isn't too full, maybe you don't need the whole shebang, and could make do with just the 1st gigabyte or so:

dd if=/dev/sdb1 of=sdcard_partition1.bin bs=1M size=1G

 

Copying the dump onto your own sd-card

Note: Prior to doing so, you probably should dump your own sd-card’s 1st partition, to assure that you don’t lose anything you need.

E.g., if your sd-card is device /dev/sdb, then something like:

dd if=sdcard_partition1.bin of=/dev/sdb1 bs=1M

 

Â