0
0
Iot-protocolsHow-ToBeginner · 4 min read

How to Boot Raspberry Pi from USB: Step-by-Step Guide

To boot a Raspberry Pi from USB, first enable USB boot mode by updating the bootloader on supported models. Then, prepare a USB drive with the Raspberry Pi OS image and connect it to the Pi; it will boot from USB instead of the SD card.
📐

Syntax

Booting Raspberry Pi from USB involves these main steps:

  • Update bootloader: Enable USB boot mode on the Pi.
  • Prepare USB drive: Flash Raspberry Pi OS onto a USB device.
  • Boot from USB: Connect USB and power on the Pi.

Each step is essential to switch the boot device from SD card to USB.

bash
sudo apt update && sudo apt full-upgrade -y
sudo rpi-eeprom-update -d -a
sudo reboot
Output
Reading package lists... Done Building dependency tree... Done Calculating upgrade... Done The following packages will be upgraded: raspberrypi-bootloader raspberrypi-kernel 0 upgraded, 0 newly installed, 2 to upgrade. Get:1 http://archive.raspberrypi.org/debian bullseye/main armhf raspberrypi-bootloader armhf 1.20230315-1 [3,000 kB] Get:2 http://archive.raspberrypi.org/debian bullseye/main armhf raspberrypi-kernel armhf 1.20230315-1 [15.0 MB] Fetched 18.0 MB in 10s (1,800 kB/s) Reading changelogs... (Reading database ... 123456 files and directories currently installed.) Preparing to unpack .../raspberrypi-bootloader_1.20230315-1_armhf.deb ... Unpacking raspberrypi-bootloader (1.20230315-1) over (1.20230101-1) ... Preparing to unpack .../raspberrypi-kernel_1.20230315-1_armhf.deb ... Unpacking raspberrypi-kernel (1.20230315-1) over (1.20230101-1) ... Setting up raspberrypi-bootloader (1.20230315-1) ... Setting up raspberrypi-kernel (1.20230315-1) ... *** Updating EEPROM BOOTLOADER: up-to-date *** Update complete
💻

Example

This example shows how to prepare a USB drive with Raspberry Pi OS and boot from it.

First, download Raspberry Pi Imager from the official site and use it to flash the OS onto your USB drive. Then, connect the USB drive to your Raspberry Pi and power it on. The Pi will boot from the USB device if USB boot mode is enabled.

iot_protocols
1. Download Raspberry Pi Imager from https://www.raspberrypi.com/software/
2. Insert USB drive into your computer.
3. Open Raspberry Pi Imager.
4. Select Raspberry Pi OS (32-bit) as OS.
5. Select your USB drive as storage.
6. Click 'Write' and wait for completion.
7. Insert USB drive into Raspberry Pi.
8. Power on the Raspberry Pi.
Output
No command output; the Raspberry Pi boots from USB and shows the OS desktop or terminal.
⚠️

Common Pitfalls

Common mistakes when booting Raspberry Pi from USB include:

  • Not updating the bootloader to enable USB boot mode.
  • Using an unsupported USB drive or hub that causes boot failure.
  • Not properly flashing the Raspberry Pi OS image to the USB device.
  • Trying to boot from USB on unsupported Raspberry Pi models.

Always check your Raspberry Pi model supports USB boot and update the bootloader first.

bash
Wrong way:
# Trying to boot from USB without updating bootloader
# Result: Raspberry Pi boots from SD card or fails

Right way:
sudo apt update && sudo apt full-upgrade -y
sudo rpi-eeprom-update -d -a
sudo reboot
# Then flash OS to USB and boot
📊

Quick Reference

StepDescription
1Update Raspberry Pi bootloader to enable USB boot mode
2Download and flash Raspberry Pi OS to USB drive
3Connect USB drive to Raspberry Pi
4Power on Raspberry Pi; it boots from USB if enabled
5Troubleshoot if boot fails (check USB compatibility and bootloader)

Key Takeaways

Update your Raspberry Pi bootloader to enable USB boot mode before using USB boot.
Use Raspberry Pi Imager to flash the OS image correctly onto your USB drive.
Only Raspberry Pi models with USB boot support can boot from USB without SD card.
Choose a compatible USB drive to avoid boot failures.
If booting fails, verify bootloader version and USB device preparation.