How to write .img files to an SD Card on MacOSX without installing any software.

I recently got a small touch screen for my Raspberry Pi. I'm creating a bitcoin ticker so I can see the current market value in £s just by looking at the screen. 

The screen came with a .img file on a CD. After loaning a CD reader from a friend who is a caveman, I set to work.

Issues encountered:
Very slow transfer speed - Solved. You get slow speeds if you don't p[re-pend the r in step 4.
Resource busy error - Solved. It's the error you get if you don't complete step 3.

1. Firstly we need to check check where the SD card is mounted. Plug it in and open Terminal. 

2. Type diskutil list into your Terminal window. This will give us the the disk identifyer. It will likely be disk2 or disk3.

Sample Output:
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:     FDisk_partition_scheme                        *8.0 GB     disk2
1:                 DOS_FAT_32 Pi                          8.0 GB     disk2s1

You can see here mine is in disk2.

3. Unmount the disk by typing diskutil unmount /dev/disk2s1 into the Terminal. Replace the red text with your disk number.

4. Type sudo dd if=/location_to_.img of=/dev/rdisk2 bs=1m into the Terminal window. Replace the red text with your disk number. Make sure your disk number is pre-pended with r, otherwise it will take hours. 

5. The dd command won't show you it's status. Wait until you see a success message such as:

3781+1 records in
3781+1 records out
3965190144 bytes transferred in 98.323135 secs (40328150 bytes/sec)

6. Unmount your SD card. Done!

No comments:

Post a Comment