Odroid C2: Dual Boot CoreELEC (eMMC) and Lakka (SD)

Hi,

I’ve replaced my Raspberry Pi 3 with an Odroid C2. On the Raspi I installed a multi boot system with NOOBS (LibreELEC, Lakka and Raspian).

Now I want the Odroid C2 to be able to dual boot CoreELEC and Lakka. I found a guide in the Odroid forum, but it was done for Ubuntu and Android and I’m not able to turn this over to my needs. (Boot Switcher Guide)

I also found this tip for the Odroid XU in the Lakka FAQs (Using eMMC and SD at the same time). So I have tested it and replaced the boot.ini from CoreELEC with the one from Lakka. Of course I edited the file, as described in the FAQ:

change the dev names in the boot.ini. /dev/mmcblk1p1 instead of /dev/mmcblk0p1, and /dev/mmcblk1p2 instead of /dev/mmcblk0p2

But with this Lakka doesn’t booted, as I expected.

Can anyone please give me a hint, how to do it correctly? My status in linux I would describe as advanced beginner.

Later when I have it working, I want to make scripts to switch the boot.ini and make them accessable in both systems.

Many thanks in advance!

Ok, it seems this topic isn’t much in the interest of others, but I want to tell my progress so far.

In the eMMC boot partition I created 2 more boot.ini files: boot.ini.elec and boot.ini.lakka The default boot.ini is a copy of one of those 2 files dependent of the system, which should boot while the next reboot. Additional there is a directory “multiboot”, which contains the KERNEL and dtb file of each system (KERNEL.lakka, KERNEL.elec,…).

The boot.ini files are edited with some small adjustments. These are for example the edited lines for Lakka:

setenv bootrootfs "boot=/dev/mmcblk1p1 disk=/dev/mmcblk1p2"

setenv kernel "fatload mmc 0:1 0x11000000 multiboot/KERNEL.lakka"
setenv dtb "fatload mmc 0:1 0x1000000 multiboot/meson64_odroidc2.dtb.lakka"

And here for CoreELEC:

setenv bootrootfs "BOOT_IMAGE=/multiboot/KERNEL.elec boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2"

fatload mmc 0:1 ${kernel_addr} multiboot/KERNEL.elec
fatload mmc 0:1 ${dtb_addr} multiboot/meson64_odroidc2.dtb.elec

When switching the boot.ini with one of the other 2 files, the corresponding OS boots. Now I just need a way to switch the boot.ini from the Lakka gui. Maybe I will find the solution from the NOOBS companion KODI addon, which installs a Boot-Back into Lakka, but only for the Raspberry 3.

1 Like

here a read of this:-

https://forum.odroid.com/viewtopic.php?f=98&t=16369&hilit=multiboot

Thank you for the suggestion, @shepo.

My Dual Boot is now complete, but without the Multiboot installer from Loboris. From Kodi I can boot to Lakka with a Favourite, which starts a boot switcher script. And the other way around I can boot from Lakka to Kodi with the “Quit Retroarch” menu item, which also starts a boot switching script. See here, how it works: [Release] Lakka + KODI Dual Boot Images for Raspberry Pi

Of course I can not choose the OS at the start of the boot process, but I can live with that.

1 Like

might have to give it a try

how did you add the boot switch to kodi

@shepo There are several ways. At first you need the script. I created in the Kodi Userdata folder a subfolder ‘scripts’. In there I made the file ‘boot_lakka.sh’ with the following content:

#!/bin/sh

mount -o remount,rw /flash

rm /flash/boot.ini

cp /flash/boot.ini.lakka /flash/boot.ini

reboot

Remember to make the file executable over ssh or with scp

chmod +x ~/.kodi/userdata/scripts/boot_lakka.sh

The easiest way to execute the script inside Kodi is adding it to the favourites. Open the file ‘favourites.xml’ inside the Kodi userdata folder and add it, as you can see on the pic. (I don’t find a way the write xml in this forum, because the tags get interpreted by the forum software)

System.Exec("/storage/.kodi/userdata/scripts/boot_lakka.sh")

After a reboot of Kodi the shortcut shoulb be in your favourites:

Another way is to add the command to your ‘keyboard.xml’, so you could run the script with a key-press on your remote or keyboard: key

I also use the Commands Addon, where you can put such things in a submenu, which will look like this:

1 Like