Boot from a USB hard drive or memory stick
This
tutorial explains how to boot your Raspberry Pi 3 from a USB mass
storage device such as a flash drive or USB hard disk. Be warned that
this feature is experimental and may not work with all USB mass
storage devices. This
is classed as an experimental feature as there is a tiny risk of
bricking the PI, but I have not seen any reports of this. However,
you do this entirely at your own risk and Raspberry will not honour
the warranty if you do this.
Program USB Boot Mode
Before
a Pi will boot from USB, it needs to have a configuration change to
enable USB boot mode. Enabling this configuration option
changes
the one-time programmable memory and will enable USB booting for any
USB device or operating system. USB boot will take a few seconds
longer, but gives better reliability and slightly better performance,
though even with an SSD it is still limited by the USB2 port speed.
Go
to the Downloads
page and
install Raspbian onto an SD card using Win32DiskImager if
you are on Windows, or dd if
you are on Linux/Mac. Boot the Pi. Alternatively
make a NOOBS SD card as described elsewhere.
First,
prepare the /boot directory
with experimental boot files:
#
if you are using Raspbian lite you will need to install rpi-update
before you can use it
sudo
apt-get update
sudo
apt-get install rpi-update
sudo
BRANCH=next rpi-update
#
if you are using NOOBS or full Rasbian just
sudo
apt-get update
Then
enable USB boot mode with this code:
sudo
nano /boot/config.txt
add the following line to this file
program_usb_boot_mode=1
Press ctrl+x, y to save and exit
This
adds program_usb_boot_mode=1 to
the end of /boot/config.txt
Reboot
the Pi with sudo
reboot
then
check that the OTP has been programmed with:
vcgencmd otp_dump | grep 17:17:3020000a
Ensure
the output 0x3020000a is
correct. It
will not work otherwise so check your code.
If
you wish, you can remove the program_usb_boot_mode line
from config.txt (make sure there is no blank line at the end) so that
if you put the SD card in another Pi, it won't program USB boot mode.
You can do this with sudo
nano /boot/config.txt,
for example.
Prepare the USB storage device
Now
that your Pi is USB boot-enabled, we can prepare a USB storage device
to boot from.
Connect
your USB drive or memory stick to a laptop or PC. Format it to FAT32.
Copy all of the NOOBS files to it, or install Raspbian from an .iso
image to it.
Remove
the SD card from the Pi and attach your USB drive/memory stick. Boot
up and all should be well.
If
you want to try out new operating systems you can still boot from SD
cards as before.