The commandline utility
dd is a core tool which I use very often to achieve different things. Right now I’m writing an Raspberry Pi image to a SD card. The problem with
dd is that it does not print any status information during runtime. And here comes the trap for young players: the trick using
dd -USR1 [pid] does not print status information on Mac OS. It terminates
Writing an image to an SD card on Mac OS is very simple assuming that you’ve opened the Terminal.app and stay in the directory where the image file is stored.
diskutil listto get a list of all storage devices connected to your computer. Get the device name like
/dev/disk3from the list - use the size of the device as identifying property.
diskutil unmountDisk [device name]to detach the device from the file system.
- Use the command
sudo dd if=[image filename] of=[device name] bs=1024to write the image to the sd card. Be aware of the fact that this command overwrites all contents of the SD card. So make sure that you’ve selected the right device name.
Step three might now take some time. To let
dd print the progress you simply need to know this command:
sudo kill -SIGINFO [pid]. That’s all it is! Simply replace
SIGINFO and you’re back on track.
ps ax | grep dd to get the PID of the
dd process and don’t use the PID of the sudo process.
Tip 2: when your device is
/dev/disk# use the command
sudo dd if=[image filename] of=/dev/rdisk# bs=1024. This will enable a much higher transfer rate since you use the raw disk
rdisk. A BSD thing you need to know.