User avatar
Teacher of Things
Posts: 3
Joined: Thu Jan 19, 2017 9:39 pm

Raspberry Pi Native USB Boot

Fri May 19, 2017 4:09 pm

I've noticed in the release notes: http://downloads.raspberrypi.org/raspbi ... _notes.txt, that now it says "Use PARTUUID to support USB boot". So how do I boot from a flash drive without using a SD Card at all. I don't have any extra, and I want Raspian on a 8GB flash drive I have.

Also, if I install it on my flash drive, use it on a Raspberry Pi 3, then take it out, could I use it on a Raspberry Pi Zero without changing anything?

Thanks in advance!

-Teacher of Things

runboy93
Posts: 297
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 4:36 pm

Aluminum case for Raspberry Pi 3
https://goo.gl/3QRuVw

RPi 3 tweaks by runboy93
https://goo.gl/o8grny

andrum99
Posts: 369
Joined: Fri Jul 20, 2012 2:41 pm

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 4:37 pm

See here: https://andrum99.wordpress.com/2017/05/ ... hard-disk/. Basically all you do is image a USB drive with a copy of the Raspbian or Raspbian Lite image, in the same way that you would for an SD card. You can also use NOOBS, although it is actually easier to get it working using a Raspbian or Raspbian Lite image.

User avatar
Teacher of Things
Posts: 3
Joined: Thu Jan 19, 2017 9:39 pm

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 4:47 pm

Thanks, but you still need a SD card, and it said something about once you change it to boot from a USB device, you can't change it. I want it to be like if I was swapping SD cards, when you just power it off, take out the SD card, put a different one in and power it back up. But in this case, instead of Multiple SD cards, I want to use my current SD card, and a flash drive.

-Teacher of Thigns

itimpi
Posts: 1076
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 4:58 pm

Teacher of Things wrote:Thanks, but you still need a SD card, and it said something about once you change it to boot from a USB device, you can't change it. I want it to be like if I was swapping SD cards, when you just power it off, take out the SD card, put a different one in and power it back up. But in this case, instead of Multiple SD cards, I want to use my current SD card, and a flash drive.
Once you have changed the Pi3 to support USB booting as a capability that cannot be undone. However it will still preferentially boot from the SD card if both are present and set up to be bootable (at least that is my experience).

runboy93
Posts: 297
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 6:14 pm

You need SD card to prepare your SSD etc to able to boot RPi, no other way available.

But really worth of it, around 40MB/s (with highest UHS SD cards, a few MBs more with overclock card reader, but yeah... slow) vs 480MB/s from SSD usb 3 (usb 2 sources limited to 480MB/s)

TRIM supported etc other useful features from SSDs, price is not that higher, if you use mSATA or cheaper M.2 variants.

Connect mSATA or M.2 SSD with aluminum box with USB 3 cable, and you ready to go :D

mSATA aluminum box:
https://www.amazon.com/gp/aw/d/B00LRZPNHM

M.2 aluminum box:
https://www.amazon.com/gp/aw/d/B01FUDHHLQ
Aluminum case for Raspberry Pi 3
https://goo.gl/3QRuVw

RPi 3 tweaks by runboy93
https://goo.gl/o8grny

User avatar
fruitoftheloom
Posts: 14534
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 6:41 pm

Teacher of Things wrote:Thanks, but you still need a SD card, and it said something about once you change it to boot from a USB device, you can't change it. I want it to be like if I was swapping SD cards, when you just power it off, take out the SD card, put a different one in and power it back up. But in this case, instead of Multiple SD cards, I want to use my current SD card, and a flash drive.

-Teacher of Thigns
The official docukentation states that if you wish to boot from SD Card and have the Operating System on USB MSD to create a SD Card with just bootcode.bin

This is likely what you are seeking as it should function with all RPi models:

https://www.raspberrypi.org/documentati ... bootmodes/
My only "PC" is an Asus ChromeBit running ChromeOS, cloudcentric at its best !
Rockchip Quad-Core RK3288C SoC as used in ASUS Chromebook C201 & Chromebook Flip C100PA as well as the Tinker SBC

W. H. Heydt
Posts: 7312
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 7:20 pm

runboy93 wrote: But really worth of it, around 40MB/s (with highest UHS SD cards, a few MBs more with overclock card reader, but yeah... slow) vs 480MB/s from SSD usb 3 (usb 2 sources limited to 480MB/s)
I'm sorry, but some of those numbers are SERIOUSLY in error. A Pi with an attached SSD will see transfer rates around 35MB/s. The aggregate rate over USB is 480Mb/s. Note that "B" is byte and "b" is bit in the unit abbreviations. In theory, one could see 480MB/s transfers for a device attached with USB 3 (which the Pi does not have), but the actual--tested on an SBC with a USB3 port--transfer rate comes in at about 125MB/s.

Martin Frezman
Posts: 950
Joined: Mon Oct 31, 2016 10:05 am

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 7:27 pm

It's pretty clear that the "pure USB boot" thing is largely a technical curiosity, at least as of this writing. Don't get me wrong - it's very impressive from a technical point-of-view, but is of little practical value to the rank-and-file user at the present time.

This is not to say that it was a bad idea to do it, or that it might not be more useful in future, of course.
If this post appears in the wrong forums category, my apologies.

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

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 7:47 pm

Of course it it useful. The ability to boot from a USB hard disk which is much more resilient to power failures than an SD card is very handy. Also with some cases it is easier to plug in a different USB stick to boot from than to change the SD card.

andrum99
Posts: 369
Joined: Fri Jul 20, 2012 2:41 pm

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 9:07 pm

Teacher of Things wrote:Thanks, but you still need a SD card, and it said something about once you change it to boot from a USB device, you can't change it. I want it to be like if I was swapping SD cards, when you just power it off, take out the SD card, put a different one in and power it back up. But in this case, instead of Multiple SD cards, I want to use my current SD card, and a flash drive.

-Teacher of Thigns
You do indeed need an SD card for the initial boot to program the OTP memory. There is no way around this I'm afraid. Once you have booted the Pi from the SD card once with the relevant setting in config.txt to program the OTP memory, the Pi will then have the ability to boot from a USB mass storage device.

andrum99
Posts: 369
Joined: Fri Jul 20, 2012 2:41 pm

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 9:11 pm

runboy93 wrote:You need SD card to prepare your SSD etc to able to boot RPi, no other way available.
No you don't. The SD card is needed to allow the Pi to boot once so that you can program the relevant OTP bit to enable booting from a USB mass storage device. This is because the BCM2837 inside the Pi 3 and Pi 2 v1.2 ships with USB booting disabled. The USB mass storage device can be prepared on another computer.

andrum99
Posts: 369
Joined: Fri Jul 20, 2012 2:41 pm

Re: Raspberry Pi Native USB Boot

Fri May 19, 2017 9:16 pm

Martin Frezman wrote:It's pretty clear that the "pure USB boot" thing is largely a technical curiosity...
It's not. For example Element 14 just released a kit that converts a Pi 3 into a desktop PC by adding a real time clock (RTC) along with an mSATA adapter: https://www.element14.com/community/doc ... desktop-pc.

W. H. Heydt
Posts: 7312
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspberry Pi Native USB Boot

Sat May 20, 2017 12:03 am

Martin Frezman wrote:It's pretty clear that the "pure USB boot" thing is largely a technical curiosity, at least as of this writing. Don't get me wrong - it's very impressive from a technical point-of-view, but is of little practical value to the rank-and-file user at the present time.

This is not to say that it was a bad idea to do it, or that it might not be more useful in future, of course.
The boot from USB gives you a bit higher data transfer rate. Probably most important at this point is that it can give you a *lot* more storage at an affordable price, and that storage will be far more reliable than an SD card. Go price 1TB HDDs. Then see if you can *find* a 1TB microSD card.

Now *if* the Pi4 has USB3, then the speed difference will come into its own.

W. H. Heydt
Posts: 7312
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Raspberry Pi Native USB Boot

Sat May 20, 2017 12:07 am

andrum99 wrote:
runboy93 wrote:You need SD card to prepare your SSD etc to able to boot RPi, no other way available.
No you don't. The SD card is needed to allow the Pi to boot once so that you can program the relevant OTP bit to enable booting from a USB mass storage device. This is because the BCM2837 inside the Pi 3 and Pi 2 v1.2 ships with USB booting disabled. The USB mass storage device can be prepared on another computer.
There was loose talk during the early stage of the beta test that, once the feature was in full release (which it is now), that going forward the OTP bit would be set in the factory on all Pi3Bs (but *not* on CM3/CM3L boards....I asked).

Return to “General discussion”

Who is online

Users browsing this forum: DougieLawson, Heater, joeygbsn, NotRequired, Silverlock, underwhelmd and 102 guests