TwinkleToes23
Posts: 3
Joined: Mon Oct 29, 2018 7:03 pm

Boot from SSD

Mon Oct 29, 2018 7:17 pm

I have a pi 3b it has the newest .img of the OS. I am trying to make an ssd the boot partition. However, after following the online guide I can't get the verification text to display. I have verified that the config.txt file is correct. I have rebooted several times with no luck. Anyone have any ideas? could it be that it needs to be in a specific port or do I actually just stink at this?
Last edited by TwinkleToes23 on Mon Oct 29, 2018 10:03 pm, edited 1 time in total.
The best feeling is seeing your code work and knowing how it does everything. The worst feeling is when you see your code work but have no idea how it does.

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

Re: Boot from SSD

Mon Oct 29, 2018 8:53 pm

What do you mean by "verification text" ?
"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
HawaiianPi
Posts: 5707
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Boot from SSD

Mon Oct 29, 2018 9:37 pm

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:
  1. Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
  2. Grab the Etcher software from https://etcher.io/
  3. 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.
  4. 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.

Code: Select all

vcgencmd otp_dump | grep 17:
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?

TwinkleToes23
Posts: 3
Joined: Mon Oct 29, 2018 7:03 pm

Re: Boot from SSD

Mon Oct 29, 2018 10:00 pm

How do I know what USB devices are compatible then? Is there a list somewhere that I can cross reference? Currently, I have a portable SSD with the OS installed and expanded
https://www.amazon.com/dp/B00ZTRY532/re ... UTF8&psc=1
This is the SSD I am using.
When I attempt to boot without a micro SD The red power LED turns on, however, the Green LED does not.

I have not tried the timeout, however, I can't even get the config.txt file to write the USB boot to the OTP.
The best feeling is seeing your code work and knowing how it does everything. The worst feeling is when you see your code work but have no idea how it does.

TwinkleToes23
Posts: 3
Joined: Mon Oct 29, 2018 7:03 pm

Re: Boot from SSD

Mon Oct 29, 2018 10:03 pm

n67 wrote:
Mon Oct 29, 2018 8:53 pm
What do you mean by "verification text" ?
On the website https://www.raspberrypi.org/documentati ... des/msd.md
it goes over how to boot from a mass storage device (an SSD in my case). There is a verification grep command that you can use to see if the config.txt file was written to OTP. If it was successful then after entering the grep command it should output 0x3020000a if it does not then the write was not successful.
The best feeling is seeing your code work and knowing how it does everything. The worst feeling is when you see your code work but have no idea how it does.

LTolledo
Posts: 3319
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Boot from SSD

Mon Oct 29, 2018 10:07 pm

can you post the last few lines of your config.txt file? specially the part where you edited/modified.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

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

Re: Boot from SSD

Tue Oct 30, 2018 6:52 am

TwinkleToes23 wrote:
Mon Oct 29, 2018 10:00 pm
How do I know what USB devices are compatible then? Is there a list somewhere that I can cross reference?
There is a very short list that only covers a few flash drives. Other than that it's just trial and error.

I have tested a few USB SATA adapters and external enclosures.
The one I have had the best luck with is a USB 3.0 to SATA III adapter cable from ELUTENG (link removed-no longer valid).
I also have a Pi booting from a tiny mSATA SSD in this USB 3.0 enclosure (also by ELUTENG).
This adapter cable by Sabrent also works well for me (and is a bit faster on my USB 3.0 Win10 PC).
And I recently tested this ORICO Tool-Free USB 3.0 External Enclosure for 2.5 Inch SATA HDD/SSD.

The ELUTENG adapter cable and ORICO enclosure were tested with SSD and HDD (the others with SSD only).
TwinkleToes23 wrote:
Mon Oct 29, 2018 10:00 pm
Currently, I have a portable SSD with the OS installed and expanded
https://www.amazon.com/dp/B00ZTRY532
This is the SSD I am using.
How did you put the OS on the SSD and expand the partition?

The recommended procedure is to write a Raspbian image with Etcher and boot it (the partition will be expanded on first boot).

TwinkleToes23 wrote:
Mon Oct 29, 2018 10:00 pm
When I attempt to boot without a micro SD The red power LED turns on, however, the Green LED does not.
The green LED is for SD card activity (so with no SD card...).

TwinkleToes23 wrote:
Mon Oct 29, 2018 10:00 pm
...however, I can't even get the config.txt file to write the USB boot to the OTP.
You are doing that from a Raspbian micro SD card, right (not the SSD)?
Last edited by HawaiianPi on Tue Apr 09, 2019 6:24 pm, edited 1 time in total.
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?

