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

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 9:39 am

thagrol wrote:
Mon Nov 25, 2019 9:19 am
As RonR pointed out, the SD card will always boot first (possible not if you've been playing around with the more esoteric parts of the otp config bits) but which of the two partitions with the same ID will the kernel mount?

The SD card is scanned for matching PARTUUID's before USB devices, so the SD card always wins.

User avatar
thagrol
Posts: 3780
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 10:05 am

RonR wrote:
Mon Nov 25, 2019 9:33 am
thagrol wrote:
Mon Nov 25, 2019 9:22 am
RonR wrote:
Mon Nov 25, 2019 4:46 am
As of Buster, all devices (SD cards and USB devices) created end up having the same PTUUID/PARTUUID/UUID that is present in the downloaded Raspbian image file.
It's been going on longer than that. Since shortly after the 3B launched.

Edit: Or rather it's always been that way since raspbian has been distributed by .img file. It's mostly been a noticable issue since the 4B launch.

Prior to Buster, the act of auto-expanding on the first boot was what changed the PTUUID. Starting with Buster, this no longer occurs. I confirmed this prior to reporting the problem to the engineers who acknowledged the change in Buster.
Fair enough. I wasn't aware of that. I'd guess that would have left the boot partition unchanged though?
Arguing with strangers on the internet since 1993.

User avatar
thagrol
Posts: 3780
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 10:06 am

RonR wrote:
Mon Nov 25, 2019 9:39 am
thagrol wrote:
Mon Nov 25, 2019 9:19 am
As RonR pointed out, the SD card will always boot first (possible not if you've been playing around with the more esoteric parts of the otp config bits) but which of the two partitions with the same ID will the kernel mount?

The SD card is scanned for matching PARTUUID's before USB devices, so the SD card always wins.
Thanks for clearing that up for me. So I guess if the root partition is left on the SD the one on the USB device will never get mounted.
Arguing with strangers on the internet since 1993.

User avatar
dickon
Posts: 1824
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 12:02 pm

If in doubt, use WWNs...

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

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 12:44 pm

Hello,
I wonder whether the dicussion matches the topic. Hope the "bootloader guy" will solve the problems and I still wait for an official solution booting Pi4 from USB mass storage devices.

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

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 7:01 pm

thagrol wrote:
Mon Nov 25, 2019 10:05 am
RonR wrote:
Mon Nov 25, 2019 9:33 am
Prior to Buster, the act of auto-expanding on the first boot was what changed the PTUUID. Starting with Buster, this no longer occurs. I confirmed this prior to reporting the problem to the engineers who acknowledged the change in Buster.
Fair enough. I wasn't aware of that. I'd guess that would have left the boot partition unchanged though?

The auto-expansion still occurs in Buster, but it doesn't change the PTUUID as it did in the past.

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

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 7:08 pm

thagrol wrote:
Mon Nov 25, 2019 10:06 am
RonR wrote:
Mon Nov 25, 2019 9:39 am
thagrol wrote:
Mon Nov 25, 2019 9:19 am
As RonR pointed out, the SD card will always boot first (possible not if you've been playing around with the more esoteric parts of the otp config bits) but which of the two partitions with the same ID will the kernel mount?

The SD card is scanned for matching PARTUUID's before USB devices, so the SD card always wins.
Thanks for clearing that up for me. So I guess if the root partition is left on the SD the one on the USB device will never get mounted.

If the USB device you're trying to boot has the same PTUUID as the SD card, the result will be as if you were trying to boot the SD card (the SD card's fstab will be in effect).

incognitum
Posts: 580
Joined: Tue Oct 30, 2018 3:34 pm

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 7:33 pm

dickon wrote:
Mon Nov 25, 2019 12:02 pm
If in doubt, use WWNs...
The Linux kernel by itself does not understand those.
So that only makes sense if the Linux distribution you are using has an initramfs with helper code to resolve those and mount the root file system. Raspbian by default does not.

User avatar
dickon
Posts: 1824
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Raspberry Pi 4 usb boot?

Mon Nov 25, 2019 7:48 pm

Oh. I thought it did. My mistake.

RossDv8
Posts: 244
Joined: Thu Jan 21, 2016 12:35 pm

Re: Raspberry Pi 4 usb boot?

Tue Nov 26, 2019 1:39 am

So far, the only real advantage (for me) I can see to USB boot, 'might' be if that freed up the microSD for writing data.
At the moment, using /boot on microSD and running off the SSD, start up from power on, to being able to open a program happens before I get back to my chair.

I hope whatever is done to make USB boot keeps the SD card priority, but allows it to be used as a storage medium when it does not contain a bootable partition. And in the absence of that, moves USB boot priority to any USB device with a bootable partition, while allowing later USB devices with a bootable partition that are plugged in to be accessed for data.

But I wonder what would happen if say 3 bootable USB devices were plugged in and someone ran REBOOT ?
Remember, nobody is listening to you
until you fart ...

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

Re: Raspberry Pi 4 usb boot?

Tue Nov 26, 2019 9:56 am

RossDv8 wrote:
Tue Nov 26, 2019 1:39 am
So far, the only real advantage (for me) I can see to USB boot, 'might' be if that freed up the microSD for writing data.
At the moment, using /boot on microSD and running off the SSD, start up from power on, to being able to open a program happens before I get back to my chair.

I hope whatever is done to make USB boot keeps the SD card priority, but allows it to be used as a storage medium when it does not contain a bootable partition. And in the absence of that, moves USB boot priority to any USB device with a bootable partition, while allowing later USB devices with a bootable partition that are plugged in to be accessed for data.

But I wonder what would happen if say 3 bootable USB devices were plugged in and someone ran REBOOT ?
The way it works on previous Pis is that SD card boot does have priority, and is available for storage whether the Pi has booted from it or not. USB mass storage devices are enumerated and the Pi tries each one until it finds the boot files. It is not possible to specify which USB device to boot from. If the Pi cannot find a bootable mass storage device it will then attempt net boot.

There is also GPIO boot mode which allows you to choose exactly which boot modes to enable.

On the Pi 4B, since we have an EEPROM, the boot order is configurable. It would also be possible to allow the user to specify which USB device to boot from, although this is not something that can be done on PCs, for example and would obviously require Raspberry Pi to implement it.

Suima-no-Tatsugoroh
Posts: 2
Joined: Fri Dec 20, 2019 1:12 am

Re: Raspberry Pi 4 usb boot?

Sun Dec 22, 2019 9:33 am

Until Right NOW, I have never known that "The old program_usb_boot etc configurations have no effect on the RPi4." ....
Therefore, I have purchased the new USB 3.0 memory TODAY afternoon -- its like a advanced shopping.

Anyway, I understand that I need to be patient for a while.
Maybe Santa will bring us the good news that coming new RPI-UPDATE solve this issue --- I would like to believe this dream (rumor).

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

Re: Raspberry Pi 4 usb boot?

Sun Dec 22, 2019 9:43 am

Suima-no-Tatsugoroh wrote:
Sun Dec 22, 2019 9:33 am
Until Right NOW, I have never known that "The old program_usb_boot etc configurations have no effect on the RPi4." ....

usb-boot works equally well on the Raspberry Pi 1, 2, 3, and 4.

User avatar
ehem
Posts: 55
Joined: Mon Sep 09, 2019 1:17 am

Re: Raspberry Pi 4 usb boot?

Sun Dec 22, 2019 6:47 pm

RonR wrote:
Sun Dec 22, 2019 9:43 am
usb-boot works equally well on the Raspberry Pi 1, 2, 3, and 4.
I'm pretty sure that has its own built-in assumptions which can be broken. For example if someone is trying to use the UEFI as a second-stage, then chaining to GRUB (there are things which can easily be done with GRUB which I rather doubt the Pi bootloader will ever be capable of).

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

Re: Raspberry Pi 4 usb boot?

Sun Dec 22, 2019 8:14 pm

Suima-no-Tatsugoroh wrote:
Sun Dec 22, 2019 9:33 am
Until Right NOW, I have never known that "The old program_usb_boot etc configurations have no effect on the RPi4.
Really? Because in the official documentation is says, Program USB host boot mode (Raspberry Pi 3A+ and 3B only).

https://www.raspberrypi.org/documentati ... des/msd.md
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?

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

Re: Raspberry Pi 4 usb boot?

Sun Dec 22, 2019 9:33 pm

HawaiianPi wrote:
Sun Dec 22, 2019 8:14 pm
Suima-no-Tatsugoroh wrote:
Sun Dec 22, 2019 9:33 am
Until Right NOW, I have never known that "The old program_usb_boot etc configurations have no effect on the RPi4.
Really? Because in the official documentation is says, Program USB host boot mode (Raspberry Pi 3A+ and 3B only).

https://www.raspberrypi.org/documentati ... des/msd.md
Which is wrong (as in, incomplete) because the Pi2Bv1.2 uses the same SoC as the Pi3A+ and Pi3B and--therefore--can have the bit set as well.

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

Re: Raspberry Pi 4 usb boot?

Thu Jan 02, 2020 12:13 pm

max44 wrote:
Thu Jan 02, 2020 12:01 pm
This is a lsusb dump of all my connected USB devices. I have bolded the line with the USB bridge device. We can see that the chipset is ASM1153E
I'm struggling to see the purpose of your post...
And is there a reason to use purplish/red text? Looks quite aggressive to me.
Also can't see any bold text.

Technocolour
Posts: 138
Joined: Thu Jul 04, 2019 6:23 pm

Re: Raspberry Pi 4 usb boot?

Thu Jan 02, 2020 12:45 pm

Reading below made this post seem redundant.

So *shrug*.
Last edited by Technocolour on Thu Jan 02, 2020 12:54 pm, edited 1 time in total.

trejan
Posts: 3020
Joined: Tue Jul 02, 2019 2:28 pm

Re: Raspberry Pi 4 usb boot?

Thu Jan 02, 2020 12:47 pm

It doesn't make sense because max44 is a spam bot. They scraped text from a Pi blog and inserted a spam link for Office 365.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27461
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi 4 usb boot?

Thu Jan 02, 2020 12:53 pm

DirkS wrote:
Thu Jan 02, 2020 12:13 pm
max44 wrote:
Thu Jan 02, 2020 12:01 pm
This is a lsusb dump of all my connected USB devices. I have bolded the line with the USB bridge device. We can see that the chipset is ASM1153E
I'm struggling to see the purpose of your post...
And is there a reason to use purplish/red text? Looks quite aggressive to me.
Also can't see any bold text.
I think the odd tone of red is actually to disguise a spam link. Not sure though, because this users others posts don't have similar spam - maybe they will turn up later? But will delete this one anyway.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

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

Re: Raspberry Pi 4 usb boot?

Thu Jan 02, 2020 12:54 pm

jamesh wrote:
Thu Jan 02, 2020 12:53 pm
But will delete this one anyway.
already done so... :mrgreen:

glyndon
Posts: 1
Joined: Mon Dec 30, 2013 4:41 pm

Re: Raspberry Pi 4 usb boot?

Thu Jan 02, 2020 8:23 pm

I'll offer a possible answer Jamesh's question:
It may be because lots of people have for years known that they need to use the program_usb_boot_mode trick (I'm one of them), and so when setting up a new machine will reach for an SDCard with that flag already set (I did), without going back to re-read the instructions (I didn't) they remember using to set it years ago.
Or, perhaps they searched for the issue and found an outdated copy of the instructions that did not include the warning.
So it's not necessarily a problem with the current doc not being clear (I'm sure it is), it may be that users don't go re-read it every time they get a new machine because they have an expectation of retro-compatibility in new versions of the board. Perhaps making a bit more publicity (I'm sure there was plenty, but it may not have reached enough people) about the changes as new versions come out would help prevent surprises like this one.
jamesh wrote:
Sat Jun 29, 2019 8:43 am
Since I look after the documents repo, I'd like to know why you followed those instructions given the bolded warning at the top says which devices they are valid for. Something needs to be clearer, just like to know what.

