Boot directly from USB with Raspberry 3

You can boot directly from USB in latest firmware on Raspbian

you only need the SD card to push down firmware once.

could this be implemented in future versions of OSMC ?

I am not keen on updating the bootrom of people’s devices without their consent or knowledge. There would also be a bit of work to get the installer to use the USB to hold /boot.

The problem is the USB boot option in the OSMC Installer would become confusing, so for now I think it is best to keep it as a manual installation option.

When the USB boot option is selected in the OSMC installer I suggest the following workflow:

  1. Install OSMC completely and directly on the USB-stick (including bootloader, /boot, …).
  2. Make sure the “boot”-flag is enabled on the USB-stick partition.
  3. Add the option “# program_usb_boot_mode=1” (commented out) to config.txt
  4. Install BerryBoot boot-loader on the SD-card to forward the boot-loader-process to the USB-stick.
  5. Show a message that the user can enable USB-booting on the RPi3 with the following procedure:
    5.1 Uncomment “# program_usb_boot_mode=1”
    5.2 Reboot RPi once.
    5.2 Comment out “program_usb_boot_mode=1”

This allows to boot OSMC on RPi1, RPi2 and RPi3 without OTP-flag using the SD-card and on RPi3 with OTP-flag without the SD-card. For convenience step 5 can be added to MyOSMC.

The fat32 portion is still expected to reside on an SD card for now. If you want to PR some changes to improve this, I’m happy to accept them.

BerryBoot is not compatible with OSMC at this time and causes changes that we cannot officially support. It uses a shared firmware and kernel which means that OSMC may not work as expected.

I did some testing. My RPi3 boots neither current Raspbian nor OSMC in USB-only mode. :frowning:

While testing I made an interesting discovery. Raspbian only needs bootcode.bin on the SD-card to boot. Everything else can be on the USB-stick. This works on a RPi 1B, too. I can’t reproduce it with OSMC. There seem to be too much changes in OSMC. But it would be great if one only needs bootcode.bin on the SD-card and everything else can be done on the USB-stick. :wink:

Indeed.

If you can PR the necessary changes to the target installer, I’d be happy to accept
them. Otherwise, this is quite low on the list, particularly as the performance differences between USB media and SD cards are minimal and corruption on SD cards is no longer an issue.

Cheers

Sam

Hi @sam_nazarko, thanks for all your great work!

the performance differences between USB media and SD cards are minimal

When using an SSD HD there might be significant performance gain.

USB Mass Storage Boot is now supported using the Raspberry Pi Imager to update the bootloader.
That same Raspberry Pi Imager supports installing OSMC.

So it would be nice if OSMC supported USB-first boot.

Also referring to Rpi3: could not mount bootfs due to misassumption when installing from usb · Issue #448 · osmc/osmc · GitHub.

I’ve outlined the changes need to support this on the GitHub issue.