Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save earljon/b67aa3acd4347c6d3bf5c0fb1ef0abe1 to your computer and use it in GitHub Desktop.
Save earljon/b67aa3acd4347c6d3bf5c0fb1ef0abe1 to your computer and use it in GitHub Desktop.
Formatting SD Card and load a Raspbian OS in Mac OSX for Raspberry PI

Format and Load Raspbian OS to SD Card using MacOS for Raspberry Pi

  1. Unmount the SD Card and DO NOT EJECT.
diskutil unmount /dev/disk2s1
  1. On your terminal, type diskutil list. Find the disk number of your SD Card. For example disk2. Example
/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *7.9 GB     disk2
   1:                 DOS_FAT_32 RASPBIAN                7.9 GB     disk2s1
  1. Search your Raspberry OS Image file (ex: 2018-06-27-raspbian-stretch.img) and type the following command to load the OS to your SD Card. Please wait as this may take some time to finish. Yeah, no progress bar!:
sudo dd bs=1m if=2018-06-27-raspbian-stretch.img of=/dev/rdisk2 conv=sync
  1. Eject the SD Card:
sudo diskutil eject /dev/rdisk2
  1. Your SD Card is ready! You can now boot your Raspberry Pi using your newly created Raspbian OS inside your SD Card. Enjoy!

Sample Output:


→ sudo dd bs=1m if=2018-06-27-raspbian-stretch.img of=/dev/rdisk2 conv=sync  
Password:  
4600+0 records in  
4600+0 records out  
4823449600 bytes transferred in 726.374134 secs (6640448 bytes/sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment