raspberry pi 3 boot from usb

  • As stated on the rPi website (here, here and discussed here), with the raspberry pi 3, there is now the possibility to boot directly from a mass storage device, such as an USB stick or hard drive, and from network, without the necessity of a microSD card installed.
    I want to ask if anyone did this with LE, and if not, if there's any possibility to update the LibreELEC USB-SD Creator to write USB sticks compatible with this feature, considering it has to have an updated bootcode.bin (issued in the 'next' branch of rPi firmware) and a proper cmdline.txt (at the moment, the USB stick written with the Pi image of Libreelec contains a cmdline.txt that references the SD partition).

    thank you

  • It's been tested (but not extensively) and it works, but there are no current plans to make it the default boot method, nor to complicate the USB/SD creator with too many choices. It's something we'll keep an eye on though.

  • Is there any update regarding this feature? I am also using Rasplex at the moment and this is build on LibreElec. For Raspbian USB boot works fine. It would be great is this can be done for LibreElec/Rasplex.


  • You can always grab the firmware yourself from the Raspberry pi next repo and update it in your system partition, then you will be able to usb boot.

    What is the best option to do this? I am still reading and learning, but as far as I know, Libreelec contains the master branch of the firmware and not the "next" branch. My pi is ready to boot from USB. I also tried to just put an update bootcode.bin on to the flashed USB, but this only gave me the rainbow start screen. So my thought was that the cmdline.txt had to be updated as well. But I don't know to what I should update this.

    As far as I know, at initial startup, the partitions will be created. So what is the best way to handle this?

    This is my cmdline which works with my Rasbian image. Not for LibreElec

    Code
    dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait plymouth.enable=0
  • My kodi 18 test builds include branch=next firmware. Or use the latest official 7.90.xxx release, then update the firmware from branch=next.

    As for your cmdline.txt, the following might work (untested, I've only tested network booting):

    Code
    boot=/dev/sda1 disk=/dev/sda2 quiet ssh

    Note that it's better to use uuids to identify your USB partitions to avoid confusion with any other USB based storage you may have connected, so once you've booted the Pi use blkid to list your uuids, and then change cmdline.txt.

    The following is just an example with a system booted from SD card (although it's really not necessary to use UUIDs for SD cards):

    Code
    rpi22:~ # blkid
    /dev/mmcblk0: PTUUID="bb25af57" PTTYPE="dos"
    /dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="System" UUID="9AD8-C43A" TYPE="vfat" PARTUUID="bb25af57-01"
    /dev/mmcblk0p2: LABEL="Storage" UUID="16d88253-502e-4c3c-8404-1c24bade0213" TYPE="ext4" PARTUUID="bb25af57-02"
    [code]
    
    
    and then cmdline.txt would become:
    [code]
    boot=UUID=9AD8-C43A disk=UUID=16d88253-502e-4c3c-8404-1c24bade0213 quiet ssh
  • There is a problem with trying this as there is a known bug which means that when you enable boot from USB only 119MB of ram is available on the system. This is cured on the Raspbian system by using an updated version of bootcode.bin, but this doesn't cure the issue when used in a Libreelec build.

    At the moment it would seem that this facility is broken until someone looks at the specifics of the Libreelec and firmware integration.

    Update: if you try copying all the firmware across from the Raspbian next build, you get a broken system with everything stuck at the rainbow splash screen.

    Stephen

    Edited once, last by Shoog (January 18, 2017 at 10:01 PM).


  • There is a problem with trying this as there is a known bug which means that when you enable boot from USB only 119MB of ram is available on the system. This is cured on the Raspbian system by using an updated version of bootcode.bin, but this doesn't cure the issue when used in a Libreelec build.

    At the moment it would seem that this facility is broken until someone looks at the specifics of the Libreelec and firmware integration.

    Update: if you try copying all the firmware across from the Raspbian next build, you get a broken system with everything stuck at the rainbow splash screen.

    Stephen

    just grab the firware from here, firmware/boot at next · raspberrypi/firmware · GitHub

  • Shoog: The 119MB issue has been fixed for a while now, and shouldn't be an issue in my Kodi 18 test builds or the latest LibreELEC 8 beta build (7.95.1), both of which should boot from USB with the full complement of RAM. Which version of LibreELEC are you testing that has this RAM issue?

  • When I grab the firmware from that source (kernel,start.elf,bootloader.bin,bcm2710-rpi-3-b.dtb, bcm2709-rpi-2-b.dtb) and load it into the boot folder it gets stuck at the rainbow splash.

    The question is has anyone actually got a working system with this method and precisely what files did you use to get it ?
    Stephen

    Don't replace the kernel!!!!!!!!!!!!!!

    We actually rename some files.
    See, LibreELEC.tv/package.mk at master · LibreELEC/LibreELEC.tv · GitHub

    start_x.elf -> start.elf
    fixup_x.dat -> fixup.dat


  • Shoog: The 119MB issue has been fixed for a while now, and shouldn't be an issue in my Kodi 18 test builds or the latest LibreELEC 8 beta build (7.95.1), both of which should boot from USB with the full complement of RAM. Which version of LibreELEC are you testing that has this RAM issue?

    I am using 7.0.3 because I know its stable otherwise.
    This fix hasn't made it into the mainline boot files yet after a good six months of been out there

    [hr]

    Edited once, last by Shoog (January 20, 2017 at 7:25 AM).

  • The memory fix and USB support is now in Raspberry Pi firmware branch=master (has been for a week or two), so use that as per lrusaks instructions. Or upgrade to the LE 8 Beta.