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

Re: Raspberry Pi 4 usb boot?

Thu Oct 31, 2019 10:57 am

LTolledo wrote:
Thu Oct 31, 2019 10:17 am
Hey!

Glad you two finally achieved your "interim goal" without further "pain" and "frustrations"... :D

our thanks to RonR for lovingly maintaining and updating the script....

....and of course ..... lets be a little more patient until the procedure for the "ultimate goal" is available....in due time..... ;)
Bootloader guy is now working fully on USB boot. No timescales as yet.
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."

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

Re: Raspberry Pi 4 usb boot?

Thu Oct 31, 2019 11:21 am

jamesh wrote:
Thu Oct 31, 2019 10:57 am
Bootloader guy is now working fully on USB boot. No timescales as yet.
Good to hear. I'll be glad when I can get my Pi 4B4 booting from its SSD :)

But I'm prepared to wait.

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

Re: Raspberry Pi 4 usb boot?

Thu Oct 31, 2019 11:52 am

jamesh wrote: Bootloader guy is now working fully on USB boot. No timescales as yet.
Great news! :o
Thanks! (and most specially to the Bootloader guy/team) :D
me in no rush too.... :mrgreen:

all systems running fine at the moment.... ;)
"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!"

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

Re: Raspberry Pi 4 usb boot?

Wed Nov 06, 2019 1:17 am

After my experience when I changed to the bootable SSD on my Pi 3B+, I think the only real advantage I will have when this facility is added to the Pi 4, is that loading pictures from my digital camera will not tie up a USB 3 port :-)
It is great that the Raspberry Pi is so flexible and the team so dedicated.
I haven't turned on another of my computers for two weeks now other than to print something, or simply to boot one of the computers, any of which performs an auto clean of my inkjet printers on boot.

On the odd occasions when I had another computer running, I am surprised by how sluggish the more powerful computers are compared with the Pi 4, when doing the mundane tasks like browsing or word processing now that the Pi 4 is running on SSD.

I understand that the boot system differs from that in the Pi 3B+.
Is it likely that the behaviour will end up being similar to that of the Pi 3B+? Once SSD boot is enabled, if the Pi detects a bootable microSD, it will default to booting from that, but of there is a non-bootable microSD, it will just mount it as storage?
Remember, nobody is listening to you
until you fart ...

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

Re: Raspberry Pi 4 usb boot?

Wed Nov 06, 2019 9:37 am

RossDv8 wrote:
Wed Nov 06, 2019 1:17 am
Is it likely that the behaviour will end up being similar to that of the Pi 3B+? Once SSD boot is enabled, if the Pi detects a bootable microSD, it will default to booting from that, but of there is a non-bootable microSD, it will just mount it as storage?
As the Pi 4B has an eeprom with the initial bootcode in, I suspect at some point the boot order will be configurable.

User avatar
Gavinmc42
Posts: 4339
Joined: Wed Aug 28, 2013 3:31 am

Re: Raspberry Pi 4 usb boot?

Thu Nov 07, 2019 2:09 am

As the Pi 4B has an eeprom with the initial bootcode in, I suspect at some point the boot order will be configurable.
That would be nice, the uSD timeout adds seconds when booting from USB.
Is that also going to be an option for netbooting?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Raspberry Pi 4 usb boot?

Thu Nov 07, 2019 2:37 am

Gavinmc42 wrote:
Thu Nov 07, 2019 2:09 am
As the Pi 4B has an eeprom with the initial bootcode in, I suspect at some point the boot order will be configurable.
That would be nice, the uSD timeout adds seconds when booting from USB.
Is that also going to be an option for netbooting?
The boot order is already configurable, for the beta bootloader with netboot built in:

Code: Select all

BOOT_ORDER=0x21
will try SD card first, then netboot. Whereas:

Code: Select all

BOOT_ORDER=0x12
Will try netboot, then SD card. Alternatively:

Code: Select all

BOOT_ORDER=0x1
will try SD card only. And:

Code: Select all

BOOT_ORDER=0x2
will try netboot only.

There's also SD_BOOT_MAX_RETRIES and NET_BOOT_MAX_RETRIES to configure things.

See https://github.com/raspberrypi/rpi-eepr ... ot_beta.md

Presumably when USB boot arrives it will be 0x4, but that's just a guess.

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

