19 Setting up a new scary RPi
mattzz edited this page 2025-03-16 20:36:10 +01:00

Setting up a new scary RPi

Preparing the flash card

See: https://www.raspberrypi.org/documentation/installation/installing-images/README.md

  • Download Raspian Image "RASPBIAN Bullseye LITE": https://www.raspberrypi.org/downloads/raspbian/
  • Download Etcher: https://etcher.io/
  • Use the application Etcher to flash the image (see README above).
  • Take out and re-insert the flash card so that it is visible again.
  • Create an empty file with name "ssh" in the root directory of the flash card (which is usually called "boot"): touch /Volumes/bootfs/ssh
  • Create the user config file: echo "pi:$(echo "raspberry" | openssl passwd -6 -stdin)" > /Volumes/bootfs/userconf
  • Put memory card into an RPi

Configuring the RPi

  • Plug in network cable
  • Boot the RPi by plugging in a Mini USB cable
  • After booting, find out the RPi's IP address
  • SSH into the RPi as user "pi" (default password is "raspberry"): ssh pi@IP_ADDRESS
  • Start configuration tool: sudo raspi-config. In the config tool:
    • Enable SSH for good in sub-menu "Interfacing Options".
    • Create locales. We need at least en_US.UTF-8.
    • Change the hostname to the name of the installation, e.g. eyesinthedark
    • Enter Wifi Country, SSID and password (For old RPis: insert Wifi USB stick and reboot beforehand).

Software installation

  • sudo apt-get --allow-releaseinfo-change update
  • sudo apt-get install git
  • Clone the repo https://git.mattzz.de/mattzz/halloween.git (see below for a suggestion how)

This will install all required dependencies, fix the locale stuff and setup nginx/systemd:

git tips

  • Clone without hacking certicate: env GIT_SSL_NO_VERIFY=true git clone https://git.mattzz.de/mattzz/halloween.git
  • Never check certificate for this repo: cd halloween git config http.sslVerify false
  • Set the cache to timeout after 1 hour (setting is in seconds): git config --global credential.helper 'cache --timeout=3600'

Other tips

  • Follow nginx/pumpkin log output: journalctl -u pumpkin -f
  • Restart and follow: sudo systemctl restart pumpkin; journalctl -u pumpkin -f

Bullseye / Debian 12 notes

See also [#179]

  • There is no standard pi user anymore due to security risks.
  • Use rpi imager instead of belana etcher! --> https://www.raspberrypi.com/software/
  • Use 32 bit image "Raspberry Pi OS Lite"
  • set user to pi - allow password auth! (or see /etc/ssh/sshd_config entry PasswordAuthentiation yes
  • set WIFI ssid/pw

python libs failing to install

GPIIO access failing

  • make sure piis in group gpio: sudo adduser pi gpio - re-login afterwards for changes to take effect

RuntimeError: Failed to add edge detection