The new Raspberry Pi 4 bootloader has finally come out of beta and made it’s way into the official latest Raspbian! This has been long awaited since when the Raspberry Pi 4 was released it had no native support for booting from USB / Network but it was promised right from the start it would get it through a later update.
This guide will show how to configure the new bootloader and set up your Pi to boot from USB devices as well as the other boot options now available within the Raspberry Pi 4 bootloader.
If you are looking to use USB booting with Ubuntu you should check out my guide specifically for Ubuntu here.
If you are using the CM4 check out my guide for the Compute Module 4 here
Equipment Used
NVMe (High Performance) Option:
The Samsung 980 Pro (NVMe) is a professional grade SSD and one of the fastest in the world. The Samsung NVMe drives have been at the top of this category for a long time and are well trusted for both their performance and reliability / long life.
Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*
The ICY BOX is basically a giant heatsink that you mount a high performance M.2 NVMe drive inside of. This enclosure is really fast but requires a powered USB hub. Not even the 3.5A adapter can reliably power it! The enclosure works well and will physically feel warm to the touch as it is pulling the heat off your NVMe drive!
Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*
2.5″ SATA Option:
The Kingston A400 has been a great drive to use with the Pi for years. It’s reliable, widely available around the world, has low power requirements and performs very well. It’s also very affordable. This drive has been benchmarked over 1000 times at pibenchmarks.com and is the #1 most popular SSD among the Pi community!
Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*
The USB 3.1 variant of the StarTech 2.5″ SATA adapter works well with the Pi 4. The USB 3.0 variant doesn’t have firmware updates available and is not recommended.
Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*
SD card option:
The SanDisk Extreme A1-A2 SD card has the best scoring SD card on pibenchmarks.com for years and is second in popularity only to the SanDisk Ultra (often included in combo kits). The application class (A1) means random I/O speeds (very important when running an OS) have to meet a higher standard. There’s no benefit on the Pi for A2 right now so get whichever is cheaper/available.
Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*
You may use other types of drives with the Pi such as M.2 SATA to USB 3.0 and m-SATA to USB 3.0. Here’s some adapters I’ve used for those types of drives:
The UGREEN M+B enclosure is a great enclosure for the Pi for M.2 SATA 2280 NGFF drives. It supports both B-key and M-key drives. Does not support newer NVMe drives. As with other types of enclosures it requires more power than other options!
Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*
The VL716 mSATA enclosure lets you connect micro SATA drives to the Pi. These drives are an older type of SSD (usually seen in laptops) predating the M.2 slot but are still widely available and perform extremely well!
Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.se*, Amazon.sg*
Another option for M.2 SATA (not NVMe) is to use the Argon One Pi case:
The Argon ONE M.2 is a M.2 SATA Pi 4 case / storage solution. With the case and M.2 SATA expansion board you can completely enclosure your Pi 4 and have a built in M.2 slot! The M.2 SATA board is sometimes sold separately from the case itself and can be used as well. Does not support NVMe, this is for SATA M.2 drives only!
Links: AliExpress*, Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*
Power Requirements
Power can be a serious problem with these drives. We are learning from the comments that you are especially likely to run into power issues with NVMe enclosures. A powered USB hub or a power adapter that puts out 3.5A comes not only just strongly recommended, it may actually be required that you choose one option or the other for your drive to function.
The specific requirements of how much power you’ll need depend on the adapter/enclosure and the model of your drive itself. As a very rough guideline, older models of drives tend to use more power than newer models of drives. 3.5″ form factor drives also use more power than 2.5″ drives. The earliest SSD models like first and second generation models are also well understood to use significantly more power than newer models. This is due to changes and improvements in technology over the years and even using different more efficient memory like 3D NAND. Some super high end performance drives will consume more power as well.
Here’s the current recommendations based on everyone’s comments combined with stuff I’ve personally used with the Pi:
The CanaKit 3.5A adapter has an extra half an amp (500 mA) of capacity to give some breathing room to your accessories. This is bigger than the official Pi power supply which provides 3.0A.
Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.sg*
The Sabrent powered USB hub delivers a whopping 2.5A of dedicated power for your USB attached devices. This is almost as much as the Pi adapter itself is rated for (3.0A). It will easily power the most thirsty of setups such as NVMe enclosures.
Links: Amazon.com*, Amazon.ca*, Amazon.com.au*, Amazon.co.uk*, Amazon.es*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*
Note: Make sure Amazon doesn’t try to take you to the non-powered version and that it’s the one with the AC adapter that plugs in to provide extra power
Known Working Adapters
This is a compiled list of known working adapters built by myself from adapters I’ve purchased and commenters from ones they have purchased in this article and my older guide that utilized a SD card for USB booting.
StarTech 2.5″ SATA to USB 3.1 Adapter* | 2.5″ SATA to USB 3.1 | Verified working in comments (thanks Fredrick) |
StarTech 2.5″ SATA to USB 3.0 Adapter* | 2.5″ SATA to USB 3.0 | Verified working great by myself and others on Pi 4 |
Inateck FE2004 2.5″ SATA to USB 3.0 Hard Drive Enclosure* | 2.5″ SATA to USB 3.0 | Mirco reports that this enclosure is working but trim is not supported |
Samsung 2.5″ SATA to USB 850 EVO Kit /w Adapter* (Alternate amazon.de link*) | 2.5″ SATA to USB 3.0 Kit | This is a kit that comes with a drive and adapter. Rene confirms the adapter works including with non-Samsung drives. |
CSL 2.5″ SATA to USB 3.0 Adapter* | 2.5″ SATA to USB 3.0 | The CSL SL adapter is confirmed to be working by Krikitt in the comments. Available in Europe. Not available in US. |
UGREEN 2.5″ SATA to USB-C 3.1 Enclosure Drive Caddy* | 2.5″ SATA to USB-C 3.1 | Confirmed to be working by CAProjects in the comments. Available in both Europe and US |
UGREEN 2.5″ SATA to USB-C 3.1 “Protect What You Love” Case* (AliExpress Listing* – Make sure to select USB-C 3.1) | 2.5″ SATA to USB-C 3.1 | Reported working by Michal in the comments, thanks! |
UGREEN 2.5″ to USB 3.0 “SATA USB Converter” Adapter* (AliExpress Listing*) | 2.5″ SATA to USB 3.0 | Also reported by Michal as working in the comments, thanks again! |
UGREEN 2.5″ SATA to USB 3.0 Adapter Cable with UASP Converter* | 2.5″ SATA to USB 3.0 | This adapter is reported to be working by Mirco in the comments |
SABRENT 2.5″ SATA to USB-C 3.1 Type A Adapter* | 2.5″ SATA to USB-C 3.1 Type A | The new USB-C 3.1 Type A version of the Sabrent adapter is reported as working in the comments by UEF. DO NOT get the USB 3.0 version as that one is below on the naughty list and won’t work! |
SABRENT 2.5″ SATA to USB 3.0 Dual Bay Docking Station* | 2.5″ SATA to USB 3.0 | One of very few Sabrent adapters/enclosures to work. Reported working well by William Grey in the comments. Has two bays! |
AliExpress Generic 2.5″ SATA to USB 3.0 3 colors Hard Disk Case* | 2.5″ SATA to USB 3.0 | Reported as working with UASP support by pierro78 in the comments |
Orico 2.5″ 2139C3-G2 2.5 inch USB 3.1 Gen 2 10Gbps Transparent Enclosure* | 2.5″ SATA to USB 3.1 Gen 2 10Gbps | Make absolutely sure it’s the 10Gbps USB 3.1 Gen 2 version. There is another one that looks identical that is a USB 3.1 Gen 2 6Gbps that will not work. Confirmed working by RRT in the comments. |
ASUS ROG STRIX Arion Aluminum Alloy M.2 NVMe SSD External Portable Enclosure Case Adapter* – (AliExpress Listing*) | M.2 NVMe (B+M Key) to USB/USB-C 3.2 Gen 2 | It’s bold. It’s beautiful. It’s also confirmed working by TADRACKET and Steve B. However, be warned, it takes a *lot* of power! Steve B. reports that even with the oversized 3.5A CanaKit adapter* it does not work. If you have the standard 3.0 adapter you can be practically certain it won’t power this enclosure. Does work with a powered USB hub*. |
ICY BOX M.2 NVMe (M Key) to USB-C 3.1 Gen 2 Enclosure* (Alternate amazon.de listing*) | M.2 NVMe (B+M Key) to USB-C 3.1 Gen 2 | Returning legendary commentary Frank Meyer reports: Does not work with a 3.0A power adapter (also reported by TTE). It’s not enough power for this enclosure. Does work with a powered USB hub*. |
TDBT M.2 NVMe (B+M Key) to USB-C 3.1 Gen 2 Enclosure* | M.2 NVMe (B+M Key) to USB-C 3.1 Gen 2 | Confirmed to be working well by WorkHard in the comments |
AliExpress Generic M.2 NVMe (B+M Key) to USB 3.1 “M2 SSD Case NVME Enclosure”* | M.2 NVMe (B+M Key) to USB 3.1 Type A | Confirmed working by Jens Haase, thanks Jen! |
SSK Aluminum M.2 NVMe (M Key) to USB 3.1 Gen 2 SSD Enclosure* | M.2 NVMe (M Key) to USB 3.1 Gen 2 | Brian L reports this is working well with beta firmware upgrades, but that it did not work at all without them! |
ORICO M.2 NVMe SSD Enclosure, USB 3.1 Gen 2 (10 Gbps)* (AliExpress Listing*) | M.2 NVME to USB 3.1 Gen 2 | M.Yusuf has given the first ever report of a working Orico adapter! Make sure it’s the USB 3.1 Gen 2 version that says “Support UASP for NVMe SSD”. This is the way. |
DELOCK 42570 M.2 SATA (B Key) to USB Micro-B 3.1 Gen 2 SSD Enclosure* | M.2 SATA (B Key) to USB Micro-B 3.1 Gen 2 | Andreas Franek reports that the enclosure works with a 3.0A power adapter (gets a little warm) |
Shinestar M.2 NVMe (M Key) to USB 3.0 Adapter* | M.2 NVMe (M Key) to USB 3.0 | This is the adapter I’m using in the picture at the top of the article. It is for NVMe M.2 drives only and is getting hard to find |
UGREEN M.2 NVMe (B+M Key to USB-C 3.1 Gen 2 SSD Enclosure* | M.2 NVMe (B+M Key) to USB-C 3.1 Gen 2 | Confirmed working in comments by Chad D |
UGREEN M.2 SATA (B+M Key) to USB 3.1 Enclosure* | M.2 SATA (B+M Key) to USB 3.1 Enclosure | Reported as working well in the comments by John H. Reinhardt with a ASM1051E chipset |
QNINE M.2 SATA (B Key) to USB 3.0 Enclosure* | M.2 SATA (B Key) to USB 3.0 | I used this enclosure to benchmark M.2 SATA Lite-On and SanDisk drives — working great in 3.0 ports |
Argon One M.2 SATA (B+M Key) Pi 4 Case* | M.2 SATA (B+M Key) Pi 4 Case | This case gives you a M.2 SATA port for your Raspberry Pi and is also a case! Confirmed working by Frank. |
Tanbin mSATA to USB Adapter* | mSATA to USB 3.0 | I used this mSATA to USB adapter for my Crucial M550 benchmark — working in 3.0 ports |
Generic mSATA to USB 3.0 Adapter (fe2008)* | mSATA to USB 3.1 | Confirmed working in comments by Nico |
Canakit Raspberry Pi 4 Power Supply (USB-C)* | 3.5A USB-C Power Supply | Canakit has been making very reliable power supplies for several Pi generations now. Using a 3.5A power supply will give enough extra power for your Pi to power the drive without causing instability |
Simplecom SE502 M.2 SSD Adapter* | M.2 SATA (B Key) to USB 3.0 | Quirks required, reported working by alan but only with quirks |
Delock #61883 SATA to USB 3.0 Converter* | 2.5″ SATA to USB 3.0 | Reported working well by Joerg_H |
Vantec SATA/IDE TO USB 3.0 Adapter* | 2.5″ SATA to USB 3.0 | Reported as working by JeffG but with an ugly messy appearance |
Known Problematic Adapters (Naughty List)
Here is a list of common USB adapters that are known to have problems with the Raspberry Pi 4. You can get some of these adapters working by using quirks mode (see the “Fix (some) USB Adapter Problems Using Quirks” section below).
FIDECO M207CPS USB3.2 to M2 NVME/SATA SSD Enclosure* | M.2 NVME to USB 3.2 Gen 2 | Lee Myring reports that the FIDECO M207CPS has issues working with the Pi |
UGREEN 30848 2.5″ SATA to USB 3.0 Hard Drive Enclosure* | 2.5″ SATA to USB 3.0 | Reporting as not working properly and disconnecting often by Mirco, thanks! |
Sabrent USB 3.0 to 2.5″ SATA adapter* | 2.5″ SATA to USB 3.0 | Only works in the USB 2.0 ports. Will not boot in a USB 3.0 port. I have two of these and can confirm they don’t work. RIP to Sabrent, our previous king of the Pi 3 era of adapters. |
Sabrent USB 3.0 to 2.5″ SATA Tool-Free External Hard Drive Enclosure* | 2.5″ SATA to USB 3.0 | Another nonworking Sabrent adapter reported by Alex, thanks Alex! |
ELUTENG 2.5″ SATA to USB 3.0 Adapter* | 2.5″ SATA to USB 3.0 | Despite earlier reports as working Ryan and one other have reported this adapter does not work unless you enable quirks mode! Don’t make Ryan’s sacrifice in vain and avoid this one. |
USB 3.0 to 2.5″ SATA III Hard Drive Adapter UASP Support-20cm, Black* | 2.5″ SATA to USB 3.0 | reported by dzm in the comments as having very poor I/O performance |
ORICO 2.5″ SATA to USB C 3.0 Enclosure (Transparent)* | 2.5″ SATA to USB 3.0 | Several commenters have stated the transparent ORICO is not working. Avoid! |
ORICO 2.5″ SATA to USB 3.0 Enclosure (Black) 2588US3-BKT* | 2.5″ SATA to USB 3.0 | Commenters report that the USB-C variant of the transparent ORICO enclosure also does not work |
ORICO 2.5″ SATA to USB 3.0 Enclosure (Black/White) 2520U3* | 2.5″ SATA to USB 3.0 | Reported as not working by by Richon in the comments |
ORICO 2.5″ SATA to USB-C 3.1 Gen 1 Enclosure (Transparent)* | 2.5″ SATA to USB-C 3.1 Gen 1 | Confirmed as not working by Andrea De Lunardi in the comments (thanks!) |
ORICO 2.5″ SATA to USB 3.1 Gen 1 Enclosure (Silver) M2PF-C3-BK-EP* | 2.5″ SATA to USB-C 3.1 Gen 2 | Looks really similar to the ICY BOX. Confirmed not working by auanasgheps in the comments. |
Vantec 2.5″ SATA to USB 3.0 USB Adapter with Case* | 2.5″ SATA to USB 3.0 | Does not work after hours of testing and frustration by Moshe Katz in the comments! |
AliExpress Generic 2.5″ SATA to USB 3.0 “New USB 3.0 To 2.5in SATA 7+15Pin Hard Drive Adapter”* | 2.5″ SATA to USB 3.0 | Extremely cheap adapter from AliExpress — MADATALIEXPRESS bought 5 of them and none worked, PPCM had one working, very unreliable and slow when it does work, not recommended even if you get lucky! |
EWENT USB 3.0 to SATA EW7017 | 2.5″ SATA to USB 3.0 | Does not work – reported by Wouter in the comments, thanks! |
CableCreation USB 3.0 to SATA Adapter Compatible 2.5″ SATA III HDD Hard Disk Driver, 0.5FT, Black* | 2.5″ SATA to USB 3.0 | Morgon reports not working in the comments — I also recognize this adapter as the “fake” StarTech adapter that is sold on AliExpress, thanks Morgon! |
JSAUX USB 3.0 to SATA Adapter, USB 3.0 to 2.5 Inch SATA III Hard Drives/SSD/HDD Adapter* | 2.5″ SATA to USB 3.0 | Reported as not working by Bennie in the comments, thanks! |
EZCast M.2 NVME SSD Enclosure Adapter* | M.2 NVMe to USB 3.1 Gen2 | Reported as problematic due to duplicate USB ids — best to avoid — thanks MikeC |
Sabrent 2.5″ Aluminum Enclosure* | 2.5″ SATA to USB 3.0 | Reported as not working by JeffG |
Prerequisites
Get Latest Raspbian & Updates
To edit the bootloader configuration you should have a copy of Raspbian on a SD card. Right now support in third party operating systems to do anything with the new Raspberry Pi 4’s firmware or bootloader is very limited / nonexistent. You can use a third party operating system later once you set the boot mode, but to actually make these changes we will use official Raspbian.
First make sure that you have the absolute latest updates and firmware for the Pi. To upgrade all your packages and firmware to the latest version use the following command:
sudo apt update && sudo apt full-upgrade -y
Once the update has completed restart your Pi with a sudo reboot command to apply the latest firmware / kernel updates.
Verify EEPROM Bootloader is up to date
We can check if your Pi’s bootloader firmware is up to date with the following command:
sudo rpi-eeprom-update
If your Raspbian is *very* out of date you may not have this utility and can install it using:
sudo apt install rpi-eeprom
The output from rpi-eeprom-update will look like this if you are not up to date:
BCM2711 detected VL805 firmware in bootloader EEPROM *** UPDATE AVAILABLE *** BOOTLOADER: update available CURRENT: Thu 3 Sep 12:11:43 UTC 2020 (1599135103) LATEST: Tue 24 Nov 15:08:04 UTC 2020 (1606230484) FW DIR: /lib/firmware/raspberrypi/bootloader/beta VL805: up-to-date CURRENT: 000138a1 LATEST: 000138a1
If it says any updates are available they be installed manually by adding ‘-a’ to the end of our previous command like this:
sudo rpi-eeprom-update -a
After the updates finish installing restart your Pi as firmware updates will not be applied until after a reboot. Now if you run rpi-eeprom-update to check for updates again it should say you are on the latest and up to date!
Verify Power Supply Size (3.5A strongly recommended)
Check your Raspberry Pi’s power supply size and make sure it is delivering at least 3.5A. There are a lot of USB C adapters for the Raspberry Pi that are only 3.0A. These will typically work fine, until you plug in something like a SSD which draws power from the Pi and there is nothing left to give.
Most SSDs are quite power efficient but HDDs draw significantly more. Older generations of SSDs used quite a bit more power than newer ones as well. If you are using an older drive or a drive that you know is power hungry you need to pay extra attention to having a quality power source with plenty of capacity.
A good alternative option to relying on the Pi to power the drive is using a powered USB hub* so your drive doesn’t need to draw power from the Pi’s limited power budget. Make sure you get one that is compatible with the Pi as some powered USB hubs won’t work properly with it so check the reviews and do your research to make sure people are using it successfully with the Pi.
Using a 3.5A power supply* or powered USB hub* will ensure your drive is getting enough power without impacting the Pi’s stability.
Prepare Bootable Drive
Image your bootable drive (your SSD / HDD / USB Flash Drive / etc.) the same way you imaged your micro SD card. You write the image of the operating system you want to run to the disk with Etcher / Win32DiskImager / however you normally would write one.
Once this is finished we are ready to edit the bootloader configuration to tell it to boot to our drive instead of the built in microSD slot.
If you are wanting to do a USB mass storage device boot with Ubuntu 20.04 or 20.10 check out my specific USB booting guide for Ubuntu 20.04 / 20.10 here.
Editing Bootloader Configuration
If you’ve completed the prerequisites you are now ready to edit your Raspberry Pi’s bootloader configuration to tell the Pi to boot from a specified device instead of the built in microSD slot. To edit the bootloader configuration use the following command:
sudo -E rpi-eeprom-config --edit
The default configuration will look like this:
[all] BOOT_UART=0 WAKE_ON_GPIO=1 POWER_OFF_ON_HALT=0 DHCP_TIMEOUT=45000 DHCP_REQ_TIMEOUT=4000 TFTP_FILE_TIMEOUT=30000 TFTP_IP= TFTP_PREFIX=0 BOOT_ORDER=0xf41 SD_BOOT_MAX_RETRIES=3 NET_BOOT_MAX_RETRIES=5 [none] FREEZE_VERSION=0
Our target is the BOOT_ORDER parameter in bold above. It is 0x1 in firmware versions up until 2020-05-150 and was changed to 0xf41 (try SD card first, then boot from USB if that fails) in newer versions after that. Here are the different configuration options for the BOOT_ORDER parameter (from Raspberry Pi documentation):
Value | Mode | Description |
---|---|---|
0x1 | SD CARD | SD card (or eMMC on Compute Module 4) |
0x2 | NETWORK | Network boot |
0x3 | USB DEV | USB device boot – See usbboot (since 2020-09-03) |
0x4 | USB MSD | USB mass storage boot (since 2020-09-03) |
0xe | STOP | Stop and display error pattern (since 2020-09-03). A power cycle is required to exit this state. |
0xf | RESTART | Start again with the first boot order field. (since 2020-09-03) |
The configuration option we want is USB mass storage device boot or option 0x4. We can use this option by itself or combine it with other options in the table placed in the order we want the Pi to try to boot from. To understand how to do this, let’s examine the default Raspberry Pi OS value of 0xf14. The values are read from right to left so this value means it will try USB booting first and then fall back to SD storage next.
If you want to leave the SD card and the “restart on failure” fallback options in place you can change it to 0xf14 (remember, the order is from right to left). Go ahead and use your arrow keys to navigate to the BOOT_ORDER line and change it 0x4 or 0xf14 so it reads:
BOOT_ORDER=0x4
or
BOOT_ORDER=0xf14 (to enable falling back to SD card if USB boot fails)
This translates to attempt to boot from USB mass storage first. If that fails, try to boot from SD card. If that fails, start over from step 1 and try again (back to USB mass storage). As another example, if you wanted to add booting from the network you could add the 0x2 value from the table for the “NETWORK” option and make it the final BOOT_ORDER value 0xf124. If you wanted to change the order so that the network boots first instead you could reorder it to 0xf142.
Choose the appropriate BOOT_ORDER you would like and use your arrow keys to move down to the BOOT_ORDER line. Change the line and press Control+X and then ‘y’ to save your changes. Make sure you have your boot device we set up in the prerequisites section plugged into one of the blue USB ports as these ports are USB 3.0 and the black USB ports are USB 2.0 (slower). Now restart the Pi.
If all went well the Pi will immediately boot up from your boot device instead of the SD card!
Help, something went wrong!
Try Booting from SD card
Generally if the Pi fails to boot from the USB device it will fall back to booting from the SD card. If the Pi didn’t boot after making the change try unplugging your USB device and just booting from the SD card again by removing power from the Pi and plugging it back in again.
If the device is booting fine from the SD card but not from the external drive double check that you have a compatible adapter and that the drive was imaged correctly. Plug it into a PC and make sure it has the files on it and perhaps try giving it a clean image again just in case something went wrong with imaging the first time.
Verify rpi-eeprom-config configuration
Make sure your changes that we made earlier actually stuck by verifying the configuration using the command:
sudo -E rpi-eeprom-config --edit
and verify that the BOOT_ORDER=0x1 line is changed to BOOT_ORDER=0x4.
Restore Bootloader to Defaults
If things are *really* broken and the Pi will not boot at all with your SD card or otherwise then you may need to restore the bootloader back to defaults.
To do this we need to prepare a SD card with the Raspberry Pi 4 EEPROM boot recovery tool. The easiest way to do this is to use the official Raspberry Pi Imager tool from the Raspberry Pi foundation to prepare the recovery image.
Here is how we create the recovery image inside the utility. Choose the “Misc utility images” category as shown below:
Next choose the “Raspberry Pi 4 EEPROM boot recovery” option:
Next choose your SD card and then choose “Write”. Now unplug your Pi and put in the newly prepared SD card. Connect the power and let it boot. This will restore your bootloader to defaults. You should see a continuous rapid green blinking light. You may now disconnect the power and put your original SD card back / reinstall Raspbian and boot the Pi normally!
For a more detailed step by step guide on this check out my Bootloader Recovery Guide
Try Beta Firmware
The beta firmware released since the original USB mass storage device support launched contains a bunch of fixes related to USB mass storage devices and USB booting. The downside is the beta firmware is not as well tested so you shouldn’t install it unless you are doing it to fix a specific issue addressed in those updates.
If your drive / USB storage adapter isn’t working then it is worth considering trying the beta firmware to see if the fixes in the versions released not on stable yet will help with your device.
To switch to the beta channel edit the configuration file with the following command:
sudo nano /etc/default/rpi-eeprom-update
Change the line FIRMWARE_RELEASE_STATUS=”critical” (sometimes it can be “stable”) to:
FIRMWARE_RELEASE_STATUS="beta"
Now press Ctrl+X and then ‘y’ to save our changes in nano. Now execute a Pi firmware update using:
sudo rpi-eeprom-update -a
The updater will tell you whether updates were applied or not. Now do a full reboot of your Pi as the firmware updates won’t be applied until you do! If you want to switch back to normal firmware simply change the configuration back to “stable” or “critical”.
Verify Drive Performance
You can make sure everything is running correctly (and as fast as it should be) by running my quick storage benchmark. You can run the benchmark with the following one-liner:
sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash
This will give you a score you can compare to the other Raspberry Pi Storage Benchmark results and make sure that you are getting an equivalent speed to your peers with the same device!
Fix (some) USB Adapter Problems Using Quirks
Some of the very common adapters on the naughty list above (such as the Sabrent) can be made to work by using USB quirks to disable UAS mode on the drive. This lowers performance, but it’s still much faster than a SD card and your adapter won’t go to waste.
To find out the quirks we need to find the device ID string for your adapter and then add an entry to cmdline.txt telling the kernel to apply them on boot.
Find Your Adapter
To apply the quirks we first need to get the adapter id. We will use the sudo lsusb command:
$ sudo lsusb Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
On line 2 we can see my ASM1051E SATA 6Gb/s bridge adapter (it’s the known working StarTech.com 2.5″ SATA to USB 3.1* adapter). You will see something very similar to mine when you run the command and it shouldn’t be too hard to figure out which device it is. If you need more information add a -v switch to make the command sudo lsusb -v. This can sometimes add some additional details to make it easier to figure out which one is your adapter.
If you’re still not sure, we have another command that between the two that can narrow things down. Type / paste the following:
sudo dmesg | grep usb [0.828535] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19 [0.828568] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [0.828597] usb usb3: Product: DWC OTG Controller [0.828620] usb usb3: Manufacturer: Linux 4.19.75-v7l+ dwc_otg_hcd [0.828644] usb usb3: SerialNumber: fe980000.usb [0.830051] usbcore: registered new interface driver uas [0.830182] usbcore: registered new interface driver usb-storage [0.836488] usbcore: registered new interface driver usbhid [0.836511] usbhid: USB HID core driver [0.971598] usb 1-1: new high-speed USB device number 2 using xhci_hcd [1.154217] usb 1-1: New USB device found, idVendor=2109, idProduct=3431, bcdDevice= 4.20 [1.154254] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [1.154281] usb 1-1: Product: USB2.0 Hub [1.301989] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd [1.332965] usb 2-1: New USB device found, idVendor=174c, idProduct=55aa, bcdDevice= 1.00 [1.332999] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1 [1.333026] usb 2-1: Product: ASM105x [1.333048] usb 2-1: Manufacturer: ASMT [1.333071] usb 2-1: SerialNumber: 123456789B79F
This is the dmesg log showing the hardware detection as hardware is activated on the Pi. If your log is really long you can generate fresh entries by just unplugging a device and plugging it back in and running the command again. Here we can clearly see that the ASM105x is what our StarTech adapter is being detected as.
Now we can go back to our first lsusb command and we want the 8 characters from the ID field that comes right after the Device:
Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. Name: ASM1051E SATA 6Gb/s bridge
Our adapter’s ID is: 174c:55aa
Applying Quirks
To apply the quirks to our USB adapter we are going to edit /boot/cmdline.txt. Type:
sudo nano /boot/cmdline.txt
We are going to add the following entry into the very front of cmdline.txt:
usb-storage.quirks=XXXX:XXXX:u
In place of the X’s above you will put in your adapter’s ID that we got before. With the example commands I gave above mine would look like this: usb-storage.quirks=174c:55aa:u. After this my cmdline.txt looks like this (everything should be one continuous line, no line breaks!):
usb-storage.quirks=174c:55aa:u console=serial0,115200 console=tty1 root=PARTUUID=d34db33f-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Now reboot the Pi. If the Pi fails to boot you can plug the SD card into the computer and go to /boot/cmdline.txt and undo the change we did so you can boot back in with your SD card.
Verifying Quirks
Once you have rebooted after changing cmdline.txt we can verify the quirks have been applied by doing another dmesg | grep usb command:
sudo dmesg | grep usb [1.332924] usb 2-1: New USB device found, idVendor=174c, idProduct=55aa, bcdDevice= 1.00 [1.332957] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1 [1.332983] usb 2-1: Product: ASM105x [1.333006] usb 2-1: Manufacturer: ASMT [1.333028] usb 2-1: SerialNumber: 123456789B79F [1.335967] usb 2-1: UAS is blacklisted for this device, using usb-storage instead [1.336071] usb 2-1: UAS is blacklisted for this device, using usb-storage instead [1.336103] usb-storage 2-1:1.0: USB Mass Storage device detected [1.336479] usb-storage 2-1:1.0: Quirks match for vid 174c pid 55aa: c00000 [1.336611] scsi host0: usb-storage 2-1:1.0
This time we can see in dmesg that UAS was blacklisted for the device and it has loaded with the usb-storage driver instead. This driver tends to be more compatible with the “problematic adapters” but the performance is usually significantly lower. It’s definitely worth a try though as some adapters do better with the quirks performance-wise. The only way to know for sure is to run a benchmark (see “Verify Drive Performance” section).
Other Resources
The Raspberry Pi Imager has a bunch of new headless configuration options that may be of assistance
If you are looking for storage adapters or the best SSDs to use: Best Storage Adapters / SSDs for the Pi 4 / 400 guide
To find out where to get the 64 bit Raspberry Pi OS beta: Where to get 64 bit Raspberry Pi OS article here
If you want to see which Pi storage performs the fastest and get an idea of what kind of drives to look for check out my 2022 Raspberry Pi Storage Benchmarks
I used the Orico 2588US3 USB 3.0 enclosure with a KingFast F10 128GB SATA III SSD and it worked perfectly first following your guide.
Thank you so much.
Hello Johann,
Excellent, I think you’ll really enjoy the setup. Thanks for stopping by and giving your report.
Enjoy and take care!
I have a intel dc ssd s3610 1.6tb and a 1.2tb that ive been trying to get to recognize on a raspberry pi 4b 8gb. I believe anything over 1tb for these enterprise drives are not recogized. Using a powered USB 3.0 hub and a ugreen usb to sata adapter, it recognizes the ASM1153 3gb/s chipset but doesnt see the drive. I am on my 4th adapter of testing, all other ssds under 1tb work great with any adapter, even unpowered. Got any ideas as to what could be the issue? I also see on the pibenchmark website, no one has ever run an intel dc ssd series under 1tb, so I assume my hunch is right. But I cant figure out why.
Hey Fred,
It probably isn’t a model that had been identified yet. I need to go through and update the newest drives that have been submitted. It should appear before too long (they will show up retroactively).
Hopefully that helps!
Hi,
I’d like to report that the WAVLINK USB 3.0 to 2.5” SATA III Hard Drive Adapter works great with my RasPi 4 and an Inland Pro (MicroCenter brand) 512 GB 2.5″ SSD. With this setup, there’s no need for a powered hub. I’m using the official Raspberry Pi power supply, an Ice Tower CPU cooler and fan (connected to the 5V GPIO pin), and also have an ssd1306 0.96″ I2C screen connected.
I’m using a second one with a RasPi 4, the official 7″ touch screen, and an Inland Pro 240 GB 2.5″ SSD. This one also works without issue when using the official power supply.
Hey Stacey,
Thanks for the report, that looks like a great adapter!
Hi,
The ICY BOX M2 to USB-C enclosure works absolutely flawless with my Raspi4b in every discipline without the need of a powered USB hub or stronger PSU.
I have two of these enclosures and never had a single case of needing a stronger power source or USB hub.
It’s pretty sure the used Samsung NVME model mentioned draws much power. Why is it so performant…it takes up to 7 watts in boost mode. No way this little tiny data converter chip on the ICY BOX enclosure pcb consume that much power.
My Raspi 4B is only powered by my docking stations USB-C outled at ~15 watts, and all my actions with this ICY BOX enclosure up to now went flawless without any power related issues.
Another USB mouse and keyboard is attached to the Raspi as well.
Maybe have a closer look at SSDs tech specs and ad some more to the specific power rating.
In general, semiconductor drives very often use more power than manufacturers tend to state in their tech specs. Hence the vast majority believe all semiconductor drives are using only very little power which simply isn’t true for all models.
I have an old UnionMemory ssd (no cache) that takes about 1,5 watts and a second enclosure with a Transcend model with cache that goes up to 3,5 watts.
BTW. a PSU with at least 15 watts is recommended for properly powering the Raspi4b model, so there shouldn’t be any trouble if doing so.
BR
Hey Patrick,
Great observations! So from my experience if I use a 250GB Samsung I don’t need a powered USB hub. If I throw on a 1TB version of the exact same drive (960 EVO in my previous testing) it will not work without a powered USB hub.
In other words it depends on the drive. Not the model of the drive either necessarily. The capacity is often a bigger factor as the higher capacity drives have a lot more flash chips on them increasing the power draw.
I’d imagine you could take any 128-256GB SSD and run it without a powered hub. I actually have never seen a 128-256 require a powered USB hub (even with the ASUS ROG Strix RGB enclosure). Put a 1TB+ drive in any of those though and you’ll run into the power issues immediately.
Check out this page on the 960’s power draw of the 1TB/2TB versions vs. the 250GB version. It’s hilarious they are even considered the same drive. There’s nothing similar about them. The larger capacities have way higher performance and way higher power draw. You’ll notice in the article that they idle about the same but once they start doing performance tests look at the performance per watt and how far apart these drives actually are:
During this test, we saw a max of 4.9W out of the 250GB model and 6.1W out of the 1TB model
There you go. Both Samsung 960 drives. Identical model. Only the capacity is different (on paper, in reality there are differences like we’ve been talking about). 6.1W vs. 4.9W.
That doesn’t sound like so much does it? It actually is though because of power limits on the Raspberry Pi beyond your control. You cannot use the 15 watts from the power supply through USB. USB on the Raspberry Pi 4 is limited to a maximum of 1.2A. That’s for ALL 4 USB ports combined. 1.2A.
Okay, so if our maximum power draw is 1.2A at 5V then we have about 6 watts total. Now you can start to see the problem. What was our power draw when we went to 1TB? Higher than 6 watts. What was it with the 250GB? Only 4.9W. Well within acceptable parameters for the lower capacity (provided you have nothing else plugged into the USB ports it has to share power with, otherwise you’ll often still run into issues). For the higher capacity? Not enough power to even run it. It won’t boot.
This is why the drive capacity makes such a difference. The Raspberry Pi 4 and lower leave you NO ROOM to wiggle with power. The difference in power draw between a 250GB module and a 1TB module is literally the difference between working and not working because we have such limited power available to begin with.
The size of your power adapter makes zero difference on the USB power draw limit of 1.2A. It is fixed in place by hardware voltage regulators. It cannot be changed or bypassed without hardware modifications. Theoretically you could desolder and remove the power controller and other circuitry or connect another power supply directly to bypass it.
All of those options are going too far though as there are plenty of other alternatives that would surely be more worth your time like considering an Orange Pi 5 (which has a M.2 NVMe slot built into the board and a large enough power supply to properly utilize it) at that point or even a Raspberry Pi 5 upgrade instead (and then using the hats or the proprietary adapter once Raspberry Pi releases it). When I wrote this article the Raspberry Pi 4 was the best SBC out there. It made sense to jump through the hoops because they were still so powerful for so cheap. Things have changed though during the shortage and the past few years. I wouldn’t spend much money or time chasing high capacity/high performance NVMe on this board as it is obsolete now (especially for anything to do with NVMe).
Today if you want to run a large capacity NVMe drive the Raspberry Pi 4 is one of the poorest choices to do it with as we have new releases (both from Raspberry Pi and not from them) that are better suited for this purpose. The fact is the Raspberry Pi 4 was designed with too little power to run NVMe over USB with larger capacities. If they had made the power draw from USB 1.6A instead of 1.2A for example virtually all drives would work with it without needing a hub. They happened to choose 1.2A though which puts you right in the middle of the range that NVMe drives function at meaning some drives will work and some won’t depending on which side of the line you are on. It’s very, very thin margins (which we’ve demonstrated with the math above) that allow you to do this at all but only with the smallest capacity NVMe drives. Otherwise a powered hub will be needed.
One funny thing about the Raspberry Pi 5 is that they raised the available power on the board. Why? This issue we are discussing now is exactly why. Check this out:
When using a standard 5V, 3A (15W) USB-C power adapter, Pi 5, by default, will limit downstream USB current to 600mA to ensure sufficient margins, which is twice lower than the 1.2A limit on Raspberry Pi 4. To drive high-power peripherals or to try overclocking, the new Raspberry Pi 27W USB-C Power Supply will be needed. Such supply will increase the USB current limit to 1.6A.
Oh would you look at that? They raised it by EXACTLY how much I said would have fixed the Raspberry Pi 4 for virtually all NVMe drives! That is not a coincidence. They raised it because the Pi 4 wasn’t designed with NVMe in mind *at all* but the Pi 5 was. It was completely overlooked/missed on previous boards even though myself and thousands of others were struggling through and making it work all of those years anyway. It didn’t have enough power for higher capacity NVMe drives at 1.2A and 1.6A literally fixes that entire issue basically across the board / in one fell swoop.
Unfortunately now you need to run a 27 watt power supply on the Pi 5. If you don’t it says they only give you 0.6A now on the Raspberry Pi 5 for USB unless you use the huge power adapter. It’s still pretty janky in the new one as you can see but at least you can throw a bigger power supply at it to fix it (which does not work with the Pi 4). The Pi 5 also has PCI express and a proprietary adapter for M.2 NVMe which has not been released yet. People are already using them though on pibenchmarks.com with hats and getting insane speeds. If you are running NVMe on the Pi 5 you’d want to be using either the hat or the proprietary adapter when it is released. USB will only slow you down on the Pi 5 as you have better/faster options available with that board.
Based on what you are saying I’d imagine none of these drives are over 512GB capacity and I’d imagine they’d work with just about any enclosure. There are some enclosures that are less power efficient than others such as the ASUS ROG Strix with the RGB lighting I’ve talked about in the article. That enclosure will still run a 250GB 960 though without a powered USB hub. None of them will run that 960 1TB+ without a hub though (the point being the drive and capacity will have a much larger impact than which enclosure).
If you don’t have the need to run higher capacities I would say call it a day and enjoy the setup for sure. It sounds like this is the case for you. I wanted to write this up though to explain what was happening and why if someone buys the ICY BOX they might not have the same experience as you did. If they want to run big boy drives 1TB+ they are going to need a powered hub or they are going to need to buy specialized ultra power efficient NVMe drives (which are not really marketed to consumers and are instead typically used in data centers but they do exist).
Hopefully that helps!
Hi James,
Many thanks for your further explanations. I think it will help some users to understand what’s the matter in their use case when wandering on the “power” edge. BR Patrick
Hello
I can report that “iDsonix M.2 NVMe SATA SSD” from Amazon does work!
Maybe this one could be added to the list!
BR
Jonzen
Hey Jonzen,
Thanks a ton for a report, I haven’t heard one for an iDsonix one yet. Thanks for sharing!
I bought Geekpi X862 V2.0 M.2 NGFF SATA SSD despite some bad opinions:
The vendor said the new version (V2.0) solved some problems with wifi interferences. I did not use Wifi so it was ok for me, I thought.
Unfortunately after 2 weeks checking every tutorial on the internet and changed my adapter for a new one with 3.1A, I could not initiate the Raspberry with the SSD. This does not work at all.
My very last try was to purchase one of your tested devices: UGREEN M.2 SATA (B+M Key) to USB 3.1 Enclosure*
This awesome device worked fine in the first boot.
Thank you James for your compatible device list. It helped me a lot.
Hey Charli,
Thanks so much for your comment and reporting on the adapter that didn’t work. I’m so glad that the UGREEN took care of it and worked well.
Enjoy and take care!
Reporting that Adata SX8200 (2TB) does not seem to work. Raspberry only detects the controller, but not the partitions.
* At first, I tried upgrading Raspberry firmware, didn’t work.
* Then I tried quirks, didn’t work.
* Then I thought it might be about the JMS583 controller, so I upgraded the firmware. The behaviour changed and the Raspberry did not start up. It only did so after I removed the drive. It also didn’t recognize the partitions when connecting after boot.
* Then I thought that it might be a power issue and tried it with a powered USB hub (RSTech RSH-A10S). Didn’t work.
* Then I thought that it might be the controller issue and bought the icy box (IB-1817Ma-C31), still didn’t work.
The only possible solution I see is trying out a different drive (Samsung 980 Pro), but at this point, I’m hesitant. Did not expect it to be such a hassle. Should’ve found this article earlier!
Hey Hendrig,
Thanks for your report! I definitely understand your hesitation about trying the 980 Pro.
So there’s a trick you can try with the powered USB hub. Most powered USB hubs made for the past 10 or so years will backfeed power which basically will make the Pi not turn on when you do a “cold” boot by connecting the power. The trick is to disconnect the powered USB hub briefly and then plug in the Pi and then immediately try to plug the USB hub back into the Pi’s USB port before the boot sequence really starts. All the lights will come on though if it’s completely dead when trying that.
I think it’s probably the adapter. If it did the same thing with a Samsung 980 Pro that would be a confirmation it’s something with the JMS583 (even after the firmware updates). If that ends up being the case then a new adapter may be in order. I definitely understand your frustration though. My recommendation would probably be to try a different adapter first vs. the Samsung 980 Pro.
Why do I suspect the adapter? Because lots of people have successfully used the AData SX8200 (at least the Pro model) on pibenchmarks here. We have 28 benchmarks submitted so far for that drive. I think to save the most money and frustration trying a different NVMe adapter should probably be the next choice as we have reason to believe because of the successful benchmarks that some of the more popular known good adapters to use with the Pi 4 will work with that drive.
Hopefully that helps!
Hi,
Had intermittent success with SX8200, it was sometimes recognized and sometimes not.
Bought the icy boxy (IB-1817Ma-C31) adapter which is also suggested here. So you think it might be a backfeed problem? I had the same issue without the powered hub (connecting adapter straight to pi), but I’ll give it a test.
By disconnecting the powered USB hub you mean disconnecting it from the wall outlet or disconnecting it from the pi?
Hey Hendrig,
I meant disconnecting it from the Pi briefly when you connect power to the Pi. After than you plug the USB hub’s USB port back into the Pi. Hopefully that clarifies!
Hi James,
It seems to be working pretty stable with the Adata SX8200 (2TB) + USB hub (RSTech RSH-A10S) + icy box (IB-1817Ma-C31) using the power trick. As you said, I just need to disable the power for the drive for a second on startup (have a button for that on the powered hub).
Thank you for the suggestion!
However, this is not an ideal solution. If there are any power outages, the Pi will not boot on its own.
Are you aware of any possible mitigations for the problem?
Cheers,
Hendrig
Hey Hendrig,
Absolutely! So the best way would be using something like a PiSugar or a UPS to prevent losing power. Unfortunately I don’t know of any hubs that don’t have this issue that have been made in the past 5+ years or so. Another option is just a regular UPS to prevent it from losing power.
Hopefully that helps!
Okay, thanks! Just discovered, that it now works without a powered USB hub for no apparent reason, so trying without one until it keeps working reliably.
Hey Hendrig,
That definitely works! Keep in mind that the USB power limit is shared between all devices plugged in so if anything else has been unplugged that could explain it!