Re: Raspberry Pi 4 usb boot?

Thu Nov 07, 2019 2:43 am

jamesh wrote:
Thu Oct 31, 2019 10:57 am
Bootloader guy is now working fully on USB boot. No timescales as yet.
I'm now picturing someone with "bootloader guy" on their T-shirt :D
I may have taken that too far.

User avatar
Gavinmc42
Posts: 4339
Joined: Wed Aug 28, 2013 3:31 am

Re: Raspberry Pi 4 usb boot?

Thu Nov 07, 2019 2:59 am

I'm now picturing someone with "bootloader guy" on their T-shirt
Depends on how long he takes ;)
Could be free beers or boos if he shows up wearing that T shirt :lol:

Sounds like netbooting is now worth playing around with, had not been paying enough attention.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Raspberry Pi 4 usb boot?

Fri Nov 08, 2019 11:37 am

Gavinmc42 wrote:
Thu Nov 07, 2019 2:59 am
Sounds like netbooting is now worth playing around with, had not been paying enough attention.
It's only available on the beta firmware - see the above linked github repo for details.

User avatar
Gavinmc42
Posts: 4339
Joined: Wed Aug 28, 2013 3:31 am

Re: Raspberry Pi 4 usb boot?

Sat Nov 09, 2019 1:32 am

It's only available on the beta firmware - see the above linked github repo for details.
Yep, understood, rpi-eeprom-update.
Now if only I had a USB booting PI4 I could use as a server to test the net booting ones ;)

Not sure who wrote the code for the Pi3 USB boot but it works well with my USB3/SSD dock.
Give them a few beers.
Same dock will halt my Pi4 when it boots from an uSD, it continues when I unplug.

Anyway, looks like my netboot testing will need to use a Pi3 with SSD at the moment.

USB3/SATA dock details, is it a quirky one?

Code: Select all

[ 2433.589953] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 2433.611671] usb 2-1: New USB device found, idVendor=152d, idProduct=0578, bcdDevice= 1.00
[ 2433.611682] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2433.611687] usb 2-1: Product: USB3.0 HDD DOCK
[ 2433.611691] usb 2-1: Manufacturer: JMicron
[ 2433.611696] usb 2-1: SerialNumber: 0000AB123519
[ 2433.635627] scsi host0: uas
[ 2433.636911] scsi 0:0:0:0: Direct-Access     Crucial_ CT240M500SSD1    8101 PQ: 0 ANSI: 6
[ 2433.639059] sd 0:0:0:0: [sda] 468862128 512-byte logical blocks: (240 GB/224 GiB)
[ 2433.639068] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 2433.639339] sd 0:0:0:0: [sda] Write Protect is off
[ 2433.639345] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[ 2433.639869] sd 0:0:0:0: [sda] Disabling FUA
[ 2433.639876] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2433.640728] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

jj_0
Posts: 110
Joined: Wed Jul 11, 2012 7:07 am

Re: Raspberry Pi 4 usb boot?

Sun Nov 10, 2019 10:07 am

Gavinmc42 wrote:
Sat Nov 09, 2019 1:32 am
It's only available on the beta firmware - see the above linked github repo for details.
Yep, understood, rpi-eeprom-update.
Now if only I had a USB booting PI4 I could use as a server to test the net booting ones ;)

Not sure who wrote the code for the Pi3 USB boot but it works well with my USB3/SSD dock.
Give them a few beers.
Same dock will halt my Pi4 when it boots from an uSD, it continues when I unplug.

Anyway, looks like my netboot testing will need to use a Pi3 with SSD at the moment.

USB3/SATA dock details, is it a quirky one?

Code: Select all

