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

Re: Raspberry Pi 4 usb boot?

Thu Jan 30, 2020 11:54 pm

I netboot everything, which I reckon would solve the problems 90% people want to solve with USB boot. You can trivially setup another machine -- another Pi, even -- to respond to DHCP and TFTP, with a bit of NFS, and the problem simply goes away. Most people have the kit, if not the knowhow.

Either way, lack of USB boot shouldn't stop you buying one of these fantastic boards.

ejolson
Posts: 4454
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 12:34 am

dickon wrote:
Thu Jan 30, 2020 11:26 pm
adamreisnz wrote:
Thu Jan 30, 2020 11:21 pm
Persisting with your obnoxious attitude after various people point out this obnoxious attitude only reflects on your own character.
99% don't give a damn about this feature, and you didn't do your due diligence. In what way is that jamesh's problem?
As demonstrated by the actors of almost all vaudeville shows, there is nothing so bad that it can't be made worse.

In the present case, my reading of the situation is that USB boot is high priority, being worked on as fast as possible and further encouragement to work faster is unneeded. I suspect the tools for writing VC6 boot loaders are simply much more difficult to debug than the Python scripts of a sluggish bootloader.

Will any of the work arounds mentioned suit your needs?

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

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 12:55 am

ejolson wrote:
Fri Jan 31, 2020 12:34 am
In the present case, my reading of the situation is that USB boot is high priority, being worked on as fast as possible and further encouragement to work faster is unneeded. I suspect the tools for writing VC6 boot loaders are simply much more difficult to debug than the Python scripts of a sluggish bootloader.
I'm not so sure about that... It looks like there is at least some work in queue ahead of USB booting (in the sense of urgency). However, that doesn't bother me. Between "it'll get done when it gets done" and "I'd rather it be done right than done soon", I'm not going to get agitated about it. There are, as everyone who has been paying attention knows, workarounds. Most of this thread is really just a tempest in a teapot...and a pretty small tempest in a not very big teapot.

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

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 8:02 am

ejolson wrote:
Fri Jan 31, 2020 12:34 am
dickon wrote:
Thu Jan 30, 2020 11:26 pm
adamreisnz wrote:
Thu Jan 30, 2020 11:21 pm
Persisting with your obnoxious attitude after various people point out this obnoxious attitude only reflects on your own character.
99% don't give a damn about this feature, and you didn't do your due diligence. In what way is that jamesh's problem?
As demonstrated by the actors of almost all vaudeville shows, there is nothing so bad that it can't be made worse.

In the present case, my reading of the situation is that USB boot is high priority, being worked on as fast as possible and further encouragement to work faster is unneeded. I suspect the tools for writing VC6 boot loaders are simply much more difficult to debug than the Python scripts of a sluggish bootloader.

Will any of the work arounds mentioned suit your needs?
Fairly high, not highest. Nothing to do with tools, but complexity and priority. Our vc6 debugger is very good.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

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

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 9:04 am

W. H. Heydt wrote:
Fri Jan 31, 2020 12:55 am
Most of this thread is really just a tempest in a teapot...and a pretty small tempest in a not very big teapot.
Well said.

timg236
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 306
Joined: Thu Jun 21, 2018 4:30 pm

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 11:11 am

jamesh wrote:
Fri Jan 31, 2020 8:02 am
ejolson wrote:
Fri Jan 31, 2020 12:34 am
dickon wrote:
Thu Jan 30, 2020 11:26 pm


99% don't give a damn about this feature, and you didn't do your due diligence. In what way is that jamesh's problem?
As demonstrated by the actors of almost all vaudeville shows, there is nothing so bad that it can't be made worse.

In the present case, my reading of the situation is that USB boot is high priority, being worked on as fast as possible and further encouragement to work faster is unneeded. I suspect the tools for writing VC6 boot loaders are simply much more difficult to debug than the Python scripts of a sluggish bootloader.

Will any of the work arounds mentioned suit your needs?
Fairly high, not highest. Nothing to do with tools, but complexity and priority. Our vc6 debugger is very good.
Indeed, features like DVFS get a much higher priority because they benefit every user where as USB boot is relatively niche. Network boot gets a higher priority because you need that for CI / cloud installations. Other features like rpi-eeprom and VL805 updates also get a higher priority for the same reasons.
USB boot is being worked on but had to be mostly written again from scratch because it's now an XHCI USB 3.0 controller accessed via PCIe.

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

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 1:09 pm

W. H. Heydt wrote:
Fri Jan 31, 2020 12:55 am
Most of this thread is really just a tempest in a teapot...and a pretty small tempest in a not very big teapot.
Given that one can 'boot from USB' via an SD Card, which will no longer be needed once direct booting becomes available; I don't see it as much of an issue at all. It's not perfect, an annoyance, but it's a minor inconvenience, and for most people unlikely to be a show-stopper.

For those who deem it is, c'est la vie, they will have to go on as if the Pi 4B doesn't exist until it does support what they need.

croft
Posts: 54
Joined: Fri Dec 13, 2019 4:58 pm

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 1:17 pm

hi
will it be announced that it has been made available

thanks
croft

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

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 1:48 pm

Just curious, but are there any plans to impliment USB boot on the 4B via the USB C connector?

If memory serves, that's the old USB hardware so I'd expect the work needed to be less than that needed for the USB 3 chipset. Probably still non-trivial though.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

GlowInTheDark
Posts: 390
Joined: Sat Nov 09, 2019 12:14 pm

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 1:51 pm

Given that one can 'boot from USB' via an SD Card, which will no longer be needed once direct booting becomes available
Perhaps not "needed", but still preferable.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

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

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 2:17 pm

croft wrote:
Fri Jan 31, 2020 1:17 pm
hi
will it be announced that it has been made available

thanks
croft
Yes, on here, and probably a blog post as well.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

mattmiller
Posts: 2186
Joined: Thu Feb 05, 2015 11:25 pm

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 5:48 pm

Just curious, but are there any plans to impliment USB boot on the 4B via the USB C connector?
But how would you power the Pi, dear Henry, dear Henry.... :)

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

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 5:52 pm

mattmiller wrote:
Fri Jan 31, 2020 5:48 pm
Just curious, but are there any plans to impliment USB boot on the 4B via the USB C connector?
But how would you power the Pi, dear Henry, dear Henry.... :)
GPIO header or the test points on the underside.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

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

Re: Raspberry Pi 4 usb boot?

Fri Jan 31, 2020 6:02 pm

thagrol wrote:
Fri Jan 31, 2020 5:52 pm
mattmiller wrote:
Fri Jan 31, 2020 5:48 pm
Just curious, but are there any plans to impliment USB boot on the 4B via the USB C connector?
But how would you power the Pi, dear Henry, dear Henry.... :)
GPIO header or the test points on the underside.
Or a split USB lead.

lcdvt
Posts: 1
Joined: Tue Mar 03, 2020 9:52 pm

Re: Raspberry Pi 4 usb boot?

Tue Mar 03, 2020 10:24 pm

More then three months ago I’ve invested in my little project and was really surprised that USB boot wasn’t supported on the PI4 from it’s release. Since then I’ve read that USB boot was a high priority and that it was being worked on, so I’ve put my project in the closet. Now after month’s checking back I’m really surprised again that there seems to be a discussion if it’s really that high of a priority?
Surly many people have also bought a similar gear as I did and expected to be able to USB boot?

Pi4 X825 2.5 inch SATA HDD/SSD Board
Pi4 X735 Power Management & Auto Cooling
Pi4 Metal case for the X825 & X735
Pi4 Embedded Armor Aluminium Heatsink
Transcend SSD230S 256GB, 2.5"
Aeotec USB Z-Stick - Z-Wave Plus

Hope that to hear some better news soon.

ejolson
Posts: 4454
Joined: Tue Mar 18, 2014 11:47 am

Re: Raspberry Pi 4 usb boot?

Wed Mar 04, 2020 1:57 am

lcdvt wrote:
Tue Mar 03, 2020 10:24 pm
More then three months ago I’ve invested in my little project and was really surprised that USB boot wasn’t supported on the PI4 from it’s release. Since then I’ve read that USB boot was a high priority and that it was being worked on, so I’ve put my project in the closet. Now after month’s checking back I’m really surprised again that there seems to be a discussion if it’s really that high of a priority?
Surly many people have also bought a similar gear as I did and expected to be able to USB boot?

Pi4 X825 2.5 inch SATA HDD/SSD Board
Pi4 X735 Power Management & Auto Cooling
Pi4 Metal case for the X825 & X735
Pi4 Embedded Armor Aluminium Heatsink
Transcend SSD230S 256GB, 2.5"
Aeotec USB Z-Stick - Z-Wave Plus

Hope that to hear some better news soon.
Welcome to the forum!

I also put off a project thinking that USB boot would soon be included. Oh well, I guess there are work arounds and at this point it would appear no advantage comes from waiting any further.

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

Re: Raspberry Pi 4 usb boot?

Wed Mar 04, 2020 7:58 am

