vincen
Posts: 1
Joined: Thu Jan 18, 2018 2:32 pm

SSD drive boot experience ??

Thu Jan 18, 2018 2:42 pm

Hi

Is there some people that succeeded to make it work the external drive procedure ??

I'm trying to setup my Pi3 to boot from SSD drive in USB but killing my head with that :(
I have burnt the img file with Etcher to an SSD (128Go ones) that I have connected through a USB/SATA adapter either directly to USB of PI or through a powered USB hub.
I have also updated internal fw of Pi to latest one, same for raspbian (I have one on a SD card) and have setup fw to boot in USB mode.
Whatever I try my raspberry never boots from the SSD :(
Any ideas what I can look for to find the problem ?? or should I go with the other solution to keep SD card just for boot but move everything to an external SSD ?

Thanks

Vincèn

User avatar
HawaiianPi
Posts: 3264
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: SSD drive boot experience ??

Thu Jan 18, 2018 7:54 pm

USB boot on the Pi3 is a troublesome beast. Due to limited space for the bootloader on the SoC, it's quite primitive and not compatible with some devices (a lot, actually, in my experience). If you are absolutely certain you have setup USB boot correctly, then your only option is to try different SATA-USB adapters until you find one that works.

In my case I found that booting was fine, but restarts and shutdowns were unreliable. After some troubleshooting I finally went the old-school route of starting the boot process from SD and loading the OS from the SSD. That has been working 100% reliably for me.

There are 2 options for starting boot from SD and then loading the OS from USB. The original method was to keep the /boot partition on SD and load and run the / (root) OS from USB. The more recent method is to put just bootcode.bin on the SD card and run the entire OS (including the /boot partition) from USB. You might need the latest bootcode.bin from git to do the latter.
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?

n67
Posts: 939
Joined: Mon Oct 30, 2017 4:55 pm

Re: SSD drive boot experience ??

Thu Jan 18, 2018 8:19 pm

HawaiianPi wrote:
Thu Jan 18, 2018 7:54 pm
USB boot on the Pi3 is a troublesome beast. Due to limited space for the bootloader on the SoC, it's quite primitive and not compatible with some devices (a lot, actually, in my experience). If you are absolutely certain you have setup USB boot correctly, then your only option is to try different SATA-USB adapters until you find one that works.
This.
In my case I found that booting was fine, but restarts and shutdowns were unreliable. After some troubleshooting I finally went the old-school route of starting the boot process from SD and loading the OS from the SSD. That has been working 100% reliably for me.
This.
There are 2 options for starting boot from SD and then loading the OS from USB. The original method was to keep the /boot partition on SD and load and run the / (root) OS from USB. The more recent method is to put just bootcode.bin on the SD card and run the entire OS (including the /boot partition) from USB. You might need the latest bootcode.bin from git to do the latter.
Is there any advantage to the fancy "bootcode.bin only" method? I doubt it.
It sounds like just another fancy thing like the "pure USB boot" itself; nice, cool,yeah, but not useful in the long run.

Also, I think I've seen words to the effect that the "bootcode.bin only" method has some or all of the same limitations that the "pure USB boot" method has (which you've outlined in the text above).

So, I'd stick with the "50 megs on the SD card" method. It always works.
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

User avatar
rpdom
Posts: 13384
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: SSD drive boot experience ??

Thu Jan 18, 2018 8:27 pm

vincen wrote:
Thu Jan 18, 2018 2:42 pm
I have also updated internal fw of Pi to latest one, same for raspbian (I have one on a SD card) and have setup fw to boot in USB mode.
There is no internal firmware on the Pi. It is all held on the SD card or USB/network storage (for the Pi 3B/2Bv2).

I presume you have set the one-time option to enable USB booting?

User avatar
HawaiianPi
Posts: 3264
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: SSD drive boot experience ??

Sat Jan 20, 2018 5:46 pm

n67 wrote:
Thu Jan 18, 2018 8:19 pm
Is there any advantage to the fancy "bootcode.bin only" method? I doubt it.
It's mainly to keep as much as possible on the USB device, and not write to the SD card, ever. The main disadvantage is that it will not work reliably if you have more than one USB storage device connected, because will only attempt to boot the first device it sees, and if that device is not your boot device it fails. In my case I have both my SSD and a regular USB flash drive connected. The SSD is the boot device, and the other is used for backups. About 9/10 times the USB flash drive is detected first (/dev/sda), so bootcode.bin would fail 90% of the time for me.