[ 2433.589953] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 2433.611671] usb 2-1: New USB device found, idVendor=152d, idProduct=0578, bcdDevice= 1.00
[ 2433.611682] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2433.611687] usb 2-1: Product: USB3.0 HDD DOCK
[ 2433.611691] usb 2-1: Manufacturer: JMicron
[ 2433.611696] usb 2-1: SerialNumber: 0000AB123519
[ 2433.635627] scsi host0: uas
[ 2433.636911] scsi 0:0:0:0: Direct-Access     Crucial_ CT240M500SSD1    8101 PQ: 0 ANSI: 6
[ 2433.639059] sd 0:0:0:0: [sda] 468862128 512-byte logical blocks: (240 GB/224 GiB)
[ 2433.639068] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 2433.639339] sd 0:0:0:0: [sda] Write Protect is off
[ 2433.639345] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[ 2433.639869] sd 0:0:0:0: [sda] Disabling FUA
[ 2433.639876] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2433.640728] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
The reboot problem is likely due to power backfeed from your USB3/SSD dock to the Pi's USB3 port - assuming you power it externally of course. The easiest way to fix that is to connect it via an USB3 hub that does not backfeed power to the USB3 port. The hard part is finding such a USB3 hub. The TP-Link UH400 and UH700 USB3 hubs work for me. Another way to fix it is to use an USB3 cable with the 5V wire cut.

As to needing quirks, the best way to find out is to do some tests, if you get 'uas' error messages in the log when copying large files to the SSD then you need to disable uas or maybe upgrade the firmware (at your own risk).

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

Re: Raspberry Pi 4 usb boot?

Sun Nov 10, 2019 2:21 pm

If the boot-loader will be revised, will it be able to boot from an exFAT partition? All previous RPI boot system were only capable of booting from a FAT32 partition, but with larger than 32GB SD-Cards getting cheaper all the time more and more cards will be formatted exFAT. I know that many people no longer use NOOBS, but wouldn't it be nice if exFAT booting could be implemented?

if booting from exFAT means we need to pay MS licences, then forget that I asked.

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

Re: Raspberry Pi 4 usb boot?

Sun Nov 10, 2019 2:26 pm

mahjongg wrote:
Sun Nov 10, 2019 2:21 pm
if booting from exFAT means we need to pay MS licences, then forget that I asked.
Microsoft have open source'd FAT and exFAT. No fees required.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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

Re: Raspberry Pi 4 usb boot?

Sun Nov 10, 2019 3:34 pm

It'll be the cost of writing an exFAT module for the VPU from scratch. The one in the Linux kernel can't be used as it is GPL. The initial patch for it was nearly 11,000 lines so it is a lot more complicated than FAT.

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

Re: Raspberry Pi 4 usb boot?

Sun Nov 10, 2019 3:55 pm

Two minutes of Googling found http://elm-chan.org/fsw/ff/00index_e.html which looks as if it'll do the trick, isn't GPL, and looks to be current. Bonus: designed for embedded systems, so minimally RO compiles to ~4k ARMv7, and requires a trivial set of IO primitives.

I'm sure there will be others out there. No need to write from scratch.

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

Re: Raspberry Pi 4 usb boot?

Sun Nov 10, 2019 4:11 pm

dickon wrote:
Sun Nov 10, 2019 3:55 pm
Two minutes of Googling found http://elm-chan.org/fsw/ff/00index_e.html which looks as if it'll do the trick, isn't GPL, and looks to be current. Bonus: designed for embedded systems, so minimally RO compiles to ~4k ARMv7, and requires a trivial set of IO primitives.
Ah nice. I didn't know FatFs had been updated. I've used it before in a microcontroller and its a very handy library.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6194
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Raspberry Pi 4 usb boot?

Mon Nov 11, 2019 2:01 pm

AFAIK, there are no plans to support exFAT.

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Raspberry Pi 4 usb boot?

Mon Nov 11, 2019 3:50 pm

mahjongg wrote:
Sun Nov 10, 2019 2:21 pm
If the boot-loader will be revised, will it be able to boot from an exFAT partition? All previous RPI boot system were only capable of booting from a FAT32 partition, but with larger than 32GB SD-Cards getting cheaper all the time more and more cards will be formatted exFAT. I know that many people no longer use NOOBS, but wouldn't it be nice if exFAT booting could be implemented?

if booting from exFAT means we need to pay MS licences, then forget that I asked.
Surely the size of the SD card it irrelevant ? It's only the size of the boot partition that matters, and since that is quite small there is no need to support exFAT.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

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

Re: Raspberry Pi 4 usb boot?

Mon Nov 11, 2019 4:32 pm

PeterO wrote:
Mon Nov 11, 2019 3:50 pm
Surely the size of the SD card is irrelevant ? It's only the size of the boot partition that matters, and since that is quite small there is no need to support exFAT.
This is very true.

