Pages

Thursday, February 8, 2018

Headless Raspberry Pi0w setup (without a monitor)

Notes on setting up a headless Raspberry Pi 0w. Based on the Raspbian install instructions and Pi0 wifi config from stackexchange.

On an existing Pi, where /dev/sda is the SD card device:

curl -LO https://downloads.raspberrypi.org/raspbian_lite_latest
unzip -p raspbian_lite_latest | dd bs=4M conv=fsync of=/dev/sda
mount /dev/sda1 /mnt
touch /mnt/ssh
umount /mnt
mount /dev/sda2 /mnt
cat >>/mnt/etc/wpa_supplicant/wpa_supplicant.conf <<EOF

country=US
network={
    ssid="SSID"
    psk="password"
    key_mgmt=WPA-PSK
}
EOF
umount /mnt


Move the SD to the pi0 and boot. Find the IP and ssh as pi@IP.
On the pi0:

passwd
sudo su -

apt update
apt upgrade
rpi-update


I usually run the updates in screen, I run "sudo apt install screen" after passwd.

No comments:

Post a Comment