Install the image on the sd card:
- in terminal window, run df -h
- insert SD card into PC
- run df -h
the SD card should show up
- use Disk Utility (Applications -> System Tools -> Preferences -> Disk Utility to unmount the drive.
- sudo dd bs=4M if=./2014-01-07-wheezy-raspbian.img of=/dev/rdiskX # Substitute disk number for X
- Use Applications -> System Tools -> Preferences -> Disk Utility to unmount the drive.
- use lsblk to list devices
- if any partitions of the sd card have been mounted, unmount them with unmount. Like:
umount /media/ECE4-1B42
- copy image file to sd card:
sudo dd bs=4M if=./image.img of=/dev/sdb conv=fsync
- unplug the sd card, plug it back in. Linux should mount the two drives, boot and rootfs
- on the rootfs drive, change to the boot directory, and create a file named ssh. This enables ssh on boot
edit the wpa_supplicant.conf:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Add the following to the end of the file:
network={
ssid="testing"
psk="testingPassword"
}
The above is all wrong. Create a file named wpa_supplicant.conf in the boot directory, the the device will copy it to the right location on boot.
- edit /etc/dhcpcd.conf Add this to the end:
interface eth0
static ip_address=192.168.1.15/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
eth0 should be wlan0 for wifi
Copy the image back to the hard drive:dd bs=4M if=/dev/sdX of=from-sd-card.img
Resources
INSTALLING OPERATING SYSTEM IMAGES ON LINUX
SETTING UP A RASPBERRY PI HEADLESS (no information, has links for stuff)
GETTING STARTED WITH THE RASPBERRY PI ZERO W WITHOUT A MONITOR (this is barely useful)