Contents

How to install an OS on an SSD with the Raspberry Pi Imager

Introduction

I’ll walk you through setting up your Raspberry Pi 4 to boot from an USB connected SSD. We’ll start by flashing the SD card, then copy the card to the drive, move on to setting up the Pi and finish off by removing the SD card and allowing the Pi to boot from the SSD.

You will need

Install Rasbperry Pi OS

Getting started

Copy SSH key:

1
ssh-copy-id -i ~/.ssh/mykey user@host

Once you have Raspberry Pi OS installed you’ll want to make sure it’s all up to date

1
2
3
4
sudo apt-get update
sudo apt full-upgrade
sudo rpi-update
sudo reboot

Once you got back to your RPI Desktop:

  • plug in your SSD
  • Copy the content of SD card to SSD by using SD Card Copier

Make sure you have the latest bootloder by running

1
sudo rpi-eeprom-update -d -a

Configure bootloader to boot from USB

1
sudo raspi-config

Select:

  • Advanced Option -> Bootloder version -> Select first option -> Select No to reset boot ROM to defaults
  • Advanced Option -> Boot Order -> Select USB Boot
  • System Options -> Boot / Auto Login -> Console

Shutdown your Raspberry Pi, remove the SD Card and boot your device

Card speed test using the dd command

To find out the SD card write speed performance, we are creating 100MB of free storage space and five blocks of 20MB each

1
dd if=/dev/zero of=./speedTestFile bs=20M count=5 oflag=direct

To find out the read speed information of your SD card, issue the following command in the terminal:

1
dd if=./speedTestFile of=/dev/zero bs=20M count=5 oflag=dsync

References