Low Orbit Flux Logo 2 D

Raspberry Pi - How To Boot from USB

USB boot is for these models only: Raspberry Pi 2B v1.2, 3A+, 3B, 3B+, and 4B. It allows you to boot from a flash drive or a USB hard disk.

WARNING - Some people have reported having issues even after putting their SD card back into the system. Follow all of these steps at your own risk.

How to Boot Raspberry Pi 4 from USB

You are going to need to install the latest bootloader EEPROM image and change some of the boot settings so you will need to boot from an SD card first before you can enable booting from a USB device. You can upgrade your EEPROM with a special image that can be written to an SD card but we are going to do this from within Raspberry Pi OS instead since we need to make changes to the boot settings anyways.

Upgrade the system:

sudo apt update 
sudo apt full-upgrade 

Upgrade the kernel and firmware ( might not need this and it could be dangerous because it is pre-release):

sudo rpi-update


sudo reboot

Install the latest bootloader EEPROM image:

sudo rpi-eeprom-update -d -a


sudo reboot

Start raspi-config

sudo raspi-config

Select the following:

Do the following

You should be all set. Your system should boot from the USB Drive.

Raspberry Pi 2B v1.2, 3A+, 3B, Compute Module 3

You need “to set the USB host boot mode bit in the one-time programmable (OTP) memory”

You will need to boot into Raspberry Pi OS first.

Check if this bit is currently set:

vcgencmd otp_dump | grep 17:

You will see this if it is set:


If it isn’t, run this to set it in a config file on your SD card:

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

Reboot to pick up the change from the SD card:

sudo reboot

Check again:

vcgencmd otp_dump | grep 17:

You should see this:


NOTE - Once the SD card has this setting, it can be used to set this bit in OTP memory on other Raspberry Pi systems that boot from the same card.

NOTE - Any change you make to the OTP is permanent and cannot be undone.

On the Raspberry Pi 3A+, setting the OTP bit to enable USB host boot mode will permanently prevent that Pi from booting in USB device mode.

Raspberry Pi 3B+, Compute Module 3+

These shouldn’t require any changes to be made. Just insert your USB device and make sure that no SD card is inserted ( these boot first ).

You can write an OS image to a USB device the same way that you write it to an SD card.

Special bootcode.bin-only Boot Mode

There is another method of getting a Raspberry Pi to boot from USB. You can first boot from an SD card with a special binary file which will then boot from a USB device. This does not work for the Raspberry Pi 4 B. It should probably work on all other Raspberry Pi models.

Known issues (not Pi 4)