Ensure USB Boot OTP is set
To enable the USB boot bit, the Raspberry Pi 3 needs to be booted from an SD card with a config option to enable USB boot mode. Once this bit has been set, the SD card is no longer required. Note that any change you make to the OTP is permanent and cannot be undone.
You can use any SD card running Raspbian or Raspbian Lite to program the OTP bit. First, prepare the /boot directory with up to date boot files:-
sudo apt update && sudo apt upgrade && sudo reboot
Then enable USB boot mode with this code:-
echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
This adds program_usb_boot_mode=1 to the end of /boot/config.txt. Reboot the Raspberry Pi with:-
sudo reboot
Then check that the OTP has been programmed with:-
vcgencmd otp_dump | grep 17:
Check that the output 17:3020000a is shown. If it is not, then the OTP bit has not been successfully programmed. In this case, go through the programming procedure again. If the bit is still not set, this may indicate a fault in the Pi hardware itself.
If you wish, you can remove the ‘program_usb_boot_mode’ line from config.txt, so that if you put the SD card in another Raspberry Pi, it won’t program USB boot mode. Make sure there is no blank line at the end of config.txt. You can edit config.txt using the nano editor using the command:-
sudo nano /boot/config.txt # then scroll all the way to the bottom
Ensure Pi waits for USB to initialise
There are two different things which go by the same name program_usb_boot_timeout
(previously called program_usb_timeout
): the OTP bit and the corresponding parameter in config.txt
. The latter is used to set the former (by booting from SD card), but once the OTP bit is set, there is no need for the SD card anymore. And just in case it’s not clear, OTP is a kind of flash memory, so its content is persistent across reboots.
So the full procedure goes like this:
- prepare a bootable SD card and boot from it
- run
sudo BRANCH=next rpi-update
- add
program_usb_boot_timeout=1
to yourconfig.txt
- reboot (this is the moment OTP bit will be programmed)
- power off, remove the SD card and plug USB device
- power on.