phillytim
Posts: 12
Joined: Tue Oct 10, 2017 11:30 am

Re: Raspberry Pi 4 usb boot?

Tue Jan 07, 2020 7:57 pm

I mean, I'm just so surprised that the RP4 can't inherently boot from USB as an organic/standard available method - especially after all the finangling and maturity that we eventually experienced with the RP3B.

I mean no disrespect, but it really is 2020 and it is known how so many wish/expect to boot from USB and get away from SD cards (which a couple of mine have died in the jaw of my previous Raspberry Pis).

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27461
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry Pi 4 usb boot?

Tue Jan 07, 2020 8:11 pm

phillytim wrote:
Tue Jan 07, 2020 7:57 pm
I mean, I'm just so surprised that the RP4 can't inherently boot from USB as an organic/standard available method - especially after all the finangling and maturity that we eventually experienced with the RP3B.

I mean no disrespect, but it really is 2020 and it is known how so many wish/expect to boot from USB and get away from SD cards (which a couple of mine have died in the jaw of my previous Raspberry Pis).
You might MEAN no disrespect....so...me neither, but...

Have you read ANY of this thread? It's been fully explained. If we had waited for this to be ready before launching, the PI4 would not even have been released yet!!!

TBH, it clearly a minor use case, SD cards work fine for the millions of Pi4's out there and there's a simple workaround if you want to redirect boot to a USB device via an SD card. No write load on the card, so it's not going to fail.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

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

Re: Raspberry Pi 4 usb boot?

Tue Jan 07, 2020 10:39 pm

phillytim wrote:
Tue Jan 07, 2020 7:57 pm
it is known how so many wish/expect to boot from USB and get away from SD cards (which a couple of mine have died in the jaw of my previous Raspberry Pis).

Surely you've already seen this, but just in case: Running Raspbian from USB Devices : Made Easy

The SD card is not written to when booting a USB device. Consequently, SD card failures are extremely rare.

Return to “General discussion”