With the latest version of Raspbian you can just write an image directly to a USB drive and it will boot on a Pi 3B+ (or 3B that has had the USB boot OTP bit programmed).
First a few disclaimers:
- USB boot without an SD card is not compatible with all USB storage devices (it may not be possible with some devices).
- Writing an image to your USB drive will erase everything previously on it (backup important data).
And a few notes:
- These instructions assume you have a keyboard, mouse and screen connected to your Raspberry Pi computer.
- USB boot is only compatible with the Raspberry Pi 3B and 3B+ (may also work on the Pi 2B v1.2, but not v1.1).
- For the Raspberry Pi model 3B you need to set a One Time Programmable bit to enable USB boot mode (see below).
- The USB boot OTP bit is already set from the factory on the newer 3B+ model.
- Booting from a hard drive or SSD requires a good power supply (not a phone charger).
Now that that's out of the way:
- Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
- Grab the Etcher software from https://etcher.io/
- Use Etcher to write the Raspbian image to your USB drive (directly from the .zip download).
- You don't need to extract the image or format the drive prior to writing.
- Just run Etcher, choose the Raspbian .zip you downloaded, pick your USB drive and write.
- You may need to enable "Unsafe mode" in settings to see large USB drives.
- If you have trouble, verify the SHA256 checksum of the download.
- Once Etcher has successfully written and verified the image, it will safely eject the USB drive.
- Remove the USB drive from your PC and use it to boot the Pi (with no SD card inserted).
- Make sure your Pi3B(+) computer is off and the power is unplugged.
- Remove any SD cards or other USB storage devices from the Pi computer.
- Connect your imaged USB drive to the Pi computer (if it's a self-powered drive, turn it on).
- Plug the power back into your Pi and it should boot from the USB drive (after a short timeout).
If it does not boot, watch and make note of what the power and activity LED lights do (on or off, blinking in a pattern or random).
Things to try if it doesn't boot:
Format an SD card with the FAT32 file system and copy just the bootcode.bin file from the small FAT32 "boot" partition of the Raspbian imaged USB drive to the SD card. Insert that SD card into your Pi and boot it with the USB drive connected (it should boot from the USB drive). You can also download bootcode.bin here (
bootcode.bin). This is also how you USB boot from an older model Raspberry Pi (1B+ or 2Bv1.1).
If it still doesn't boot, power everything down and make a file named "timeout" on the bootcode.bin only SD card, then try again.
If it still does not boot, your device is probably not compatible with USB boot mode, but copying the entire contents of the USB drive "boot" partition to the SD card could get it working. If that works, you should edit /etc/fstab to mount the SD card as /boot to ensure that kernel and firmware updates are properly applied.
If it DOES boot when using bootcode.bin only (especially with the timeout file), then you may be able to get it working by setting another OTP bit that increases the wait time for the USB drive to become ready from the default 2 seconds to 5 seconds (this is a permanent change). To enable the additional wait time for USB drives, add "program_usb_boot_timeout=1" to config.txt on a Raspbian SD card and boot it once in the system. After that the system will wait up to 5 seconds for USB drives to become ready.
USB boot OTP bit:
To enable booting from USB on the Raspberry Pi 3B (and possibly the Pi 2B v1.2) add "program_usb_boot_mode=1" to config.txt on a Raspbian SD card and boot it in the system once. After that USB boot mode will be permanently enabled and you can boot from a compatible USB drive with no SD card (or a non-boot SD card). Note that enabling USB boot does not affect SD card booting (the system checks for a boot SD card before looking for a boot USB drive, so SD card booting has priority).
To check if the USB boot bit has been set, enter the following command into a terminal.
You should see the output,
17:3020000a (if there is a 1 where the 3 is, USB boot is not enabled). And once again, this does not need to be done on the newer 3B+ (it's already enabled by default).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?