Here

Who needs slow microSD cards when you can launch your favorite Raspberry Pi OS from high-speed SSDs? Ever since the first Raspberry Pi came out in 2012, the popular SBC … Read more

Taylor Bell

Taylor Bell

Published on Apr 27, 2024

Here

Who needs slow microSD cards when you can launch your favorite Raspberry Pi OS from high-speed SSDs?

A Raspberry Pi 5 with a USB drive attached to it

Ever since the first Raspberry Pi came out in 2012, the popular SBC family has followed the tradition of primarily supporting microSD cards for storing everything from the OS to the user files. However, even the best microSD cards can’t hold a candle to the superior transfer speeds of SSDs or the high storage capacity of hard drives.

Plus, if you’re rocking a relatively newer Raspberry Pi board, there’s no reason to bottleneck your projects by sticking to slow, low-capacity SD cards. So, here’s a quick guide on how to boot into your Raspberry Pi using a USB drive.

beagleboard sbc attached to drone

Related

Best Raspberry Pi alternatives

The Raspberry Pi is just one of many great single-board computer options available for a variety of projects.

Changing the boot priority using the Raspberry Pi Imager

The official Raspberry Pi Imager tool is a handy application that lets you customize the operating system before you can flash it onto a microSD card. Additionally, it even lets you modify the boot order of your Raspberry Pi, allowing you to launch an OS loaded into a USB or network drive with just a few steps:

1. Download the Raspberry Pi Imager from the official link and install it on your PC.

2. Run the tool with administrator privileges.

3. Click on Choose Model and pick either Raspberry Pi 4 or 5.

The steps to choose a Raspberry Pi model inside the Raspberry Pi Imager

4. Select the Choose OS option and enter the Misc Utility Images tab.

The procedure to enter the Misc Utility Images tab in the Raspberry Pi Imager

5. Click on Bootloader (Pi 5/4 family).

The Bootloader option highlighted in the Raspberry Pi Imager

6. Choose the NVMe/USB option.

The NVMe/USB Boot option highlighted in the Raspberry Pi Imager

If you’re rocking a Raspberry Pi 4, this setting will appear as USB boot.

7. Press the Choose Storage button and click on the microSD card where you wish to create the USB boot utility.

The Choose Storage option in the Raspberry Pi Imager

8. Tap the Yes button when prompted for confirmation.

9. Once the Raspberry Pi Imager has finished flashing the utility, unplug your microSD card and insert it into your Raspberry Pi.

10. Wait half a minute for the USB Boot utility to switch the startup priority of your Raspberry Pi from the microSD card slot to the USB port.

11. Remove the microSD card from the Raspberry Pi and insert the externalSSD/HDD/pen drive containing the flashed operating system files into the SBC’s USB port.

Although it’s a straightforward method, the only caveat is that this procedure only works if you’re using Raspberry Pi 4 or 5 models. So, if you’re on an older board, you’ll have to go for the alternate method instead.

Changing the boot priority using the terminal

The cmdline.txt file contains certain strings and variables related to the boot settings of the Raspberry Pi OS. As such, you can modify the boot priority by appending a new string at the end of this file.

1. Open the terminal app.

The Raspberry Pi terminal app

2. Enter the following code to open the cmdline.txt file using the Nano text editor.

sudo nano /boot/firmware/cmdline.txt
The command to open the cmdline.txt file

On older versions of Raspberry Pi OS, you’ll find the file in the /boot directory with this command:

sudo nano /boot/cmdline.txt

3. Add the following code at the end of the file:

program_usb_boot_mode=1
The string required to enable USB boot

4. Hit Ctrl+X to save the buffer, tap Y when prompted for confirmation, and press Enter to exit the cmdline.txt file.

5. Shut down your Raspberry Pi by executing the following command:

sudo shutdown

6. Unplug the microSD card and insert the USB drive containing the OS files into the Raspberry Pi.

Switching from an SD card to a USB drive

Once you’ve slotted your newly flashed USB drive into the Raspberry Pi, you may notice an error message if the wattage of your power supply is less than what’s recommended by the Raspberry Pi Foundation. Luckily, you can easily bypass this warning by tapping the power button once (on Raspberry Pi 5 boards) or changing the value of the usb_max_current_enable variable to 1 in the config.txt file located in the /boot/firmware directory.

With that, you’re free to leverage the ultra-fast speeds of SSDs in your Raspberry Pi projects. Certain GUI-based operating systems, such as Ubuntu, Raspberry Pi OS, and Windows 11, will benefit a lot from the superior transfer speeds, and you’re bound to see smoother performance when transitioning from a microSD to an SSD. If you don’t want to start your Raspberry Pi project from scratch after switching to a USB drive, you can easily back up the contents of your microSD card as an image file and flash it onto the USB drive.

A lifestyle image of the Raspberry Pi 5

Related

Raspberry Pi 5 review: The holy grail of DIY projects got even better (and rarer)

The Raspberry Pi 5 is one of the most powerful consumer-grade SBCs out there. Sadly, its limited stock means you’ll have a hard time finding one.

Partager cet article

Inscrivez-vous à notre newsletter