Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Raspbian to SD card on Mac

How can i install Raspbian OS to my SD card without installing any additional software or application on my Mac. Most of tutorials found on google will require to install SD Formatter or didn't provide detail steps.

like image 836
Ryan Avatar asked May 26 '17 15:05

Ryan


People also ask

How do I clone a Raspberry Pi SD card to my Mac?

Insert the SD card in your mac. Open Disk Utility app and select the partition you want to backup inside the Raspberry Pi SD card. Select File > New Image > Image from “boot”. Select DVD/CD master from the Format menu, then Save.


1 Answers

  1. Download raspbian image from Raspbian website

  2. Extract the zip file

  3. Run df -h on any terminal

$ df -h

Filesystem      Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1     465Gi  278Gi  186Gi    60% 3262771 4291704508    0%   /
devfs          191Ki  191Ki    0Bi   100%     660          0  100%   /dev
map -hosts       0Bi    0Bi    0Bi   100%       0          0  100%   /net
map auto_home    0Bi    0Bi    0Bi   100%       0          0  100%   /home
/dev/disk2s1    60Mi   20Mi   40Mi    34%     512          0  100%   /Volumes/boot

Get disk number from df -h output. In example above X will be 2

  1. Unmount SD card

$ sudo diskutil unmount /dev/diskXs1

  1. Go to download directory and use dd command to format and copy Raspbian image to SD card

$ sudo dd bs=1m if=./2017-04-10-raspbian-jessie.img of=/dev/rdiskX

  1. Eject SD card

$ sudo diskutil eject /dev/rdiskX

  1. Insert SD card to Raspberry PI and start playing with it!
like image 196
Ryan Avatar answered Sep 20 '22 15:09

Ryan