For barebones initial setup of a Pi to boot from an external, USB-connected SSD.
Follow instructions in this tutorial, reproduced below:
-
Flash SD card using Raspberry Pi Imager
-
touch /Volumes/<volume>/sshto enable SSH on boot -
Boot Pi with SD card and network connection
-
Find its IP address (e.g. via router) and
ssh pi@<ip>username:
pi; password:raspberryAssign a static IP for the Pi in the router.
-
Run
sudo apt update && sudo apt full-upgrade -
sudo vi /etc/default/rpi-eeprom-updateChange
FIRMWARE_RELEASE_STATUSfromcriticaltostable -
Run command to update EEPROM:
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-06-15.binThis will update the bootloader (located in EEPROM on the Pi) to a version that enables RPi4 USB booting.
-
Reboot Pi with
sudo reboot -
Reconnect via SSH. Running
vcgencmd bootloader_versionshould give output like:pi@raspberrypi:~ $ vcgencmd bootloader_version Jun 3 2020 13:53:47 version b5de8c32f4f45a12a1fdfe107254df82965f9d56 (release) timestamp 1591188827 -
Shut down the Pi (
sudo shutdown -h now), remove the SD card. You no longer need it. -
Flash the external USB volume the same way you flashed the SD card (Raspberry Pi Imager). Complete the same
touch /Volumes/<volume>/sshto enable SSH on boot. -
Use this one-liner to grab the .elf and .dat files needed to boot from USB (from here):
wget $( wget -qO - https://github.com/raspberrypi/firmware/tree/master/boot | perl -nE 'chomp; next unless /[.](elf|dat)/; s/.*href="([^"]+)".*/$1/; s/blob/raw/; say qq{https://github.com$_}' ) -
Copy resulting files to the external USB volume (~20mb), replacing existing files
-
Eject the volume, attach volume to Pi, boot Pi, connect via SSH
If you get an SSH warning, your local machine has a stale fingerprint for the prior SD card OS in SSH
known_hosts. Remove the previous entry for the Pi's address (locally, not on the Pi):ssh-keygen -R <static ip> -
On the Pi, run
sudo apt update && sudo apt full-upgrade. Change the default password. -
Set up VNC (download client here) for a remote desktop interface. SSH into the Pi, then:
sudo raspi-config>Interfacing Options>VNC>YesIf you get a "Cannot currently show the desktop" error in the client when you attempt to connect, do
Advanced Options>Resolutionand select a different resolution. -
Set up an SSH key for passwordless entry by copying your id_rsa to the Pi (do a
ssh-keygen -t rsa -b 4096if you don't already have one):ssh-copy-id pi@<static ip>