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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Mon Jun 08, 2020 1:42 am

tofflock wrote:
Mon Jun 08, 2020 12:31 am
An "interesting" side effect of releasing the SD socket for general use.

Now it's possible to have both boot & root NOT on an SD card, that frees up the SD card slot for other uses.

Buster will auto-mount an SD card, when it's inserted, by default - providing it has one or more acceptable file systems configured.
Well...so long as you don't get sufficiently annoyed with the activity light constantly flashing because the SD slot is being continually polled and turn the polling off.

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Mon Jun 08, 2020 3:01 am

An "interesting" side effect of releasing the SD socket for general use.

Now it's possible to have both boot & root NOT on an SD card, that frees up the SD card slot for other uses.

Buster will auto-mount an SD card, when it's inserted, by default - providing it has one or more acceptable file systems configured.

Well...so long as you don't get sufficiently annoyed with the activity light constantly flashing because the SD slot is being continually polled and turn the polling off.
Use the uSD slot for writing OS images?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Mon Jun 08, 2020 10:19 am

HawaiianPi wrote:
Sun Jun 07, 2020 8:10 am
LTolledo wrote:
Sun Jun 07, 2020 7:14 am
just to confirm.... I need to do this?

Code: Select all

sudo rpi-eeprom-update
to enable MSD boot?
No, you download the beta EEPROM recovery and make a recovery SD card to flash the boot-loader. Then it's recommended to start with a fresh Raspberry Pi OS on SD card and apt update/apt full-upgrade it (but I just did that with my current Raspbian Buster), after which you clone the SD card to a USB drive (SD Card Copier), and it should boot.

It's pretty simple now that you don't need to rpi-update or copy special *.elf & *.dat files any longer.

The command by itself just displays the current EEPROM information.

Code: Select all

$ sudo rpi-eeprom-update
BCM2711 detected
Dedicated VL805 EEPROM detected
BOOTLOADER: up-to-date
CURRENT: Wed 03 Jun 2020 12:53:47 PM UTC (1591188827)
 LATEST: Thu 16 Apr 2020 05:11:26 PM UTC (1587057086)
 FW DIR: /lib/firmware/raspberrypi/bootloader/stable
VL805: up-to-date
CURRENT: 000138a1
 LATEST: 000137ad
With additional options it will flash the EEPROM, or more accurately, it will place the needed files on the boot partition, and the flash will happen on the next boot. But the recovery SD card is probably simpler for most people (I flash mine manually because I alter a few config settings).

If you stick with the release kernel it's also quite stable, at least it has been for me (I did have some trouble with the rpi-update 5.4 kernel).

The "blue" Eluteng USB 3.0 to SATA-III adapter cable works with both UAS and TRIM (no quirks required).

I say, go for it! Test it first with a spare SD card and USB drive to get a feel for it if you are worried.
OK.. I might try your recommendation, this weekend (wish me luck? :D )