lcdvt wrote:
Tue Mar 03, 2020 10:24 pm
More then three months ago I’ve invested in my little project and was really surprised that USB boot wasn’t supported on the PI4 from it’s release. Since then I’ve read that USB boot was a high priority and that it was being worked on, so I’ve put my project in the closet. Now after month’s checking back I’m really surprised again that there seems to be a discussion if it’s really that high of a priority?
Surly many people have also bought a similar gear as I did and expected to be able to USB boot?

Pi4 X825 2.5 inch SATA HDD/SSD Board
Pi4 X735 Power Management & Auto Cooling
Pi4 Metal case for the X825 & X735
Pi4 Embedded Armor Aluminium Heatsink
Transcend SSD230S 256GB, 2.5"
Aeotec USB Z-Stick - Z-Wave Plus

Hope that to hear some better news soon.
Yes, many people want it, but not compared with number of pi4s sold. We make one every 3.5 seconds.

Its under development.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

timg236
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 306
Joined: Thu Jun 21, 2018 4:30 pm

Re: Raspberry Pi 4 usb boot?

Wed Mar 04, 2020 8:36 am

lcdvt wrote:
Tue Mar 03, 2020 10:24 pm
More then three months ago I’ve invested in my little project and was really surprised that USB boot wasn’t supported on the PI4 from it’s release. Since then I’ve read that USB boot was a high priority and that it was being worked on, so I’ve put my project in the closet. Now after month’s checking back I’m really surprised again that there seems to be a discussion if it’s really that high of a priority?
Surly many people have also bought a similar gear as I did and expected to be able to USB boot?

Pi4 X825 2.5 inch SATA HDD/SSD Board
Pi4 X735 Power Management & Auto Cooling
Pi4 Metal case for the X825 & X735
Pi4 Embedded Armor Aluminium Heatsink
Transcend SSD230S 256GB, 2.5"
Aeotec USB Z-Stick - Z-Wave Plus

Hope that to hear some better news soon.
Good news, you can use USB as your root file-system and just use the sd-card as a read-only boot partition . It's very simple and a trivial search of the forums reveals numerous posts explaining how to do this.

User avatar
TheMindVirus
Posts: 112
Joined: Mon Jul 29, 2019 12:38 am
Location: Cornwall, UK

Re: Raspberry Pi 4 usb boot?

Wed Mar 04, 2020 12:08 pm

timg236 wrote:Good news, you can use USB as your root file-system and just use the sd-card as a read-only boot partition . It's very simple and a trivial search of the forums reveals numerous posts explaining how to do this.
So would it for instance be possible to flash NOOBS onto the SD card and select an OS installed on a USB stick?

https://community.wd.com/t/noobs-raspbe ... all/204909
Hi, we worked with the RPi Foundation to integrate “USB drive awareness” in their official NOOBS releases. If a USB drive is connected when running the NOOBS installer, it presents the option to designate the USB drive as the installation target device (it’ll show up as “sda…” if you have one USB drive attached, for example). Installing on the USB drive versus SDcard provides more space and typically faster writes and better protection against power-loss events (at least this is the case with WD PiDrives).
Does NOOBS search for USB sticks to boot from on a Pi4 or is there a different method we should be aware of?
HawaiianPi wrote:You can boot from a USB drive the old school way, by putting /boot on an SD card and / (the root filesystem) on the USB drive.
Last edited by TheMindVirus on Wed Mar 04, 2020 12:44 pm, edited 1 time in total.
Alastair Cota
Embedded Firmware Developer
[ERR]: Sense of Humour Failure

User avatar
procount
Posts: 2037
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Raspberry Pi 4 usb boot?

Wed Mar 04, 2020 12:34 pm

TheMindVirus wrote:
Wed Mar 04, 2020 12:08 pm
So would it for instance be possible to flash NOOBS onto the SD card and select an OS installed on a USB stick?
Yes.
If you flash NOOBS (or PINN) onto the SD card, you have the choice to install any OSes to the SD card OR to a USB stick.

If you choose the USB stick, the BOOT partitions of the OSes are still stored on the SD card; only the ROOTFS partitions are stored on the USB drive.
Note that NOOBS/PINN will still allocate all of the available USB drive space and share it amongst all the OS root partitions that you install.

If you flash NOOBS or PINN to a USB drive and install the OS to the USB drive, then both BOOT and ROOT partitions are stored on the USB drive. (This is only suitable for Pi models that support USB boot. It should work the same on the Pi4 eventually when USB boot is supported )
TheMindVirus wrote:
Wed Mar 04, 2020 12:08 pm
Does NOOBS search for USB sticks to boot from on a Pi4 or is there a different method we should be aware of?
When booting NOOBS off an SD card with the OS (rootfs) stored on a USB stick, it uses PARTUUID references to find the rootfs. So it will find the correct USB stick to boot from even if you have many installed.
Note that since NOOBS installs all OSes in one go to a single drive, it is NOT possible (by default) to have a single SD card that selects OSes that are spread about multiple USB sticks. (If you want to do that you'll have to copy the root partitions to other USB sticks yourself and probably do some resizing with gparted or similar, and adjust PARTUUIDs accordingly. If the correct USB stick is not fitted for the selected OS, it should just wait until it is inserted, but I've not tried that).
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

JMKS
Posts: 6
Joined: Wed Feb 19, 2020 1:38 pm

Re: Raspberry Pi 4 usb boot?

Tue Mar 10, 2020 7:37 pm

Ah, so, after literally MONTHS during which a thought that hybrid SD/USB booting required some kind of overcomplicated 3rd-party tools (and also failing to do it once), I can confirm that simply choosing "/dev/sda" during installation with NOOBS yields what I was looking for (until full USB-boot will be possible).
May not be news for some, but definitely was news for me. It's that easy, and than you boot from SD but use USB drive as a main system drive.

I bought RPi4 in November, so it's been some time.

Now, a happy user of a 5TB 'little workstation' that is using about 10W of power :).

User avatar
procount
Posts: 2037
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Raspberry Pi 4 usb boot?

Tue Mar 10, 2020 10:17 pm

@JMKS -If you are only using NOOBS to achieve booting to USB, then you can create a file called 'autoboot.txt' on the NOOBS partition with the following line in it:

Code: Select all

boot_partition=6
This will avoid booting into NOOBS and will start your OS as fast as if NOOBS wasn't there.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

cleverca22
Posts: 325
Joined: Sat Aug 18, 2012 2:33 pm

Re: Raspberry Pi 4 usb boot?

Wed Mar 11, 2020 6:55 am

thagrol wrote:
Fri Jan 31, 2020 1:48 pm
Just curious, but are there any plans to impliment USB boot on the 4B via the USB C connector?

If memory serves, that's the old USB hardware so I'd expect the work needed to be less than that needed for the USB 3 chipset. Probably still non-trivial though.
from what i know of the system, that should totally be possible

the code for the old `only bootcode.bin on sd` mode can be popped into the SPI flash image, and then the `start.elf` code for loading more stuff can be added to the `start4.elf` file

and yeah, you would need a usbc->usb-host adapter, to be able to plug a device into there, and you would be limited to usb2.0 speeds, and have to power the pi via other means

JMKS
Posts: 6
Joined: Wed Feb 19, 2020 1:38 pm

Re: Raspberry Pi 4 usb boot?

Fri Mar 13, 2020 12:42 am

procount wrote:
Tue Mar 10, 2020 10:17 pm
@JMKS -If you are only using NOOBS to achieve booting to USB, then you can create a file called 'autoboot.txt' on the NOOBS partition with the following line in it:

Code: Select all

boot_partition=6
This will avoid booting into NOOBS and will start your OS as fast as if NOOBS wasn't there.
After installing to /dev/sda, the boot process seems quite fast (althought not as fast as it was on RPi3 with only USB connected).
I thought that after installing to USB, both SD & USB HDD are set up for only that hybrid boot option.

Are you telling me that there is some other stuff going on via NOOBS, before it decides to boot via USB storage? And I can circumvent by what you writed?

User avatar
procount
Posts: 2037
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Raspberry Pi 4 usb boot?

Fri Mar 13, 2020 1:14 am

Booting from a Pi4 is a little slower than a pi3b anyway. I think this is due to loading bootcode.bin from eeprom.
Generally starting the boot from SD card is faster than a USB boot because the GPU has to wait for an SD card to timeout before looking for USB boot. But operationally, running off USB may be quicker, especially if you use ssd.

The autoboot.txt file is read by the firmware before it even boots NOOBS. If it is present, it tells the firmware which partition to boot from. So in this case NOOBS doesn't get run at all and so you are back to native boot speed without any NOOBS timeouts.
...before it decides to boot via USB storage?
Being pedantic, this is not booting from USB storage, but a hybrid version that still boots the firmware and off the SD card, then runs the main rootfs from USB.

If you want to use NOOBS again, you will first need to delete this file.

(Edited for clarity)
Last edited by procount on Fri Mar 13, 2020 11:17 am, edited 2 times in total.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Return to “General discussion”