How to boot a Raspberry pi 3B from USB?

Raspberry Pi 3 B with a USB drive

Currently, eThe most recent Raspberry model is the 5 and which has a large number of pretty good features for its small size. In addition to that, Its Raspberry OS distribution has also evolved quite well.

In the case of this article, which is focused on an old model which is 3B, I must say that I have made the decision to share this small, but useful information that is not out of place for those who still have this model, which is not insignificant for the different projects or tasks that one can imagine with an RPi as the centerpiece.

In my case, I had not touched my RPi 3B for quite a few months. and the last time I used it I had it as a retro console with RecalBox (which, by the way, has already been updated quite a bit and has several very good functions), which for the sake of giving me a little space of time and want to play some retro titles, dust it off, but I ran into several problems:

  • The first of them was that the system was already outdated and when I connected it to the network and tried to update it gave me more problems than hours of play.
  • The second problem I encountered was that the microSD card I had was already defective and therefore I found it necessary to replace it.
  • The third problem is that I did not have a decent microSD available and among my can of memories the USBs looked good for the space issue.

At those moments I remembered that I had no possibility to start my RPi from USB, or rather, I had incorrect information Or I don't know when Raspberry started enabling this possibility for this model and previous ones, since for newer models things are different and it's simpler. With this willingness to not ruin a day planned for video games, it took me the task of doing a little research and as I mentioned, I don't know if until that moment I was misinformed or RPi at some point enabled this.

Ya With the correct information, I set out to make the necessary changes for my Raspberry 3B to boot from USB, and for this The first requirement is to have Raspbian installed on our microSD, whether the version with desktop environment or the lite version, either works and in theory you can enable USB boot from any other system that allows you to execute commands.

Here it is a personal decision if you want to download extra MB or go for a simple version, since the system on a microSD is only necessary to enable the USB boot bit and from then on it is no longer necessary to use the microSD. For this You can use the “Raspberry Pi Imager” tool to download and burn the system to your microSD. Before going on to explain the process, you should know that the change you are about to make to your RPi is irreversible, but it is nothing that will affect the operation of your RPi.

Once the system has been recorded, You must insert the microSD into your Raspberry, connect the power outlet to it and a keyboard (since you must execute some commands), the mouse is optional. Once the system has started, you must open a terminal and run update commands. This in order to avoid any problem:

sudo apt update

sudo apt upgrade

sudo reboot

Done this and already inside the system again, What you should do is open a terminal again and run the following command to add a line to the “config.txt” file:

sudo nano /boot/firmware/config.txt

Inside the file You are going to add the following line to the end of the file:

program_usb_boot_mode=1

You save with Ctrl+O, close with Ctrl+X and proceed to restart one last time the system (if you did everything right). Being back inside the system, It's time to check if the USB boot bit was enabled and to do this in a terminal we must execute the following command:

vcgencmd otp_dump | grep 17:

When running will show you a way out and if everything went well this should be:

17 como 3020000a

If not, you will need to repeat the programming procedure. If the bit is still not set, it could indicate a problem with the Raspberry Pi hardware.

If everything went well, you can now boot any system from any USB port on your RPi and even use an external SSD to run your OS and notice the difference.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.