0

Hi I'm looking to clone my 64gb microSD card (formatted as FAT32) for a Raspberry Pi to an external hard drive. I have the microSD inserted to my Mac and is /dev/disk2. I have the external hard drive also in my Mac as /dev/disk3s2. This error message shows

Erics-MacBook-Pro:Desktop $ sudo dd if=/dev/disk2 of=/dev/disk3s2/gnuradio_cmake.dmg

dd: /dev/disk3s2/gnuradio_cmake.dmg: Not a directory

I've tried to both mount and unmount disk3s2 to no luck. I've considered creating a new partition on the external hard drive that's formatted to MS-DOS (FAT). Would this potentially work or is some other action necessary?

3
  • Do you want to clone it into a file (.iso) or you want to clone the SD card into the external HDD? If you want to make the .iso file in the external hdd - you may need to find the disk3s2 mount point, which usually in /Volumes/<somewhere>/filename.iso not directly into the /dev/disk3s2. If you want to clone it directly into a partition, then yes, you can dd directly into /dev/disk3s2 - but the whole partition will be overwritten by the SD card partition.
    – Darius
    Commented Nov 27, 2016 at 23:55
  • I want a .dmg file, would it be the same process as .iso file?
    – Skiandtea
    Commented Nov 28, 2016 at 0:16
  • Should be the same as far as I know. They are slightly different as the wikipedia for each seems to refer, but if you are not using the additional features of the dmg, they are practically interchangeable. So yeah, just ensure you go of=/Volumes/<whateverdisk3s2_is_mounted_as>/gnuradio_cmake.dmg and that should make you a dmg file. Or in doubt you can always put it into your Mac HD first somewhere, and then copy it into your external HDD
    – Darius
    Commented Nov 28, 2016 at 0:19

1 Answer 1

1

First, open the terminal and find the disk number of the micro SD card using:

diskutil list

It'll be something like /dev/disk[number]. Then, find the location of the mount point for the external hard drive using:

df -h

It'll be something like /Volumes/[nameofharddrive]. Finally, choose a file name and use this command:

sudo dd if=/dev/disk<number> of=/Volumes/<whatever>/<yourfilename> bs=1m

The bs=1m speeds up the transfer. ALWAYS double (and probably triple) check before using the dd command. It will completely overwrite the wrong memory if you type the command incorrectly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .