Close

How to Edit Boot Config for Raspberry Pi 5 USB Boot: A Complete Guide

hedyHedy wrote 7 days ago • 8 min read • Like

The Raspberry Pi 5 brings a big leap in performance, connectivity, and flexibility compared with earlier models. One of the most useful features for advanced users is USB boot support, which allows the Raspberry Pi 5 to boot directly from a USB SSD or flash drive instead of relying only on a microSD card.

For many users, USB booting offers several advantages. SSDs are generally faster than SD cards, provide better durability, and are often more reliable for long-term projects such as home servers, media centers, development environments, or embedded systems. If you plan to run your Raspberry Pi 5 continuously or want better storage performance, booting from USB is a smart upgrade.

In this guide, we will walk through everything you need to know about editing the Raspberry Pi 5 boot configuration for USB boot. We will cover the prerequisites, firmware updates, how to edit the boot configuration, how to change the boot order, how to prepare a USB drive, and what to do if something goes wrong.

Whether you are a beginner setting up USB boot for the first time or an experienced maker looking for a clean reference, this article will help you get the job done.

Why Boot Raspberry Pi 5 from USB?

Before diving into configuration steps, it is worth understanding why USB booting matters.

Traditionally, Raspberry Pi devices boot from a microSD card. While SD cards are convenient and cheap, they are not always the best choice for performance or reliability. Over time, frequent read/write operations can wear them out, especially in workloads like:

By contrast, USB SSDs and even some high-quality USB flash drives often provide:

On Raspberry Pi 5, USB boot is well supported, making it a practical and attractive option for many projects.

What You Need Before You Start

To configure USB boot on a Raspberry Pi 5, you should have the following:

It is also important to make sure your Raspberry Pi 5 is running the latest firmware and software updates before changing the boot configuration.

Step 1: Update the Raspberry Pi 5 Firmware and System

The first thing you should do is update your system. USB boot behavior depends partly on the bootloader firmware, so keeping everything current helps avoid compatibility issues.

Open a terminal on your Raspberry Pi and run:

sudo apt update
sudo apt full-upgrade


Once the update is complete, reboot the system:

sudo reboot


Updating ensures you have the latest kernel, packages, and bootloader-related tools. This is especially important if your Raspberry Pi OS image was installed some time ago.

Step 2: Understand the Difference Between config.txt and Bootloader Settings

A common point of confusion is the difference between the boot partition configuration file and the EEPROM bootloader configuration.

On Raspberry Pi systems, two different configuration areas affect booting:

1. config.txt

This file is stored on the boot partition and controls hardware and startup behavior such as:

You can edit it with:

sudo nano /boot/config.txt


On some modern Raspberry Pi OS installations, the path may also appear as:

sudo nano /boot/firmware/config.txt


This file is important, but USB boot order is not primarily controlled here.

2. EEPROM Bootloader Configuration

The actual device boot sequence, including whether the Pi tries USB first or SD first, is controlled by the Raspberry Pi bootloader stored in EEPROM.

This is where the BOOT_ORDER setting comes in.

So if your goal is specifically to make Raspberry Pi 5 boot from USB, the most important change is usually in the EEPROM bootloader configuration, not only in config.txt.

Step 3: Access the Boot Configuration File

Even though config.txt does not directly define USB boot order, you may still want to review or edit it if your system needs custom settings for displays, overlays, power behavior, or other startup options.

Editing on the Raspberry Pi Itself

Open Terminal and run:

sudo nano /boot/config.txt


If that path does not exist on your system, try:

sudo nano /boot/firmware/config.txt


After making changes, save the file and reboot for the settings to take effect.

Editing from Another Computer

If you are using a microSD card and prefer editing files externally:

  1. Power off the Raspberry Pi.
  2. Remove the microSD card.
  3. Insert it into another computer.
  4. Open the boot partition.
  5. Edit config.txt in a text editor.

This can be useful when the Pi is not booting properly and you need offline access to boot settings.

Step 4: Enable USB Boot Using Raspberry Pi Configuration Tools

The easiest way to enable USB boot is through the Raspberry Pi configuration utility.

Run:

sudo raspi-config


Then navigate to:

Advanced Options > Boot Order > USB Boot

Choose the USB boot option and confirm the change.

This method is beginner-friendly because it updates the bootloader configuration without requiring manual editing.

After saving the changes, reboot your Raspberry Pi:

sudo reboot


For many users, this is the quickest and safest way to switch the system to USB boot mode.

Step 5: Manually Edit the EEPROM Bootloader Configuration

If you want more control or prefer working directly with configuration values, you can manually edit the EEPROM bootloader settings.

Run the following command:

sudo -E rpi-eeprom-config --edit


This opens the bootloader configuration in an editor.

Look for a line similar to this:

BOOT_ORDER=0xf41


If it is not present, you can add it.

What Does BOOT_ORDER=0xf41 Mean?

The BOOT_ORDER value tells the Raspberry Pi 5 the sequence of boot devices it should try.

In this value:

So 0xf41 means the Raspberry Pi will generally attempt boot methods in an order that includes USB first, then SD card, while still allowing fallback behavior.

This is a popular setting because it gives you the convenience of USB boot while still letting the Pi fall back to the SD card if needed.

After editing the file, save it and exit. Then reboot:

sudo reboot


Step 6: Verify the Bootloader Configuration

After rebooting, it is a good idea to confirm that the bootloader settings were applied correctly.

Run:

vcgencmd bootloader_config


This command displays the current bootloader configuration.

Look through the output for the BOOT_ORDER line. If you configured USB boot correctly, you should see something like:

BOOT_ORDER=0xf41


If the value does not match your intended configuration, revisit the EEPROM settings and apply the change again.

Verification is important because sometimes users think they changed the boot order, but the previous setting is still active.

Step 7: Prepare a USB Drive for Booting

Once the Raspberry Pi 5 is configured to allow USB boot, the next step is to make sure the USB drive itself contains a bootable operating system.

There are two main ways to do this.

Option 1: Use Raspberry Pi Imager

This is the easiest method.

  1. Download and open Raspberry Pi Imager.
  2. Select the operating system you want to install.
  3. Choose your USB SSD or flash drive as the target.
  4. Write the image.
  5. Safely eject the drive.

This produces a clean installation and is the recommended approach for most users.

Option 2: Clone an Existing SD Card Installation

If you already have a working system on a microSD card and want to move it to USB, you can clone it.

For example:

sudo dd if=/dev/mmcblk0 of=/dev/sda bs=4M status=progress


In this example:

Be extremely careful with device names, because writing to the wrong device can destroy data.

This method copies the entire contents of the SD card to the USB drive. It is useful if you want to preserve your existing setup, installed packages, and user files.

Step 8: Test Booting from the USB Drive

After the USB drive is prepared and the boot order is configured, you are ready to test.

Follow these steps:

  1. Shut down the Raspberry Pi.
  2. Remove the microSD card, if you want to confirm true USB-only boot.
  3. Connect the USB drive to one of the Raspberry Pi’s USB ports.
  4. Power the Raspberry Pi back on.

If everything is configured correctly, the system should boot directly from the USB drive.

You may notice faster boot times and improved desktop responsiveness, especially if you are using an SSD instead of a flash drive.

Best Practices for Reliable USB Boot

To make your USB boot setup more stable, here are a few practical tips.

Use a Good Power Supply

External SSDs may draw more power than a microSD card. An underpowered system can cause boot failures or intermittent drive detection problems. The official Raspberry Pi power supply is strongly recommended.

Prefer SSDs Over Cheap Flash Drives

While USB flash drives can work, SSDs are typically more reliable and significantly faster. For long-term projects, an SSD is the better choice.

Use Quality USB Adapters or Enclosures

If you are connecting a SATA or NVMe SSD through USB, the adapter chipset matters. Some cheap adapters cause compatibility issues.

Keep Firmware Updated

New firmware versions often improve device compatibility and boot behavior. Periodically update your Raspberry Pi OS and EEPROM tools.

Make Backups

Before changing boot settings or cloning drives, back up important data. A small mistake with disk paths can overwrite the wrong device.

Troubleshooting Raspberry Pi 5 USB Boot Problems

If the Raspberry Pi 5 does not boot from USB, do not panic. Most issues can be resolved with a few checks.

Problem 1: Stuck on the Boot Screen

If the Pi powers on but never loads the OS, the first thing to check is the boot order.

Run:

vcgencmd bootloader_config


Make sure BOOT_ORDER includes USB boot.

You should also confirm that the USB drive has a valid bootable Raspberry Pi OS installation.

Problem 2: USB Drive Not Detected

Some external drives need more power than the Pi can provide reliably through USB alone.

Possible solutions:

Problem 3: Corrupted or Incomplete OS Installation

If the USB drive was not imaged correctly, the Pi may not boot.

In this case, re-flash the USB drive with Raspberry Pi Imager and try again.

Problem 4: Wrong Device Path During Cloning

If you used dd and accidentally copied to the wrong device or used the wrong target path, the resulting USB drive may not be bootable.

Double-check storage device names with:

lsblk


before running cloning commands.

Problem 5: USB Boot Works Only with the SD Card Inserted

This usually means the system is still depending on files or settings from the SD card, or the USB installation is incomplete.

Remove the SD card and verify that the USB drive contains a full bootable system.

Problem 6: Need More Diagnostics

To inspect USB-related events, use:

dmesg | grep -i usb


This can help you determine whether the drive is being detected at all.

When Should You Still Use an SD Card?

USB boot is powerful, but SD cards still have a place.

A microSD card may remain useful if:

Many advanced users actually keep both options: USB as the main boot device, and SD as an emergency recovery tool.

Final Thoughts

USB boot on the Raspberry Pi 5 is one of the most useful features for users who want better speed, storage capacity, and long-term reliability. While the process involves a few moving parts, it is actually quite manageable once you understand the difference between config.txt and the EEPROM bootloader settings.

To summarize, the key steps are:

Once configured properly, your Raspberry Pi 5 can boot directly from a USB SSD or flash drive with excellent results. For users running more serious workloads, this is often a major upgrade over traditional SD card booting.

If you are building a home lab, media server, retro gaming setup, coding environment, or always-on automation system, switching to USB boot can make your Raspberry Pi 5 faster, more stable, and more enjoyable to use.

Like

Discussions