This is a guide for configuring Raspberry Pi4 to boot Ubuntu from external USB SSD drive instead of SD card. SSD drives are much faster than SD cards, more reliable and now lower cost than SD cards for larger memory sizes.
Instructions for Ubuntu server 21.10 are provided. Note that earlier versions of Ubuntu are much more difficult to configure for using external SSDs so I recommend using this latest Ubuntu release.
This guide assumes you are familiar with opertion of a Raspberry Pi, writing images to SD cards, and accessing the Raspberry Pi via SSH.
Hardware used in this guide
- Raspberry Pi 4 with at least 2GB RAM
- Any type of micro SD card with at least 8GB
- Kingston A400 120GB SSD
- StarTech SATA to USB adapter
- Eluteng SATA to USB adapter
- Adequate Power Supply due to additional SSD power consumption. (3.5A recommended)
- Windows 10 PC however guide will be similar for MAC and Linux Users.
- Raspberry Pi Imager (Balena Etcher is also a good tool for writing to SD cards)
NOTE: It turns out that there are a lot of SATA to USB adapters that do not work correctly when used to boot the Raspberry Pi. After many lost hours trying to get an incompatible cable to work I found this great resource on this topic with a database of know working cables.
James Chambers’ blog was also a great resource for writing other parts of this guide.
1. Upgrade bootloader firmware on Raspberry Pi 4
You need to make sure that the your Raspberry Pi 4 is running the latest bootloader firmware available. USB boot feature was enabled on the Pi 4 bootloader in the fall of 2020.
See this guide for upgrading bootloader.
2. Select Boot Device Preference
The default boot setting on our Pi is likely to boot off of SDcard only. We are going to change this so it cycles between trying to boot from SDcard first and then from external USB drive if SD card boot fails.
SSH into the Pi OS installation that you used to upgrade the bootloader in step 1.
- run raspi-config utility
- Select option 6 Advanced Options
- Select option A6 Boot Order
- Select option B1 USB Boot
You should get pop up window that says “USB device is default boot device”
- select ok
- select finish and select Yes when asked if you would like to reboot now.
the Pi should reboot like normal. Start SSH session to confirm
- shutdown Pi
sudo shutdown now
Install Ubuntu Server 21.10 on USB 3.0 SSD
USB booting Ubuntu Server 21.10 is very simple now with the latest Pi bootloader.
- Connect SSD to PC via SATA->USB cable
- Download Ubuntu Server 21.10 64bit
- Use Raspberry Pi Imager V1.6 or Balena Etcher to write Ubuntu Server 21.10 on the external SSD.
Be very careful when selecting the drive number that you choose the correct external drive and not your internal computer hardrive!
- Connect the SSD to the USB3 port(blue) on the Pi4.
- Make sure SDcard used previously to update the bootloader has been remove
- Power up the Pi. If everything is good the USB boot should work.
- SSH into Pi to confirm boot
Configure Ubuntu 21.10
See this guide for Basic Install of Ubuntu Server 21.10 on Raspberry Pi4