This thread is a year old now, and I have an extra year of experience with USB booting Pi computers to share.
So what's the problem?
The basic problem is that USB booting is not compatible with all USB drives. However things have improved. New Raspbian firmware and the updated boot-loader in newer models like the 3B+ have reduced compatibility issues to an extent. Some devices that didn't work before have been found to work now.
Unfortunately it's still not 100% and SSD booting adds another layer to an already complex problem. Most of the time when there is a problem with booting a Pi3 from an SSD the fault is with the USB-SATA adapter, but that is not always the case. I have a couple of adapters that will work fine with one SSD and not with another. That is the exception, though, and the right USB adapter is kind of the "Holy Grail" of Pi USB booting.
The Holy Grail?
There was what might have been the perfect adapter until recently. It was a USB 3.0 to SATA III adapter cable from ELUTENG
. I have two of them, and I have yet to find an SSD or HDD that my Pi3
won't boot from using that adapter cable. Unfortunately it was recently replaced by a new model
that does not work as well.
So what now?
Well, the search is on again. My recommendation is to get a SATA SSD and a USB enclosure or adapter cable, because it's cheaper to swap out the adapter than an entire USB-SSD. Also, avoid the super cheap SSD models sold on places like eBay and Alibaba.
Are there any other adapters that work?
I have had good luck with some other USB adapters and enclosures I have tried, although none have been as thoroughly tested as the ELUTENG.
Will any of those work for me?
Do keep in mind that these products can change over time, like the new ELUTENG adapter cable
that no longer works well, and while I do have access to more drives and models than most people, I can't test every combination, so YMMV.
Any you would advise against?
I recently got the opportunity to test this ORICO mesh enclosure
with a Crucial MX500 SSD and it did not work.
What else can we try?
The final option, which fixes almost all problems, is to start the boot process from the SD card and load the OS from the SSD. I know this is not ideal for everyone, but it really does work. There are 2 ways to accomplish this.
- An SD card with just the bootcode.bin file on it.
- The entire /boot partition (or a 3rd party boot-loader) on the SD card.
Option #1 is also how you USB boot a model that does not support USB booting. The card only starts the boot process, then the entire OS boots and loads from the USB drive. After the early stage boot-loader is read from the card it is not used, so it can be mounted read-only, or not mounted at all (and since it's never written to by the OS, it's unlikely to ever fail).
Option #1 is also super simple. Just write a Raspbian image to your USB drive and copy just the bootcode.bin file to a FAT32 formatted SD card. The bootcode.bin file can be copied from the imaged USB drive or downloaded here (bootcode.bin
). Another advantage is the automatic partition resizing works with this method (it does not when /boot and / are on different devices). And finally, if the problem is your drive taking too long to get ready, you can add a file named "timeout" to the SD card to increase the wait time.
Option #2 involves placing the entire /boot partition on the SD card, or using a 3rd party boot-loader such as BerryBoot or PINN.
Placing the entire /boot partition on the card and / (the root filesystem) on the USB drive should work with almost all storage devices. The drawback is that automatic partition resizing will fail, and you have to edit the /etc/fstab file to mount the SD card as /boot to ensure that kernel and firmware updates are properly applied. The complex installation process and file editing is more trouble than most people want to mess with, but it does work well with even the most problematic devices. With this option the SD card will be written to during kernel and firmware updates, but those don't happen often so the card should last a very long time.
Using third-party boot-loaders have their own advantages and disadvantages, but it would be best if you look them up yourself to decide if they are right for you. The biggest advantage is they allow the installation of multiple operating systems on one card or drive. The main problem will be waiting for them to be updated for compatibility when new models are released (as many discovered the hard way with the release of the new 3B+ and 3A+ models).
Oh, one last thing I almost forgot to mention...
If you have a problem drive that is taking too long to get ready, and it works with the bootcode.bin SD card and a "timeout" file, you can permanently increase the USB wait time by setting another OTP bit in the Pi3B(+). 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. This *might* allow you too boot without the SD card.
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?