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>/ssh
to 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:raspberry
Assign a static IP for the Pi in the router.
-
Run
sudo apt update && sudo apt full-upgrade
-
sudo vi /etc/default/rpi-eeprom-update
Change
FIRMWARE_RELEASE_STATUS
fromcritical
tostable
-
Run command to update EEPROM:
sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/stable/pieeprom-2020-06-15.bin
This 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_version
should 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>/ssh
to 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
>Yes
If you get a "Cannot currently show the desktop" error in the client when you attempt to connect, do
Advanced Options
>Resolution
and 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 4096
if you don't already have one):ssh-copy-id pi@<static ip>