To setup a brand new raspberrypi zero w you need prepare following tools:
- A raspberrypi zero w
- mini HDMI to HDMI convert
- Micro SD card
- USB OTG
- Mouse & Keyboard
- An external SD card reader
All coneectors can come from seller when you purchase Raspberrypi zero w.
Be aware, writing image to micro sd card will wipe all data on it
Connect micro sd card to your mac through micro sd card reader.
Once you can see your sd card in
finder, you need find out the
disk in system.
terminal and run
Find your sd card disk by its name. On my machine, the
/dev/disk2 in red rectangle is the
disk in system and copy
disk2 only (not
/dev/disk2) into clipboard.
Unmount the sd card from finder but do not unplug it.
Now, we need flash the image downloaded to sd card. You may need unzip it if the downloaded file is zipped by double click the file in finder. Below is the command to use:
sudo dd bs=4M if=<path to downloaded .img file> of=/dev/r<disk>
<disk> to your own one.
Now insert the flashed micro sd card to Raspberrypi Zero W and connect everything and you are ready to go.
- Resource busy: You need unmount the partitions mounted before you could use
ddto write the disk. See above.
- Permission denied: Make sure write protection on your sd card is open. Also use external SD card reader instead of Mac built-in one which could cause this issue.
- Operation not permitted: Make sure your device exists in system (check /dev/diskN)