Skip to content

Raspberry Pi setup

Guide to setup a Raspberry PI device.

Prepare the SD card

  • Flash a SD card with RPi OS: src
diskutil
touch /Volumes/bootfs/ssh
# Setup username and password (just openssl on Linux)
brew install openssl
/opt/homebrew/opt/openssl/bin/openssl passwd -6 | sed -e 's/^/USERNAME:/;' > /Volumes/bootfs/openconf
# Hash your WiFi password
# sudo apt -y install wpa_passphrase
sudo port install wpa_passphrase
wpa_passphrase "cool-house5" # then enter password
# Fill in the password hash
vim /Volumes/bootfs/wpa_supplicant.conf


# TODO: replace with custom.toml
  • Add WPA2/3 support: ref
    • vim /Volumes/bootfs/cmdline.txt
    • Append brcmfmac.feature_disable=0x82000
  • Kernel configs
    • vim /Volumes/bootfs/config.txt
  • Eject SD card and plug into Pi
  • Power on Pi (LED status codes)

Configure the OS

  • Log in
ssh-keygen -R raspberrypi.local
ssh pi@raspberrypi.local
ip addr
sudo raspi-config
sudo reboot

# on Mac
ssh-keygen -R raspberrypi.local
ssh jdoe@SUBDOMAIN.janedoe.com

Networking

  • Record the MAC address, ip addr
  • In pfSense, create a static DHCP lease
  • Go to Services >> DHCP Server >> LAN >> DHCP Static Mappings

  • Add a DNS record

  • Update unbound.conf
  • Go to Services >> DNS Resolver >> Custom options, paste in config