Dec 25, 2018

How to Boot From a USB Mass Storage Device,
On A Raspberry Pi 3

no sd card

Running Raspbian Stretch from USB is much faster than the sd card if you want to install RetroArch on the Raspberry Pi together with various emulator cores. I will show you how to boot from a USB Flash Drive or USB Hard Drive without using an SD card in the Raspberry Pi 3. An easy-to-use script that installs all essential packages for retro gaming on the Raspberry.

This will only work with Raspberry Pi 3, 3B+, 3A+ and Raspberry Pi 2B v1.2 models only. With this method we will have to flash the SD card with the latest Raspbian Stretch, we'll have to boot it on your Raspberry Pi 3 and flash the programmable memory chip of the Raspberry Pi. This method it's very easy to do. I recommend a powered USB hard drive, USB flash drive or SSD drive. Be warned that this feature is experimental and does not work with all USB mass storage devices.

  • Let's start – You're going to grab Etcher and instaled on your Mac.


  • Open freshly installed Etcher

  • etcher 01
  • Select raspbian stretch.img

  • finder
  • Select our SD card

  • etcher 02 etcher 03


    If you don't see you hard drive or USB Drive listed here when you try to flash, go to the settings icon and use "Unsafe mode" Be careful when using this mode. You could flash your internal hard drive. Make sure you know what drive you flashing
  • Select Flash

  • etcher 04
  • Wait For flashing to complete

  • etcher 05
  • Wait for validating to finish

  • etcher 06

    Also you need flash our hard drive, same way you just flash SD card with raspbian stretch.img. You will need repeat all steps and select USB Hard Drive

    Make sure to select right disk, and click flash button

    etcher 07

    I will explain evrithing we need to get usb boot mode up and running. Before a Raspberry Pi 3 will boot from a mass storage device, it needs to be booted from an SD card with a config option to enable USB boot mode. We need to flash the one time programmable memory on Raspberry Pi. Now we are going to move over to the Raspberry Pi. Turn on your Pi with SD card conected. When the Pi boots up the stretch desktop open a terminal window.

    Then enable USB boot mode with this code

    • First, prepare the /boot directory with up to date boot files
    • $ sudo apt-get update && sudo apt-get upgrade
    • 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:
    • 17:3020000a

    Now we can take our SD card out, and connect a freshly flashed USB hard drive to the Pi and boot it up. On the first boot the pi tries detecting a USB hard drive, it is a bit longer compared to booting from a SD card. On frist boot with the USB hard drive the pi is going automatically expand the file system and then boot in to Raspbian Stretch Desktop, with no SD card We're now running the Raspbian Stretch operanting sytem from the USB hard drive