Categories
Raspberry Pi

Booting the Raspberry Pi from an SSD

It’s been possible to boot a Raspberry Pi from an SSD for a while now, but the process didn’t seem to have the full blessing from the Raspberry Pi Foundation. This changed recently when they announced their beta firmware to officially support it.

It was pretty painless to get it working, so here’s how I did it. Some notes up front:

  1. Based on research of past success stories, I went with this adapter – the ELUTENG SATA to USB 3.
  2. I used a Raspberry Pi 4 4GB
  3. The SSD I used was a spare Samsung EVO 250GB I had from a retired machine
  4. I connected the SSD directly to the USB 3 port
  5. I went with the headless version of Raspberry Pi OS (formerly known as Raspbian), but this should work with any of them
  6. Since my RPi was already running off an SD card I wanted to be able to plug in the USB drive and do this all from my couch. I only had to get up once, and that was to take out the SD card on the final reboot!

Steps

Most of these instructions all came from here.

Don’t blindly follow these instructions unless this post is only a few days old! Things are bound to change – this is beta software. Do it at your own risk. If a step has something in [brackets], you need to figure out your particular value.

  1. sudo apt update
  2. sudo apt full-upgrade
  3. sudo vim /etc/default/rpi-eeprom-update
    1. Change to: FIRMWARE_RELEASE_STATUS="beta"
  4. sudo rpi-eeprom-update -d -f /lib/firmware/raspberrypi/bootloader/beta/pieeprom-2020-05-15.bin
  5. On the RPi, download the Raspberry Pi OS image and copy it to the SSD. Make sure the SSD isn’t mounted!
    1. wget https://downloads.raspberrypi.org/raspios_lite_armhf_latest
    2. shasum -a 256 raspios_lite_armhf_latest (verify the SHA)
    3. unzip raspios_lite_armhf_latest
    4. sudo dd bs=4M if=2020-05-27-raspios-buster-lite-armhf.img of=/dev/[SSD DEV NAME] conv=fsync
  6. sudo rpi-update
  7. Reboot, and hopefully the SSD will automount. The RPi isn’t expected to boot from it yet, but should treat it like an external drive.
  8. sudo cp /boot/*.elf /media/[SSD mount]/boot
  9. sudo cp /boot/*.dat /media/[SSD mount]/boot
  10. Because I went with the headless install, I wanted to be able to SSH into it
    1. sudo touch /media/[SSD mount]/boot/ssh
  11. Power off the RPi
  12. Remove the SD card
  13. Power up
  14. Hopefully you’re booting off the SSD!

Performance

SD Reads: 42MB/sec
SD Writes: 22 MB/sec

SSD Reads: 314 MB/sec (7.4x)
SSD Writes: 212 MB/sec (9.6x)