Installing Raspbian to respberry using MAC

Installing the OS on SD card

  • donwload the image
  • insert the SD card in to MAC
  • find out the address of the SD card diskutil list
Blackcat-MacBook-Pro:Volumes blackcat$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         250.7 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +250.7 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            161.3 GB   disk1s1
   2:                APFS Volume Preboot                 21.9 MB    disk1s2
   3:                APFS Volume Recovery                519.0 MB   disk1s3
   4:                APFS Volume VM                      7.1 GB     disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *63.3 GB    disk2
   1:             Windows_FAT_32 boot                    46.0 MB    disk2s1
   2:                      Linux                         63.2 GB    disk2s2

the SD card is /dev/disk2 in my case

  • unmount the SD card sudo diskutil unmount /dev/disk2
  • write the image to SD card
    sudo dd bs=1m if=2017-04-10-raspbian-jessie.img of=/dev/disk2
  • eject the SD card sudo diskutil eject /dev/rdiskX

Connecting to raspberry

Reference

  • Create an empty file ssh on root directory of the SD card touch /ssh
  • Create a file vi /wpa_supplicant.conf on root directory
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="<wifi ssid>"
    psk="<wifi password>"
}
  • ssh pi@<IP of the raspberry>
  • default password is raspberry
Posted in notesTagged