Boot Raspberry Pi from USB

Boot Raspberry Pi from USB

0 comments

In this blog, we will learn how to boot Raspberry Pi from USB. We will be showing how to change configurations in Raspberry Pi to boot from the flash drive or USB hard disk.

We will go step by step to activate the USB boot mode and this will work with Raspberry Pi 4B/3B/3B+/3A+ and 2B only. The Raspberry Pi USB boot mode is sometimes required when you don’t want to microSD cards and this can be used in your projects where you need more space or memory.

What you need:
Raspberry Pi USB boot mode settings

1.  First of all, you will need a MicroSD card preloaded with Raspbian.
2. Power on the Raspberry Pi and the Pi will start to boot in the Raspbian operating system.

Boot Raspberry Pi

Now we have to update the Raspberry Pi using the following commands:

    sudo apt-get update
    sudo apt-get upgrade
    3. When the Raspberry Pi is up to date, we have to write the following commands to change the boot configuration.
    echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt

     This will add program_usb_boot_mode=1 to the end of the config.txt file.

    4. Reboot the Raspberry Pi using the command:

    sudo reboot

    5. After rebooting, we have to check that the OTP has been written successfully by using the following command:

    vcgencmd otp_dump | grep 17:

     if everything was done properly, you will see the output:

    17:3020000a

    If it is not, then the OTP bit has not been successfully programmed. In this case, repeat the same process again. If still bit is not set, then may there is a fault in the Raspberry Pi hardware.

    Note: If you wish to remove the program_usb_boot_mode line from the ‘config.txt’ file, so that if you put the SD card in another Raspberry Pi, it won’t program other Raspberry Pi in USB boot mode.

    Prepare the USB storage device for Raspberry Pi and Booting from USB
    1. Now connect the USB device into your computer and install a Raspbian OS to a USB mass storage device by copying the operating system directly to your USB device, as we do for a microSD card.
    2. Once the Raspbian imaging is finished, remove the USB device from your computer and insert it into your Raspberry Pi
    3. Now you are able to start your Raspberry Pi without microSD card.
    Note: The USB booting process will take 10-20 seconds to start the Raspberry Pi.

    Micro:bit Programming via Raspberry Pi 4 using Raspbian Buster

    DIY Chromecast alternative using Raspberry Pi

    Leave a comment

    Please note, comments need to be approved before they are published.