interfan6
Posts: 4
Joined: Sun Apr 27, 2014 1:46 pm

Re: Boot from SSD

Tue Apr 09, 2019 4:42 pm

Can someone give me the correct way to run ssd on Raspberry pi 2b v1.1

i tried to install raspberry pi on ssd and then copy the bootcode.bin to sd card (both formated to fat32)
but i dont get any signal, and nothing boots.

any suggetions?

fruitoftheloom
Posts: 23119
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Boot from SSD

Tue Apr 09, 2019 5:00 pm

interfan6 wrote:
Tue Apr 09, 2019 4:42 pm
Can someone give me the correct way to run ssd on Raspberry pi 2b v1.1

i tried to install raspberry pi on ssd and then copy the bootcode.bin to sd card (both formated to fat32)
but i dont get any signal, and nothing boots.

any suggetions?

https://www.raspberrypi.org/documentati ... bootmodes/
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

LTolledo
Posts: 3319
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Boot from SSD

Tue Apr 09, 2019 6:01 pm

I've used that procedure stated above by fruitoftheloom to successfully boot a Raspberry Pi B+ (not the RPi3B+)

the microSD card used is a known fake 1GB microSD card formatted to FAT32.
bootcode.bin is the only file that was copied to the microSD card.
the HDD (yes its a power hungry spinning rust!) used is a 2.5" 1TB Seagate Barracuda HDD.
connected to RPi1B+ using Eluteng SATA to USB3.0 adaptor
PSU is 5v 2.4A non-RPF PSU (note: its not a phone charger)
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

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

Re: Boot from SSD

Tue Apr 09, 2019 6:51 pm

interfan6 wrote:
Tue Apr 09, 2019 4:42 pm
Can someone give me the correct way to run ssd on Raspberry pi 2b v1.1

i tried to install raspberry pi on ssd and then copy the bootcode.bin to sd card (both formated to fat32)
but i dont get any signal, and nothing boots.

any suggetions?
How did you "install raspberry pi on ssd"?
Which SSD are you using?
What are you using for a power supply?

This is the procedure I use to boot older Pi models:
  1. Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
  2. Grab the Etcher software from https://www.balena.io/etcher/
  3. 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 click continue to confirm you want to write to a large USB drive.
    • 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.
  4. Disconnect and reconnect the USB drive from your PC and copy the bootcode.bin file to a FAT32 formatted SD card.
  5. Safely eject the card and USB drive and use them to boot your Pi.

Note that USB boot is slower than SD card boot. When you power on your Pi nothing will seem to happen at first (just the red power LED). After about 10-15 seconds you should see the color GPU test screen (rainbow square) and shortly after that the system should boot from USB.

If your system won't boot, try adding an empty file named timeout to the bootcode.bin-only SD card.

Booting from an SSD or HDD requires a good power supply (not a phone charger). I recommend the official Raspberry Pi Universal Power Supply. Hard drives can be especially troublesome due to high power requirements and long spin-up times (this problem is even worse on older models, which only output 600mA before the firmware loads).
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?

DMMG
Posts: 20
Joined: Tue Jan 14, 2020 1:59 pm

Re: Boot from SSD

Thu May 14, 2020 11:38 pm

Hello,

I want to boot my Pi 4 from SSD (hope i can do it). My question is : Can i use the sdcard (formated) after i manage to boot from SSD?Basically to use it as a storage?Thanks

RonR
Posts: 1194
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Boot from SSD

Thu May 14, 2020 11:53 pm

DMMG wrote:
Thu May 14, 2020 11:38 pm
I want to boot my Pi 4 from SSD (hope i can do it). My question is : Can i use the sdcard (formated) after i manage to boot from SSD?Basically to use it as a storage?

At the moment, the only way to boot from a USB device is via the SD card: Running Raspbian from USB Devices : Made Easy.

At some point in the hopefully not too distant future, the SD card won't be required and you will be able to use it as general storage.

fruitoftheloom
Posts: 23119
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Boot from SSD

Fri May 15, 2020 4:31 am

DMMG wrote:
Thu May 14, 2020 11:38 pm
Hello,

I want to boot my Pi 4 from SSD (hope i can do it). My question is : Can i use the sdcard (formated) after i manage to boot from SSD?Basically to use it as a storage?Thanks

The Original Poster was using a RPi 3B so how is your 4B question related ??
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13007
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Boot from SSD

Fri May 15, 2020 9:14 am

locking a hijacked RPI3 question.

Return to “Troubleshooting”