It is possible on modern Raspberry Pis to boot from USB. To enable this you need to do both firmware updates and firmware configuration changes.
The basic flow is:
- On an updated Raspberry Pi OS
Generally always good to start from an up-to-date system & tool best before doing anything like this. - Update the Raspberry Pi Firmware
- Set the OTP bit needed to enable USB booting / making SD card optional
There are a couple different ways of coming at doing this. Recommend doing your own research and searches to ensure you are doing steps relevant to your goals & hardware. Here are a few resources that might help:
- https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb
- https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#bootloader-updates
- https://www.zdnet.com/article/booting-my-raspberry-pi-4-from-a-usb-device/
Detailed instructions / steps
I added a bunch of steps in there that are not needed on a recent Raspberry Pi, but doing won't hurt and ensures you are working with the latest OS tools and firmware versions before doing the actual step of twiddling the OTP bit needed to be twiddled to enable this.
-
Boot up from a working image (T3 image)
-
Update the OS on the image:
sudo apt update && sudo apt upgrade -y
-
Install/update rpi-update tool
sudo apt install rpi-update
-
Run update
sudo rpi-update
-
Reboot into the updated firmware
sudo reboot
-
Use raspi-config to update bootloader
sudo raspi-config
Advanced Options -> Bootloader Version -> Select Default or Latest
7. Reboot
sudo reboot
- Set the USB host boot mode bit in the OTP memory. this makes SD card not required
WARNING: On the Raspberry Pi 3A+ setting the OTP bit to enable USB host boot mode will permanently prevent that Raspberry Pi from booting in USB device mode.
See this ycombinator discussion on this warning
So make sure you know what device you have an if it is compatible before doing this
echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
That adds program_usb_boot_mode=1
to the end of /boot/config.txt
.
-
Reboot
sudo reboot
-
Shutdown fully, remove SD card, plug in a bootable USB drive.
Enjoy booting from USB drive hopefully.