Skip to content

Instantly share code, notes, and snippets.

@0x7d7b
Last active November 28, 2021 10:16
Show Gist options
  • Save 0x7d7b/97b5358d302aa1dcdfa66cc903515062 to your computer and use it in GitHub Desktop.
Save 0x7d7b/97b5358d302aa1dcdfa66cc903515062 to your computer and use it in GitHub Desktop.
Raspberry Pi Boot from USB

For my recend DIY project I had to configure my Raspberry Pi (3 Model B+) to boot from a USB stick. Here are the configuration instructions.

Configuration

Open the /boot/config.txt file in a text editor. This is the file on the currently used SD card. Add the following two lines:

program_usb_boot_mode=1
program_usb_boot_timeout=1

This enables boot via USB and extends the timeout to wait a little longer for the USB device.

Reboot

In order to activate that configuration reboot the system once with the old SD card.

Verify

After the reboot was successful verify that the USB device boot mode has been enabled successfully:

$ vcgencmd otp_dump | grep 17:
17:3020000a

0x3020000a must be shown.

Reboot from USB

Now shut down, remove the SD card. Add a prepared USB stick and boot again. The system should be booted from USB stick, now.

USB Stick

Known Issues

  • Booting from USB takes a little longer. It does not boot immediately. Just wait a few seconds.
  • Currently only USB 2.0 is supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment