Noonlord
Posts: 3
Joined: Sun Aug 06, 2017 3:00 pm

Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sun Aug 06, 2017 3:07 pm

I want to try new OSes. But I only have one SD card. So I want to enable USB boot. But these questions in my mind.

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sun Aug 06, 2017 7:59 pm

I don't know about your pie (what filling?) :lol:

Setting the USB boot option can't hurt your Pi.

If the SD card is present the Pi will try and boot of that first (unless you set one of the GPIO boot options as well).

Noonlord
Posts: 3
Joined: Sun Aug 06, 2017 3:00 pm

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sun Aug 06, 2017 8:20 pm

auto-correction lol :lol:

Thank you for answer :D

NickPar
Posts: 11
Joined: Sun Jun 11, 2017 3:41 am

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Thu Aug 10, 2017 8:19 pm

Is this true, will burning that OTP allow booting from BOTH SDcard and USB?

That would be worth trying. Right now it's try it and maybe I wont have a pi anymore.

DirkS
Posts: 7703
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Thu Aug 10, 2017 8:31 pm

NickPar wrote:
Thu Aug 10, 2017 8:19 pm
Is this true, will burning that OTP allow booting from BOTH SDcard and USB?
Yes.
But why ask again? Don't you trust the knowledge of several long time members who answered this question in several topics on this forum?

NickPar
Posts: 11
Joined: Sun Jun 11, 2017 3:41 am

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 3:14 am

It was the very first post on the subject I have seen, so stow your sarcasm.
I neither knew about the "several long time members who answered this question in several topics on this forum"
nor do I spend my time trolling forums...

Thanks for the answer though, at least it was worth something.

But if it bricks my pi, I'll be back :evil:

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 5:37 am

NickPar wrote:
Fri Aug 11, 2017 3:14 am
It was the very first post on the subject I have seen, so stow your sarcasm.
I neither knew about the "several long time members who answered this question in several topics on this forum"
There is a thing on the internet called a "Search Engine". It can be used to find the answers to questions (ignore the forum search box here, it isn't very good).

For example, google's search box can be set to look for answers in these forums if you include site:raspberrypi.org/forums in the search box.

When people post questions on here we assume that they have already made some attempt at searching for the answer . It seems you didn't bother.
nor do I spend my time trolling forums...
No comment.

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 5:43 am

NickPar wrote:
Fri Aug 11, 2017 3:14 am
It was the very first post on the subject I have seen, so stow your sarcasm.
I neither knew about the "several long time members who answered this question in several topics on this forum"
nor do I spend my time trolling forums...

Thanks for the answer though, at least it was worth something.

But if it bricks my pi, I'll be back :evil:
This question has been asked previously and setting the OTP BiT has no detrimental effect on the RPi 3B hardware...

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.
3 Mobile Huawei E5330 Mobile Mi-Fi

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 7:23 am

This question has been asked previously and setting the OTP BiT has no detrimental effect on the RPi 3B hardware...
Undoubtedly true, but it begs the question: Why have the bit at all? If there is nothing wrong with setting it, why isn't it set at the factory - or, why even have it at all?

I think us smart people are willing to say "It is what it is" and let it go at that, but it is certainly reasonable for a newcomer to wonder - and to ask about it.

It is also reasonable to assume that this is just an interim state of affairs - that in the future, there will be no such bit.
If this post appears in the wrong forums category, my apologies.

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 12:58 pm

Martin Frezman wrote:
Fri Aug 11, 2017 7:23 am
This question has been asked previously and setting the OTP BiT has no detrimental effect on the RPi 3B hardware...
Undoubtedly true, but it begs the question: Why have the bit at all? If there is nothing wrong with setting it, why isn't it set at the factory - or, why even have it at all?
Because the default for the Pi has always been to boot from SD cards. Some people may not want it to boot from USB or network. The Pi3 was launched before the boot code had been fully tested and there would have been a lot of people complaining if it didn't work correctly.
It is also reasonable to assume that this is just an interim state of affairs - that in the future, there will be no such bit.
I try never to make such assumptions. However it has been mentioned that the bit might be set on the Pi production line at some point in the future, but not for the Compute Module.

hippy
Posts: 2342
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 2:43 pm

rpdom wrote:
Sun Aug 06, 2017 7:59 pm
Setting the USB boot option can't hurt your Pi.
I'm not clear why one would need to set any USB boot option when "By default, this is SD card boot followed by USB device boot". That reads to me that if an SD card is not found then USB boot will be attempted without having to do anything. Perhaps I have misunderstood ...

Added: Yes; I did misunderstand. That's "USB device boot", not "booting from USB Mass Storage Device" which has to be enabled separately.

https://www.raspberrypi.org/documentati ... ootflow.md

That says setting the OTP bit uses GPIO 22-26 or 39-43 to determine which boot modes are valid. So, if one were planning to use those GPIO pins one would not want to set the OTP bit ?

Added: The bit(s) which enables reading the GPIO is separate and additional to the bit which enables booting from USB Mass Storage Device.

Rather confusingly it says "the boot ROM checks to see if program_gpio_bootmode OTP bit is 1 or 2". I'm guessing that should say "bits" ?

And then, on reading each GPIO pin; "If it is low, it will disable that boot mode for each of SD1, SD2, NAND, SPI, USB. If the value read is a '1', then that boot mode is enabled (note this cannot enable boot modes that have not already been enabled in the OTP)". There's no prior mention of those OTP bits which need enabling.

Maybe the details are elsewhere but I must say that on my first reading of the official documentation it's "as clear as mud" so I can understand people getting confused or not being sure.

Added: If newbies are going to be directed to the 'boot modes' page I think it would help, make things clearer and easier, if there were direct links at the top to How To guides for booting from USB Mass Storage Device, network booting over LAN, and booting without SD Cards (Device Boot).
Last edited by hippy on Fri Aug 11, 2017 3:54 pm, edited 3 times in total.

User avatar
DougieLawson
Posts: 30420
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 3:34 pm

hippy wrote:
Fri Aug 11, 2017 2:43 pm

https://www.raspberrypi.org/documentati ... ootflow.md

That says setting the OTP bit uses GPIO 22-26 or 39-43 to determine which boot modes are valid. So, if one were planning to use those GPIO pins one would not want to set the OTP bit ?

Rather confusingly it says "the boot ROM checks to see if program_gpio_bootmode OTP bit is 1 or 2". I'm guessing that should say "bits" ?
DO NOT GO THERE. Those OTP bits are designed for extremely specialist use. Assuming there's 14 million RPis in the world there's probably close 13,999,999 folks who wouldn't ever need to know that stuff existed.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

DirkS
Posts: 7703
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 4:14 pm

NickPar wrote:
Fri Aug 11, 2017 3:14 am
It was the very first post on the subject I have seen, so stow your sarcasm.
Sarcasm? You must be using a different dictionary than I do...

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 4:48 pm

DirkS wrote:
Fri Aug 11, 2017 4:14 pm
NickPar wrote:
Fri Aug 11, 2017 3:14 am
It was the very first post on the subject I have seen, so stow your sarcasm.
Sarcasm? You must be using a different dictionary than I do...
Your definitions are out of sync with most folks. I get where the OP is coming from.
If this post appears in the wrong forums category, my apologies.

NickPar
Posts: 11
Joined: Sun Jun 11, 2017 3:41 am

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 6:18 pm

Well, all efforts to boot Raspbian Jessie from USB by usb harddisk 2.0 or stick 2.0 are a failure.
I did not set the OTP to "program_usb_mode=1". This was a test of "By default, this is SD card boot followed by USB device boot".

The image on SD card mounted inside a usb sdcard reader failed to boot as well.

Next: Enable the "program_usb_mode=1" in config.txt and see if that works without bricking my pi 3b.

ttyl.

NickPar
Posts: 11
Joined: Sun Jun 11, 2017 3:41 am

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 8:13 pm

rpdom wrote:
Fri Aug 11, 2017 5:37 am
NickPar wrote:
Fri Aug 11, 2017 3:14 am
It was the very first post on the subject I have seen, so stow your sarcasm.
I neither knew about the "several long time members who answered this question in several topics on this forum"
There is a thing on the internet called a "Search Engine". It can be used to find the answers to questions (ignore the forum search box here, it isn't very good).

For example, google's search box can be set to look for answers in these forums if you include site:raspberrypi.org/forums in the search box.

When people post questions on here we assume that they have already made some attempt at searching for the answer . It seems you didn't bother.
nor do I spend my time trolling forums...
No comment.
Well...I started looking for answers on Google in June 2017. I read several posts by the Raspberry Pi Foundation on the subject of USB boot. It was a bit confusing.
I tried some of the methods that did not involve the OTP. They failed. So OK, I come back in a couple months see if anyone got something going.
I know...$35 pi what am I so concerned about.
For me that's a lot of money...no i wont explain that.
rpdom, the troll remark was not aimed at you.

Eventually I learned enough to get Pi3B to start the boot from sdcard and run from the rootfs on a usb 2.0 Harddisk.
It runs GREAT!. With Swappiness set at 12 I dont hit swap hell hardly ever unless i run chromium.
The problem comes when I need to upgrade to Stretch in the next few months.
It would also be nice to run a 64 bit OS (aach64 or SUSE or some flavour) and be able to use the full power of the ARMv8.
Soooo.....I keep looking..one day I will find what i need. Thanks anyway for taking the time to post.

TTYL

hippy
Posts: 2342
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 9:57 pm

NickPar wrote:
Fri Aug 11, 2017 6:18 pm
I did not set the OTP to "program_usb_mode=1". This was a test of "By default, this is SD card boot followed by USB device boot".
As you can see by my own post; that confused me as well. By "USB Device Boot" what that means (mostly) is a Zero or Zero W which is waiting to have a boot setup injected into it from a host PC via USB (paraphrased). That's not quite the same as booting from a USB Mass Storage Device (MSD).

Haven't tried it yet but my understanding is you need "program_usb_mode=1" in config.txt, then reboot to set the OTP USB MSD boot bit. Then shutdown, boot with SD Card removed, a suitably configured USB MSD attached.

Nothing should brick the Pi. Reinsert an SD Card and that will take precedence over booting from USB MSD. The "program_usb_mode" bit simply determines if the SoC tries a USB boot if SD Card boot fails.

NickPar
Posts: 11
Joined: Sun Jun 11, 2017 3:41 am

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Fri Aug 11, 2017 10:23 pm

hippy wrote:
Fri Aug 11, 2017 9:57 pm
NickPar wrote:
Fri Aug 11, 2017 6:18 pm
I did not set the OTP to "program_usb_mode=1". This was a test of "By default, this is SD card boot followed by USB device boot".
As you can see by my own post; that confused me as well. By "USB Device Boot" what that means (mostly) is a Zero or Zero W which is waiting to have a boot setup injected into it from a host PC via USB (paraphrased). That's not quite the same as booting from a USB Mass Storage Device (MSD).

Haven't tried it yet but my understanding is you need "program_usb_mode=1" in config.txt, then reboot to set the OTP USB MSD boot bit. Then shutdown, boot with SD Card removed, a suitably configured USB MSD attached.

Nothing should brick the Pi. Reinsert an SD Card and that will take precedence over booting from USB MSD. The "program_usb_mode" bit simply determines if the SoC tries a USB boot if SD Card boot fails.
Thanks for the input. :) I will be trying the OTP setting method in the next couple of days.
It will be very handy when it works. Either way I will post here about how it went.

TTYL

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sat Aug 12, 2017 6:49 am

I have a Pi 2B that has the boot partiton on SD card and everything else on a USB disk. It has been running happily like that since I got it to replace an ageing laptop doing the same thing (boot from internal CF card and run on external SATA disks via a PC Card interface).

Sometime I will replace that Pi 2B with a 3B that boots directly from the USB disk. I've got the Pi 3B booting from a USB stick, but not from the hard disk yet. Could be incompatibility with the controller I'm using. I might have a look at using the WD Pi Drive controller with my existing 2TB disk.

hippy
Posts: 2342
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sat Aug 12, 2017 10:09 am

DougieLawson wrote:
Fri Aug 11, 2017 3:34 pm
hippy wrote:
Fri Aug 11, 2017 2:43 pm
https://www.raspberrypi.org/documentati ... ootflow.md

That says setting the OTP bit uses GPIO 22-26 or 39-43 to determine which boot modes are valid. So, if one were planning to use those GPIO pins one would not want to set the OTP bit ?

Rather confusingly it says "the boot ROM checks to see if program_gpio_bootmode OTP bit is 1 or 2". I'm guessing that should say "bits" ?
DO NOT GO THERE. Those OTP bits are designed for extremely specialist use. Assuming there's 14 million RPis in the world there's probably close 13,999,999 folks who wouldn't ever need to know that stuff existed.
Having read more; I would agree the information is not that useful for most Pi users but for anyone with a Pi 3B which they want to use as a software experimentation platform the mechanism provides a simple and easy solution for multi-booting.

Accepting that booting from the secondary SD Card is not yet enabled; the GPIO boot option allows for a system which can boot from either primary or secondary SD Cards, USB drives or over the network through simply changing a rotary switch setting or using a bank of interlocked push buttons.

That would provide multi-booting without having to power-cycle in most cases, swap SD Cards, plug or unplug anything.

At a minimum it overcomes the need to remove the SD Card to allow USB boot. One simply needs a switch plus resistor which selects SD Card or USB.

It also seems to provide a means to boot from USB while allowing a bootable SD Card to be used as removable storage. It also allows for faster USB booting by side-stepping the SD Card timeout.

I would guess there hasn't been much interest in this mode because, while it is described, most people ( like me ) probably had not really understood what it meant, had not realised its potential usefulness, or how they could put it to use.
hippy wrote:
Fri Aug 11, 2017 9:57 pm
Nothing should brick the Pi. Reinsert an SD Card and that will take precedence over booting from USB MSD.
I have to extend that a little. If the GPIO Boot Mode OTP bit has been set, it is possible to render the Pi non-bootable until one or more pull-ups are added to GPIO pins to enable booting.

If the bit is ever set there appears to be no way to back out of that. So don't set the GPIO Boot Mode OTP bit unless you understand the consequences of doing so.

The GPIO Boot Mode OTP bit should only be set if that's what one actually needs. It doesn't need to be set to allow booting from a USB Mass Storage Device.

NickPar
Posts: 11
Joined: Sun Jun 11, 2017 3:41 am

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sat Aug 12, 2017 4:41 pm

rpdom wrote:
Sat Aug 12, 2017 6:49 am
I have a Pi 2B that has the boot partiton on SD card and everything else on a USB disk. It has been running happily like that since I got it to replace an ageing laptop doing the same thing (boot from internal CF card and run on external SATA disks via a PC Card interface).

Sometime I will replace that Pi 2B with a 3B that boots directly from the USB disk. I've got the Pi 3B booting from a USB stick, but not from the hard disk yet. Could be incompatibility with the controller I'm using. I might have a look at using the WD Pi Drive controller with my existing 2TB disk.
What you have done with the Pi2 I have done that exactly with the Pi3B. It works well but will have to go through the whole process again when Raspbian Stretch goes mainstream.
Good luck with the 2T disk. Let us know how that goes and what works :)

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sat Aug 12, 2017 4:49 pm

NickPar wrote:
Sat Aug 12, 2017 4:41 pm
Good luck with the 2T disk. Let us know how that goes and what works
Having looked at the WD Pi Drive details, the cable is just a USB3 cable, no controller. So if my 2TB USB3 drive doesn't currently boot with the Pi I'm going to have to keep the boot partition on an SD card. Oh well, at least it works. :-)

Maybe when the Pi 5B comes out I'll add one or two of these: https://www.theregister.co.uk/2017/07/1 ... 50tb_ssds/ (not really suitable for the Pi due to the low number of writes before failure. About 1900 writes per bit maximum. Really only for archiving data.)

NickPar
Posts: 11
Joined: Sun Jun 11, 2017 3:41 am

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sat Aug 12, 2017 4:59 pm

rpdom wrote:
Sat Aug 12, 2017 4:49 pm
NickPar wrote:
Sat Aug 12, 2017 4:41 pm
Good luck with the 2T disk. Let us know how that goes and what works
Having looked at the WD Pi Drive details, the cable is just a USB3 cable, no controller. So if my 2TB USB3 drive doesn't currently boot with the Pi I'm going to have to keep the boot partition on an SD card. Oh well, at least it works. :-)

Maybe when the Pi 5B comes out I'll add one or two of these: https://www.theregister.co.uk/2017/07/1 ... 50tb_ssds/ (not really suitable for the Pi due to the low number of writes before failure. About 1900 writes per bit maximum. Really only for archiving data.)
:)
Maybe you find something like this. https://www.newegg.ca/Product/Product. ... _-Product

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

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sat Aug 12, 2017 5:04 pm

NickPar wrote:
Sat Aug 12, 2017 4:59 pm
Maybe you find something like this. https://www.newegg.ca/Product/Product. ... _-Product
I've got a few of those and some others as well. I haven't been able to get this disk to boot with any method yet.

Noonlord
Posts: 3
Joined: Sun Aug 06, 2017 3:00 pm

Re: Can enabling USB boot hurt my Pie and can i still boot from an SD card?

Sun Aug 13, 2017 2:55 pm

I did it. And it didnt break my Pi. I confirmed it with vcgencmd, but it didnt work with my Kingston drives.

Return to “Raspbian”

Who is online

Users browsing this forum: kudbuloken, Yahoo [Bot] and 30 guests