Skip to content
Home » Boot Raspberry Pi from USB drive

Boot Raspberry Pi from USB drive

Advertisements

Some of the links shared in this post are affiliate links. If you click on the link and make a purchase, we will receive an affiliate commission at no additional cost to you.


Some write-intensive programs on the Raspberry Pi ensure that the service life of the MicroSD card, which the Pi uses as a boot medium, is quickly reduced. This is logical, because SD cards were actually designed as a storage medium for digital cameras. Writing takes place with every image or video, but nowhere near as frequently as with 24/7 operation of a write-intensive application on the Raspberry Pi. Write-intensive applications are, for example, game servers, logging and databases.

Such an SD card is not suitable as storage for an operating system. It therefore makes sense to move the operating system of the Raspberry Pi to a USB SSD or USB HDD. To do this, we first need a USB SSD or HDD. I use the Intenso SSD on my PI, which is perfectly adequate. If you want more memory, you can use the Samsung models:

SSDs also wear out through write operations, but significantly slower than SD cards. If a program is running on the Raspberry Pi that writes a lot, you can also use a USB-HDD:

A sufficiently powerful power supply is required to operate a USB medium on the Raspberry Pi:

Activate Raspberry Pi USB boot

There are various approaches that lead to the goal. First of all, we have to differentiate between the Raspberry 3 and Raspberry 4. The 4th version of the single-board computer supports USB boot by default, whereas with the previous version we first have to activate USB boot.

Raspberry Pi 3: Activate USB boot

To activate the USB boot on the Raspberry Pi 3, we need a Raspian on an SD card (recommendations for the Raspberry Pi).

This command installs USB boot for the Raspberry Pi:

echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt

The Raspberry Pi must now be restarted once for the settings to be applied:

sudo reboot

Then check whether the parameter has been set correctly:

vcgencmd otp_dump | grep 17:

The output should be “17:3020000a”. The Raspberry Pi can then be shut down and the USB boot medium can be connected.

Activate Raspberry Pi 4 USB boot

With the Raspberry Pi 4, all models that have the Eeprom Boot Loader in a version from or after September 3, 2020 are capable of booting via USB by default. This can be easily checked:

The Raspberry Pi must be connected to a monitor without a boot medium and supplied with power. The Eeprom Boot Loader will appear shortly and display the version. If the displayed version is older, the Eeprom Boot loader must be updated. For this we need the Raspberry Pi Imager and a microSD card.

Now select the SD card and click on “Write”.

Once the microSD card has been written to, simply insert it back into the Raspberry Pi and reboot. The update is carried out automatically. Now all you have to do is insert the USB boot medium and the Raspberry Pi will boot.

Mastodon