just to clarify once again.... if something goes wrong (that's a big "if") I can still revert back to the original bootloader.... correct?
"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!"

thatchunkylad198966
Posts: 449
Joined: Thu Jul 04, 2019 10:21 am
Location: UK, Birmingham

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Mon Jun 08, 2020 10:23 am

LTolledo wrote:
Mon Jun 08, 2020 10:19 am
just to clarify once again.... if something goes wrong (that's a big "if") I can still revert back to the original bootloader.... correct?
Yep, I used the beta eeprom, decided against it and reverted.
You're good.

Korsair
Posts: 4
Joined: Sun May 24, 2020 11:46 pm

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Mon Jun 08, 2020 3:19 pm

I’ve been booting from usb since 5-28 version. My pi is powered by Geekworm x735 so the usb-c connector is empty. Last night I attached the ssd to the usb-c port. Unfortunately, it did not boot. I reconnected to the usb 3 port and it boots correctly. Would you expect it to be able to boot from the usb-c port? Power is coming from the x735 power port 5v 4a.

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Mon Jun 08, 2020 3:36 pm

Korsair wrote:
Mon Jun 08, 2020 3:19 pm
I’ve been booting from usb since 5-28 version. My pi is powered by Geekworm x735 so the usb-c connector is empty. Last night I attached the ssd to the usb-c port. Unfortunately, it did not boot. I reconnected to the usb 3 port and it boots correctly. Would you expect it to be able to boot from the usb-c port? Power is coming from the x735 power port 5v 4a.
No that's not supported. That's a different USB controller (well two different ones actually), it would be limited to USB2 and realistically it's unlikely to be supported in future.

Korsair
Posts: 4
Joined: Sun May 24, 2020 11:46 pm

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Mon Jun 08, 2020 3:52 pm

timg236 wrote:
Mon Jun 08, 2020 3:36 pm
Korsair wrote:
Mon Jun 08, 2020 3:19 pm
I’ve been booting from usb since 5-28 version. My pi is powered by Geekworm x735 so the usb-c connector is empty. Last night I attached the ssd to the usb-c port. Unfortunately, it did not boot. I reconnected to the usb 3 port and it boots correctly. Would you expect it to be able to boot from the usb-c port? Power is coming from the x735 power port 5v 4a.
No that's not supported. That's a different USB controller (well two different ones actually), it would be limited to USB2 and realistically it's unlikely to be supported in future.
Thank you. That is the information I was looking for.

stefanu
Posts: 3
Joined: Mon Apr 20, 2020 11:48 am

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 10:57 am

Looking forward to "stable release".
I'm preparing my system for it:
what i did (like the page https://www.raspberrypi.org/documentati ... teeprom.md tells me)

sudo apt update
sudo apt full-upgrade
sudo apt install rpi-eeprom

already tried:
sudo rpi-eeprom-update (which tells me that the 2020-04-16 version is installed)

changed:
/etc/default/rpi-eeprom-update content from "critical" to "stable"

so, my guess is:
from the moment the bootloader eeprom goes to "stable"
I can do:
sudo rpi-eeprom-update

is this enough?

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 11:21 am

stefanu wrote:
Tue Jun 09, 2020 10:57 am
Looking forward to "stable release".
I'm preparing my system for it:
what i did (like the page https://www.raspberrypi.org/documentati ... teeprom.md tells me)

sudo apt update
sudo apt full-upgrade
sudo apt install rpi-eeprom

already tried:
sudo rpi-eeprom-update (which tells me that the 2020-04-16 version is installed)

changed:
/etc/default/rpi-eeprom-update content from "critical" to "stable"

so, my guess is:
from the moment the bootloader eeprom goes to "stable"
I can do:
sudo rpi-eeprom-update

is this enough?
That should be fine, although if BOOT_ORDER is already defined then when the "sudo rpi-eeprom-update -a" is run the current setting will be migrated which may or may not enable USB MSD boot.

There's a pending change to raspi-config which makes it easy to select either sd/network or sd/usb-boot

stefanu
Posts: 3
Joined: Mon Apr 20, 2020 11:48 am

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 11:37 am

timg236 wrote:
Tue Jun 09, 2020 11:21 am
stefanu wrote:
Tue Jun 09, 2020 10:57 am
Looking forward to "stable release".
I'm preparing my system for it:
what i did (like the page https://www.raspberrypi.org/documentati ... teeprom.md tells me)

sudo apt update
sudo apt full-upgrade
sudo apt install rpi-eeprom

already tried:
sudo rpi-eeprom-update (which tells me that the 2020-04-16 version is installed)

changed:
/etc/default/rpi-eeprom-update content from "critical" to "stable"

so, my guess is:
from the moment the bootloader eeprom goes to "stable"
I can do:
sudo rpi-eeprom-update

is this enough?
That should be fine, although if BOOT_ORDER is already defined then when the "sudo rpi-eeprom-update -a" is run the current setting will be migrated which may or may not enable USB MSD boot.

There's a pending change to raspi-config which makes it easy to select either sd/network or sd/usb-boot
Thx !

thatchunkylad198966
Posts: 449
Joined: Thu Jul 04, 2019 10:21 am
Location: UK, Birmingham

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 1:00 pm

Hi, sorry if this has been asked already...

What do I need to get usb-boot working without rpi-update?????

Kendek
Posts: 271
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 5:16 pm

thatchunkylad198966 wrote:
Tue Jun 09, 2020 1:00 pm
Hi, sorry if this has been asked already...

What do I need to get usb-boot working without rpi-update?????
pieeprom.bin + start4.elf + fixup4.dat

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 7:04 pm

LTolledo wrote:
Mon Jun 08, 2020 10:19 am
just to clarify once again.... if something goes wrong (that's a big "if") I can still revert back to the original bootloader.... correct?
The Raspberry Pi Imager has an option to make an EEPROM Recovery SD card which will restore the default bootloader.

stefanu wrote:
Tue Jun 09, 2020 10:57 am
so, my guess is:
from the moment the bootloader eeprom goes to "stable"
I can do:
sudo rpi-eeprom-update

is this enough?
As you said, that's a guess. It's still under development and things could change before the official release.

thatchunkylad198966 wrote:
Tue Jun 09, 2020 1:00 pm
Hi, sorry if this has been asked already...

What do I need to get usb-boot working without rpi-update?????
Kendek's reply is incorrect. Everything you need, except the beta boot loader, is available from apt now. You no longer need to use rpi-update or install and special *.elf and *.dat files. Just sudo apt update && sudo apt full-upgrade -y Raspberry Pi OS and flash the beta bootloader.
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?

Kendek
Posts: 271
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 7:30 pm

HawaiianPi wrote:
Tue Jun 09, 2020 7:04 pm
Kendek's reply is incorrect. Everything you need, except the beta boot loader, is available from apt now. You no longer need to use rpi-update or install and special *.elf and *.dat files. Just sudo apt update && sudo apt full-upgrade -y Raspberry Pi OS and flash the beta bootloader.
Except if you not using RPi OS but some other distribution. :)

thatchunkylad198966
Posts: 449
Joined: Thu Jul 04, 2019 10:21 am
Location: UK, Birmingham

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 8:36 pm

Spent all day playing with this and finally got it the way I want it.
It seems you can't reboot (you can shutdown -r now) and unplug/plug back in to get working if you're using two USB3 to SATA adapters.
I know, I tried and failed.

Right now I'm booted from an SSD via USB3 and it's fast, very fast.

Can't wait for this to hit stable! :D

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Tue Jun 09, 2020 9:31 pm

thatchunkylad198966 wrote:
Tue Jun 09, 2020 8:36 pm
It seems you can't reboot (you can shutdown -r now) and unplug/plug back in to get working if you're using two USB3 to SATA adapters.
Sure you can, or at least, I can...

Not sure what your problem is, but it is definitely possible.

thatchunkylad198966 wrote:
Tue Jun 09, 2020 8:36 pm
I know, I tried and failed.
Your failure doesn't apply to everyone.

Could be the USB-SATA adapters you are using.
Could be the SSD models you are using.
Could be your power supply, or some other detail of your system we are not aware of.

My 4B2 with the official PSU and dual Eluteng USB 3.0 to SATA-III adapter cables, connected to a Silicon Power A55 256GB SSD, and a Crucial MX500 500GB SSD, boots and reboots fine (either from the GUI menu, or sudo reboot [edit] also works with sudo shutdown -r now).

Kendek wrote:
Tue Jun 09, 2020 7:30 pm
Except if you not using RPi OS but some other distribution. :)
Well that's your problem (beta testing a new and unsupported feature on an unsupported OS). ;)
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?

thatchunkylad198966
Posts: 449
Joined: Thu Jul 04, 2019 10:21 am
Location: UK, Birmingham

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Wed Jun 10, 2020 12:37 am

@HawaiianPi

I'll buy another USB3 to SATA and test your theory. :D

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Wed Jun 10, 2020 12:46 am

thatchunkylad198966 wrote:
Wed Jun 10, 2020 12:37 am
@HawaiianPi

I'll buy another USB3 to SATA and test your theory. :D
This should be the same one I am using (got mine from Amazon USA).
Amazon UK link
Amazon USA link (for comparison)
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?

mmoseeker
Posts: 9
Joined: Mon Jun 08, 2020 9:27 am

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Wed Jun 10, 2020 1:34 am

Korsair wrote:
Mon Jun 08, 2020 3:19 pm
I’ve been booting from usb since 5-28 version. My pi is powered by Geekworm x735 so the usb-c connector is empty. Last night I attached the ssd to the usb-c port. Unfortunately, it did not boot. I reconnected to the usb 3 port and it boots correctly. Would you expect it to be able to boot from the usb-c port? Power is coming from the x735 power port 5v 4a.
can not boot from the usb-c port now

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Wed Jun 10, 2020 5:58 am

mmoseeker wrote:
Wed Jun 10, 2020 1:34 am
Korsair wrote:
Mon Jun 08, 2020 3:19 pm
I’ve been booting from usb since 5-28 version. My pi is powered by Geekworm x735 so the usb-c connector is empty. Last night I attached the ssd to the usb-c port. Unfortunately, it did not boot. I reconnected to the usb 3 port and it boots correctly. Would you expect it to be able to boot from the usb-c port? Power is coming from the x735 power port 5v 4a.
can not boot from the usb-c port now
Yes, that's what was already explained by @timg236 in viewtopic.php?p=1676423#p1675578

Doug_
Posts: 57
Joined: Tue Oct 08, 2019 6:40 pm

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Thu Jun 11, 2020 1:32 pm

Question: What is the boot order for the MSD boot loader, and what happens if non bootable USB sticks are mixed with one or more bootable devices?

mby
Posts: 45
Joined: Sat Dec 15, 2018 3:05 pm

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Thu Jun 11, 2020 1:36 pm

HawaiianPi wrote:
Sun Jun 07, 2020 8:10 am
(...)
The "blue" Eluteng USB 3.0 to SATA-III adapter cable works with both UAS and TRIM (no quirks required).
(...)
On a side note: how do you do activate trim on the Pi with SSD? - Thanks!

P.S.: Found it @ viewtopic.php?f=63&t=275187&p=1671542&h ... m#p1671542

tofflock
Posts: 14
Joined: Mon Mar 05, 2012 11:53 am

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Thu Jun 11, 2020 1:52 pm

Doug_ wrote:
Thu Jun 11, 2020 1:32 pm
Question: What is the boot order for the MSD boot loader, and what happens if non bootable USB sticks are mixed with one or more bootable devices?
I can't answer the bit about a mix of bootable & non-bootable USB sticks...

However, I have had two bootable USB-attached SSD drives attached to the two USB3 sockets at the same time.
Every time I rebooted the Pi, or powered it up, the SSD that was plugged into the upper USB3 socket booted (for avoidance of doubt, upper means the furthest away from the plane of the Pi pcb).
This was what I wanted.
I also noted that the upper socket was always identified as sda, and the lower socket sdb after power on.
Both my SSDs referenced their root partitions by part-uuid, so once a device had been picked to boot, it would only hand over to its correct root partition. Both SSDs had unique IDs in their partition tables, ensuring unique part-uuids.
NB - this is only an observation. I have no access to the code which enumerates the USB ports and makes decisions on what to try booting.

HTH

PeterF

PS @timg236 More technical information here would be good please.

darcmage
Posts: 4
Joined: Sun Jun 07, 2020 9:22 pm

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Thu Jun 11, 2020 2:03 pm

mby wrote:
Thu Jun 11, 2020 1:36 pm
HawaiianPi wrote:
Sun Jun 07, 2020 8:10 am
(...)
The "blue" Eluteng USB 3.0 to SATA-III adapter cable works with both UAS and TRIM (no quirks required).
(...)
On a side note: how do you do activate trim on the Pi with SSD? - Thanks!

P.S.: Found it @ viewtopic.php?f=63&t=275187&p=1671542&h ... m#p1671542
I'm using the same adapter with a Kingston A400 120gb ssd but I'm getting a "discard operation not supported" error. Any ideas why that might be?

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

Re: USB MSD bootloader EEPROM 2020-06-03 - BETA

Thu Jun 11, 2020 2:22 pm

Doug_ wrote:
Thu Jun 11, 2020 1:32 pm
Question: What is the boot order for the MSD boot loader, and what happens if non bootable USB sticks are mixed with one or more bootable devices?
As with Pi 3 there is no priority ordering between bootable devices and the USB enumeration order is undefined. That's intentional because baking in assumptions about USB topology is a huge can of worms and support headache.

It will boot from the first valid start.elf that it finds before proceeding to the next.

Right now, if there are multiple bootable (i.e. FAT partitions) then you may need to increase USB_MSD_BOOT_MAX_RETRIES otherwise it may stop with the 'start.elf error' when it finds a bootable drive with no firmware. I'm about to get rid of USB_MSD_BOOT_MAX_RETRIES, it's a hangover from before the RESTART 0xf was added because it doesn't fit with hot-pluggable USB devices and multi slot SD card adapters.
USB MSD boot will just run, looking for devices until the boot mode times out and SD/network is tried instead.

Return to “General discussion”