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