However, the instructions for NOOBS (since it was written when SD cards were all relatively small) state: "Format an SD card that is 8GB or greater in size as FAT32", which was ok when cards were small, but can cause issues now with SD cards >=64GB, as we know.

Actually, NOOBS only requires the first partition to be formatted as FAT32, and this need only be big enough to hold the NOOBS installation files. So you are absolutely right, but creating an initial boot partition of the correct size and then formatting it as FAT32 suddenly becomes a none-newbie experience.

Now that Etcher is available, my solution was to create an Etcher image for pinn-lite, which makes it as easy to install as any other OS, and avoids all the issues of large SD cards, special FAT32 formatting tools, and issues with SD cards not being partitioned properly with an MBR.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

User avatar
PeterO
Posts: 5623
Joined: Sun Jul 22, 2012 4:14 pm

Re: Raspberry Pi 4 usb boot?

Mon Nov 11, 2019 5:48 pm

procount wrote:
Mon Nov 11, 2019 4:32 pm
Actually, NOOBS only requires the first partition to be formatted as FAT32, and this need only be big enough to hold the NOOBS installation files. So you are absolutely right, but creating an initial boot partition of the correct size and then formatting it as FAT32 suddenly becomes a none-newbie experience.
Ah, I had missed the NOOBS angle. I've never used it so I don't know how it works.
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

vintozver
Posts: 32
Joined: Thu Jun 01, 2017 2:16 am
Location: Bellevue, WA, USA

Re: Raspberry Pi 4 usb boot?

Mon Nov 11, 2019 11:50 pm

trejan wrote:
Sun Nov 10, 2019 3:34 pm
It'll be the cost of writing an exFAT module for the VPU from scratch. The one in the Linux kernel can't be used as it is GPL. The initial patch for it was nearly 11,000 lines so it is a lot more complicated than FAT.
I don't see the point. boot partition is for boot. Just slice out the partition of the size you need.
I would rather ask for the GPT support ...

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

Re: Raspberry Pi 4 usb boot?

Tue Nov 12, 2019 1:11 am

vintozver wrote:
Mon Nov 11, 2019 11:50 pm
I don't see the point. boot partition is for boot. Just slice out the partition of the size you need.
As procount mentioned above, it would be a good addition for NOOBS which is installed by extracting the contents of the zip into a FAT32 formatted SD card. The FAT32 requirement means needing to run a third party formatting tool which isn't very noob friendly.

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

Re: Raspberry Pi 4 usb boot?

Tue Nov 12, 2019 8:49 am

Sorry, I may not have been clear in my opinion.

I am not advocating adding exFAT as a boot option.
I was trying to point out WHY current instructions for installing NOOBS might make people think exFAT would be necessary now that large SD cards >= 64GB are more common.

But in fact, this is not needed. There are a couple of alternative options:

1. The noobs instructions could be modified to create a small recovery partition which can then be formatted as FAT32, instead of formatting the whole SD card. But this is not very newbie friendly, which is what NOOBS was all about.

2. Now that Etcher is here which makes writing images as easy as formatting/unzipping for newbies, NOOBS could be provided as an alternative image file, like pinn-lite.img.zip is.

Actually, requiring the whole SD card to be formatted as FAT32 first for NOOBS is wasteful in both time and SD writes, contributing to additional wear.

So NOOBS requirements can be made the same as any other OS (i.e. a small FAT32 partition). I think this is preferable to adding a load of exFAT bloat to the bootloader, which I'm sure RPF engineers won't be doing.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

jj_0
Posts: 110
Joined: Wed Jul 11, 2012 7:07 am

Re: Raspberry Pi 4 usb boot?

Tue Nov 12, 2019 9:40 am

procount wrote:
Tue Nov 12, 2019 8:49 am
2. Now that Etcher is here which makes writing images as easy as formatting/unzipping for newbies, NOOBS could be provided as an alternative image file, like pinn-lite.img.zip is.
Yes, but at the moment Etcher is only installable on the Pi by getting the .deb package directly for @futurejones's github. This is also not easy for noobs. It might be easier if in addition of providing an image file the NOOBS instructions included installing gnome-disks. The benefit of this is that gnome-disks is part of the Raspbian distribution so can be installed via apt or via 'Add/ Remove Software' and also is maintained/updated.

Return to “General discussion”