Booting into secondary OS from LibreElec using grub.

  • I have an Odroid H4, with a spacious M.2 SSD, set up in a triple boot situation off the one disk, following manuals made by better minds than mine. It was a bit fidgetty but fairly straightforward in the end.
    (first installed ubuntu, leaving room on disk, installed windows, still leaving some room on disk, reinstalled ubuntu over itself to fix bootloader, and then copied the libreelec partitions from an image of a working install on the machine into the empty space at the end of the disk, and finally hacked the grub bootloader in ubuntu to add libreelec and put it on top (where it belongs :), with windows as second option and ubuntu as third).

    I have a kodi install auto starting in windows as well, so switching from LE to windows-kodi is seemless. And all my libreelec and kodi installs in the house share a library and highly customized minimal interface (arctic zephyr ftw) for a seemless user experience on all devices.

    When i reboot the machine, grub auto boots into the top option LibreElec in 4 seconds. But if i want to reboot into the second (windows) or third (ubuntu) i have to make like a bomb disposal squad to find my keyboard to make the grub selection. When i reboot from Windows i dont have this issue because it autoboots to libreelec, and i know there are ways to tell ubuntu which grub option to boot into before rebooting.

    Is there any way to add an option to boot into a second or third OS from the shutdown menu or thought some shortcut in LibreElec? So i can make the choice before rebooting and bypass the grub bootloaders detonation timer? Thanks in advance for any hints to achieve this.

  • Go to Best Answer
    • New
    • Best Answer

    Can confirm the efibootmgr solution works fine with the Odroid x86 boards. (I've done it on H3 & H4)

    I just made a few scripts to pick which boot option to use on next boot:-

    e.g. boot_to_windows.sh, boot_to_linux.sh etc.

    Bash: boot_to_windows.sh
    #!/bin/bash
    efibootmgr --bootnext 2; reboot

    Then you can either

    1. Trigger the script(s) to via keymap.xml with RunScript() entries for using buttons directly from remote
    2. Use the SkinShortcuts feature of the skin to set up a navigable menu to select the needed script(s)
    3. Add entries to your Favourites menu
    4. Use one of the many addons that provide a popup window with command entries you can customise.

    ... and so on.

    Only major pain in the butt I really encountered was Windows' habit of assuming it's the only OS on the disk and then take full control of the drive's boot setup and re-write it whenever it updates to a new point-release, resulting in having to redo/re-apply the grub shenanigans.