Install OS on an SSD with the RPi Imager
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
- A Raspberry-Pi setup (starter kit is a great way to start)
- A 2.5" SSD (SATA connection)
- A USB to SATA Cable
Install Rasbperry Pi OS
- Install Raspberry Pi OS using Raspberry Pi Imager
- Enable SSH
Getting started
Copy SSH key:
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
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
sudo rpi-eeprom-update -d -a
Configure bootloader to boot from USB
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
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:
dd if=./speedTestFile of=/dev/zero bs=20M count=5 oflag=dsync