By keeping all of the boot partition on SD you can point to the UUID of the root OS device in cmdline.txt, so it will always boot correctly. The boot partition is treated as read-only most of the time, but it is written to during kernel/firmware updates, so the SD card will be written to occasionally with the SD card mounted as /boot.
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?

n67
Posts: 939
Joined: Mon Oct 30, 2017 4:55 pm

Re: SSD drive boot experience ??

Sat Jan 20, 2018 6:26 pm

Thanks, HawaiianPi. That confirms everything I posted previously.
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

wpballa1
Posts: 42
Joined: Sat Jun 27, 2015 12:49 am

Re: SSD drive boot experience ??

Sun Jan 21, 2018 1:48 am

I've got a Model 3 B booting from an SSD with no SD card working just fine (I did set the one time boot bit). Be sure you use the root=PARTUUID= method in the config.txt and add rootwait. I only have one drive plugged in, the the PARTUUID should fix it. See the sticky for how to find the right PARTUUID.

User avatar
HawaiianPi
Posts: 3264
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: SSD drive boot experience ??

Sun Jan 21, 2018 12:01 pm

wpballa1 wrote:
Sun Jan 21, 2018 1:48 am
I've got a Model 3 B booting from an SSD with no SD card working just fine...
Which SATA-USB adapter are you using?
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?

wpballa1
Posts: 42
Joined: Sat Jun 27, 2015 12:49 am

Re: SSD drive boot experience ??

Thu Jan 25, 2018 12:43 am

The USB-SATA adapter came with the MyDigitalSSD OTG drive, and I can't tell who made it, could be they did. I got it from Amazon...

User avatar
rpdom
Posts: 13384
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: SSD drive boot experience ??

Thu Jan 25, 2018 6:55 am

Can you post the output of lsusb when using that adaptor? That will tell us some details about which type it is.

goestr
Posts: 1
Joined: Tue Feb 20, 2018 12:54 pm

Re: SSD drive boot experience ??

Tue Feb 20, 2018 1:23 pm

Hello,
I'm new in this forum and I am investigation on "booting on rpi3 with ssd and without SD" for some weeks. I tested a lot of SSD/USB-adapters – without or with small success. Today there was a big success. The new solution is running flawlessly.
My configuration:
• RPI 3 with actual Raspbian Lite (USB-Bit set, boot_delay_ms=1000, disable_splash=1)
• 2,5 A powersupply
• ADATA SSD Premier SP580 (128GB)
• Headless remote operation, operated from Apple with the program ZOC.
The definite breakthrough was the purchase of a new SSD-USB3-Adapter: Sabrent 2,5" SATA Hard Drive/SSD to USB 3.0 Adapter, bought from Amazon for the price of 9,99€ (Germany) plus transportcosts.
This configuration work well for me, it starts and reboots flawlessly .

nice day

goestr

hwissing
Posts: 7
Joined: Wed Jan 31, 2018 4:08 pm

Re: SSD drive boot experience ??

Sat Mar 03, 2018 3:20 pm

Hello,

today I got USB boot working with an old 64GB Verbatim SATA SSD. Another old KingSpec SSD 32GB PATA still fails. To get the SATA SSD working it was necessary to increase boot delay. That is described https://www.raspberrypi.org/documentati ... ootflow.md
This is another write once bit, which can be set in a similar way like the USB boot bit.

Code: Select all

echo program_usb_timeout=1 | sudo tee -a /boot/config.txt
and reboot the system.

Before doing that, I tested USB boot with an USB stick. As this worked perfect and the activity LED of the drive interface had great delay, it was likely, that delay may be an issue.

Hope this may help
Heimo

ccpizz
Posts: 3
Joined: Sat Nov 25, 2017 10:15 pm

Re: SSD drive boot experience ??

Wed Jan 16, 2019 4:50 pm

Isn't this the 'official' way to do it?

https://www.raspberrypi.org/documentati ... des/msd.md

fruitoftheloom
Posts: 18502
Joined: Tue Mar 25, 2014 12:40 pm

Re: SSD drive boot experience ??

Wed Jan 16, 2019 4:53 pm

ccpizz wrote:
Wed Jan 16, 2019 4:50 pm
Isn't this the 'official' way to do it?

https://www.raspberrypi.org/documentati ... des/msd.md

Yes, that is why it is on the Official Raspberry Pi Website !!
adieu

My other Computer is an Asus CS10 ChromeBit

User avatar
HawaiianPi
Posts: 3264
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: SSD drive boot experience ??

Thu Jan 17, 2019 11:02 pm

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.
  1. An SD card with just the bootcode.bin file on it.
  2. 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?

Return to “Advanced users”