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 22.04 LTS 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.
Requirements
Hardware used in this guide
- Raspberry Pi 4 with 8GB RAM
- 32GB micro SD card
- 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)
Software used:
- Windows 10 or Windows 11 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.
- Use Raspberry Pi Imager V1.6 to install Raspberry Pi OS (lite version without desktop is best) on SD card
- Copy empty text file called ssh.txt onto the system-boot partition of the SD card. Remove SD card from PC and insert into Raspberry Pi
- SSH into Pi
Default user:
default password: - Make sure you have the latest kernal updates. This will take several minutes
- Restart Pi to apply updates
- SSH into Pi
- Your Pi may currently be configured to use critical or stable bootloader releases. Normally I configure it to use the stable releases. Open file and change the FIRMWARE_RELEASE_STATUS entry to stable.
- Check bootloader firmware version
If bootloader is out of date you will see something like this:
If bootloader is up to date you will see something like this:
- Update bootloader if it is out of date
- Restart Pi to apply updates
- Check to see if update was applied
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
- Select option
- Select option
You should get pop up window that says “ ” - select
- select
the Pi should reboot like normal. Start SSH session to confirm and select when asked if you would like to now. - shutdown Pi
3. Install Ubuntu Server 22.04 LTS on USB 3.0 SSD
USB booting Ubuntu Server 22.04 LTS is very simple now with the latest Pi bootloader.
- Connect SSD to PC via SATA->USB cable
- Download Ubuntu Server 22.04 LTS 64bit
https://ubuntu.com/download/raspberry-pi - Use Raspberry Pi Imager V1.6 or Balena Etcher to write Ubuntu Server 22.04 LTS 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
Default user: ubuntu
default password: ubuntu