[How To] Lakka & KODI Dual Boot



Here is my easy how-to for building a multi-boot Lakka & KODI system.
You can also install any other systems as well (eg. Raspbian) & easily boot to them from KODI.

It is compatible with all versions of the Raspberry Pi.
An internet connection is required on the Pi.


How to Install

Step 1

Follow THIS post to install NOOBS Lite Extra to your SD card.

Step 2

Power on the Pi.
NOOBS will load and then give you a list of OS's to install.


You can select any combination of systems you like.

For KODI, you can choose either LibreELEC or OSMC (or both).
Then select Lakka & any other systems you want.
Above I have chosen Raspbian + LibreELEC + Lakka

Lakka-unstable is the latest experimental unstable version of Lakka with various new features.

Once you have selected your systems, simply press i or click Install.

NOOBS will now download and install your chosen systems.
This can take a bit of time depending on how many systems you are installing.

Wait for it to complete, and then move on to step 3.

Step 3

Follow THIS post to install my NOOBS Companion Add-on in KODI.

Step 4

Let's now make Lakka able to boot back into our KODI system.

Go to the main menu.
Scroll down to Add-ons.
Select the "NOOBS Companion" add-on.

Move down to the Lakka system.
Open the context menu and select "Install Boot-Back"


Lakka has now been modified to "Boot-Back" into our KODI system when it exits.


Watch the video on the NOOBS Companion post for more things you can do with it!

Enjoy :)


Optional Tweaks

Tweak #1
If you would like to store your Lakka Roms on a shared network folder, see HERE

Tweak #2
If your using LibreELEC and want to remove all the extra sources in File manager, see HERE


Troubleshooting

Issue: NOOBS Companion add-on is removed from KODI.
Solution: Redo Step 3 from above.

Issue: Lakka no longer boots back into our KODI system (eg. after an update)
Solution: Redo Step 4 from above.


More Info


Changelog

02/03/17
- Change the entire method to use my brand new NOOBS Companion Add-on.

Thanks to the teams at Raspberry Pi, KODI, LibreELEC, OSMC, PINN & Lakka

Comments

  1. Hi friend. Is posible make a image with lakka,retropie,recalbox,raspbian and kodi togheter? Thanks for your work :)

    ReplyDelete
    Replies
    1. Hmmm, it's a bit tricky.
      I do have dual-boot images for Recalbox here:
      http://www.matthuisman.nz/2015/11/recalbox-kodi-dual-boot-images.html

      You could copy the OS/mattrix-Recalbox directory from there into one downloaded from here.

      You will need to edit the partitions.json files so they all use sequential partition numbers.

      You can also download the KODI add-on at the bottom of that other post. Install that alongside the Lakka add-on.

      There is also a Raspbian add-on you can install from this post.

      Not sure about retropie though...
      If they use a NOOBS compatible system, you could make something up.

      Delete
    2. Thanks friend. Im a noob but i will try it :)

      Delete
  2. AWESOME i <3 u!!!! SO AWESOME! THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    u da bomb! (in a good / god way)

    ReplyDelete
  3. Hi Matt, your image is pretty great. I did not expect the Pi to be able to switch between OSes so fast. Configuration of LibreELEC is very easy, Lakka less so, but I've found my way around it. :)

    I wanted to add one small thing to it: a third OS, perhaps Raspbian Lite based, with the bare minimum to function, and which runs Moonlight on startup to access Steam on my desktop via streaming, and goes back to LibreELEC when you stop the stream. How feasible would that be? Sadly there's no Steam client for ARM-based systems, so that's pretty much the only alternative. There's not much interest in it so I'd probably have to do this on my own.

    Again, thanks for your work!

    ReplyDelete
  4. Hi

    I've installed osmc+lakka image on RPi B. Every time I launch a rom from any emulator, it restart to osmc. Autostart.sh file is OK.

    Any idea?, thanks

    ReplyDelete
    Replies
    1. If it's rebooting into OSMC, it means Lakka is exiting for some reason (and therefore triggering the reboot).

      I had the same issue when I tried to use roms from the network and Lakka did not have permission to write to the rom folder.

      Make sure Lakka can write to the rom folder or it will crash.

      Delete
    2. Perhaps that is the issue, I've mounted a NFS read only roms folder. I'll try this night, thanks

      Delete
    3. I've moved some roms to local folder (/Storage/roms), and I still have the same problem......

      Anyone with the same problem?

      Delete
    4. check that the "save" directory in wettings > directory is writable.

      What you can do is delete the /storage/.config/autostart.sh file. And reboot.

      Now it won't keep booting into KODI and you can figure out what's wrong.

      Then bring that file back once you find the issue.

      Delete
  5. Hi there Matt. Just wanted to say thanks heaps for these images bro! ;D + Saw your SMB ROM share post, sick idea! Keep it up, I'm gonna browse the rest of your stuff ;)
    Zane.

    ReplyDelete
  6. Hi,

    I've installed libreELEC+lakka on my pi3, and so far it's working great. However, I've been wanting to edit the boot config.txt for both systems, but it seems I cannot access the logical partitions belonging to lakka. Both fdisk and parted show the logical partitions on the sd card fine, but it seems my OpenSUSE LEAP installation just can't look past the libreELEC partitions. Attempting to mount Lakka's partitions just gives me the error that the device does not exist. Do you have any idea's how to fix this?

    As a sidenote, OpenSUSE's own GUI partition tool is also incapable of locating Lakka's partitions, instead displaying that part of the sd card as unpartitioned.

    ReplyDelete
    Replies
    1. Hi. Not sure sorry.

      I would usually just boot into Lakka, then SSH into it and then edit the boot config.txt via SSH.

      Delete
  7. any way i can talk someone into making these images work for generic old school pcs/laptops? i have an nvidia laptop and I would love to dual boot these two.

    ReplyDelete
    Replies
    1. No ideas sorry. These use NOOBS which is RPI only pretty sure. Both Lakka and LibreELEC do support PC, but not sure how you would go about accomplishing the dual-boot. I'm sure there are ways out there - just have a google I think.

      Delete
  8. Hi Matt
    Is there a possibility to upload Kodi to version 17 within your image?

    Thank you!

    ReplyDelete
    Replies
    1. Yes. It's easy! Just download the 7.0 beta tar update. Put in LibreELEC update folder and reboot (it's called the manual update method)

      Delete
    2. I update me too but now I can't run Lakka from Kodi it keeps reload Kodi? Any idea?

      Delete
    3. Try updating the addon.
      I fixed it about a week ago to work with new KODI builds.
      Get it here:

      https://docs.google.com/uc?id=0B0_VIhF6xzjpLVNQWFVtVHlYODQ&export=download

      Delete
  9. Hello guy,
    Thank you for your work.

    After updating kodi to v17 to supporting my xbox 360 wired controller, i cannot launch Lakka, it always reboot to libreelec.

    I have check the autostart.sh and reinstall the package and no change.

    If i change bootpartition in autoboot to lakka, lakka can boot..... do you have any help ?

    Regards

    ReplyDelete
    Replies
    1. I have now updated the addon to work with newer builds :)
      Download it in the "Possible Issues" section.

      Delete
  10. Super ! it work now ! thank you very much

    ReplyDelete
  11. Hey there! i have a little problem with one of your images. i installed the osmc/recalbox-dualboot-image (which is great by the way) on my raspberry , and now i have the problem that my osmc-partition is lacking storage. i have a 32 gb sd card and would like to extend the osmc-partition the half of that space. could you give me some on advice on how to do that, or even furthermore how to change the partition-size of the os in the first place before installing.

    greetings!

    ReplyDelete
    Replies
    1. This is covered in #2 of a "Few things to be aware" of section in blog post above. Pretty much. Start from fresh. After copying the files to the SD card. Go to the OS/mattrix-LibreELEC folder. Edit the partitions.json file. Change "want_maximized" from false to true. Save the file. It should now get half the free space.

      Delete
    2. Make sure you just change the ext4 partition (not the fat32 partition)

      Delete
    3. oh i'm sorry, didn't pay enough attention. but still thank you very much :)

      Delete
  12. Hello,
    I am trying to get this up and running. I have a pi 2 model b with a scandisk 8gb. i downloaded the OMSC img. extract and copy to root of sd (after formationg with sd format program). when i put the sd back in the PI it juste wont do anything. i get solid red and green light on the PI. i know it works cause when i install retro pi everything boots ok. any ideas?

    ReplyDelete
    Replies
    1. You should always at least see the NOOBS menu. The NOOBs package works on every Pi. If your not seeing this, then I'm not sure what is going on. I have tested here OK. Make sure your copying the contents of the folder (not the folder itself).

      Otherwise, maybe try another SD card just to be sure.

      Delete
  13. What script can I use to change from raspbian to libreelec and lakka without rebooting?

    ReplyDelete
    Replies
    1. In latest Raspbian terminal, "sudo reboot {p}" where {p} = partition number should work.

      I haven't used Raspbian much but once you have a terminal command you may be able to make a desktop shortcut or something like that.

      Delete
  14. HI Math. Great stuff!! I have a pi3 with your latest realease. I choosed lakka and OSMC. I have a small problem with Lakka.. I have no sound at all over HDMI. OSMC is not having this problem. Audio mute if off in the Lakka setteings. There is 2 sound card recognized, default and sysdfault=alsa. I found while Googling that config.txt must be edited to uncomment some line.. however, logging with the root account over ssh, i can't write the config.txt file in /flash.

    It says the file is write only. I tried to change the user with sudo -s or sudo nano config.txt.. it says it's not required in raspbian. I tried to put the sd card on my windows laptop, but i can't find the txt file over the card.

    Looks like a dead end..

    Can someone help?

    ReplyDelete
    Replies
    1. Follow these instructions to edit the config:

      https://wiki.libreelec.tv/index.php?title=Config.txt

      Delete
    2. Seems logical ;) I will try it tonight. Thanks Matt :)

      Delete
  15. What about a triple boot with Steam Machine (Moonlight)?

    ReplyDelete
    Replies
    1. Not sure sorry. I would think adding Moonlight to Lakka would be in their todo list.

      Delete
  16. Hi again Matt. This link is dead..

    http://www.matthuisman.nz/2016/08/lakka-network-samba-roms-folder.html

    Optional 3)
    If you want some or all of your Lakka roms on a samba network folder, check out my post HERE

    ReplyDelete
    Replies
    1. Thanks for pointing that out.
      Link is now fixed :)

      Delete
  17. First off thank you. My girlfriend and I love the convenience of having both OS's easily switchable. One problem for me though is that I cannot for the life of me get ssh working in lakka. I have a few bluetooth controllers I need to setup using the command line and ssh isnt working at all. I can ping and samba but ssh is giving me a connection refused. any idea if you changed something that would break this?

    ReplyDelete
    Replies
    1. figured it out! samba into the box when libreelec is running and go to the lakka folder (mmcblk0p8-mmc-SA08G_0x38cafeb5). Then add ssh to the command line file. make sure to add a space after that last command in the file beofre adding the ssh.

      Delete
    2. Pretty sure you just need to enable SSH in the Lakka menu :)
      But glad to hear you got it working.

      Delete
  18. I got everything up and running just fine, but when I go into lakka and try to connect to my wifi, it freezes everytime when it asks me to input the passphrase. Any help would be appreciated.

    ReplyDelete
    Replies
    1. Hi Adam.
      Not sure on this sorry. Possibly a bug in Lakka?
      Best to pop along to their forums and hopefully someone their can help you out :)

      Delete
  19. Hi Matt,

    first of all, great work!
    Is it also possible to build a multiboot image for Odroid?

    ReplyDelete
    Replies
    1. No sorry.
      For starters - NOOBS appears to be Raspberry Pi only.

      I guess it may be possible manually making the image (with no NOOBS menu) and then using boot.ini to change which partition is booted.

      I do have a C2.
      Maybe once LibreELEC stable for C2 is out (shouldn't be far), I will look into it :)

      Delete
  20. Hi Matt! Great work! Could you please tell if if Raspbian is installed with lakka and Kodi if the system will still allocate the majority of the SD space for Lakka? If not can this be done? Thanks Again!

    ReplyDelete
    Replies
    1. You can choose to install Raspbian in NOOBS when your installing the other 2x OS's. Lakka has been set to expand the free space. However, Raspbian also looks like it expands as well. Therefore the free space will be split evenly between them. As NOOBS get's the partition file from online for Raspbian (http://downloads.raspberrypi.org/raspbian/partitions.json), I can't see a way of changing that.

      Delete
  21. I attempted to upgrade the Libreelec image to 7.95 beta. The update appeared to apply ok but now when trying to book that partition the pi appears to lock up. Any thoughts on how I can identify the issue?

    ReplyDelete
    Replies
    1. I ended up re-imaging my SD card and attempting to reinstall from the start, plus restore my libreelec backup. I got an error that there wasn't enough storage.

      I modified the paritions for the libreelec image so that storage is granted 2048 vs the default 1100 and redid the install, was able to restore my backup, and was able to upgrade to 7.95.3 without issue. I'm going to test the upgrade again on my second unit, but will remove the backup image from the device first. Perhaps this was a fluke or the upgrade process ran out of disk. Who knows.

      Delete
    2. Thanks for the info.
      I think i'll add more space for KODI in the next builds.
      Or, just have the space split evenly between KODI and Recalbox.

      Delete
  22. Are you able to build an image for x64 devices to boot between Kodi and Lakka? I have an intel NUC with an SSD I would like to use this

    ReplyDelete
    Replies
    1. This system uses NOOBS which is Raspberry Pi only.
      You may be able to make your own using GRUB or something.

      Delete
  23. Hey Matt, great build. I am using a 16GB SD card but when I install both systems I am left with only 91MB out of 310MB for my ROM's. Is this normal?

    ReplyDelete
  24. This is my third time posting. Something goes wrong every time. I first want to thank you for your hard work in this, I greatly appreciate it. I tried downloading "(09/01/17) NOOBS Lite 2.1 + Lakka r21640 + LibreELEC 7.0.3 (KODI 16.1)" and it was an .iso that was not the same as depicted in the video. I tried the 2.0 link which was completely bad. Can you correct this for me? Thank you again!

    ReplyDelete
    Replies
    1. It is not an ISO. It is a ZIP file.
      Extract it to a blank SD card.
      Exactly same as video.

      Delete
    2. I don't know how or why but I downloaded that link twice and got an .iso both times. I downloaded it for a third time just now, it is titled "Mattrix-09-01-17-RPi2-Lakka-LibreELEC(2)" because it is the third instance of the same file but this time the contents are correct. Also the other link works too. Thank you for fixing it.

      Delete
    3. Well, I didn't change anything so not sure.
      But glad you got it sorted.

      Delete
  25. Hello I installed libreELEC and lakka and when I put my 32 gig sd card into my laptop it shows I have used 150 something of space and i have 200 of space left on my sd card can you please help me figure this out as I have formatted 3 times and installed with the same out come...

    ReplyDelete
    Replies
    1. It is because Windows won't show all the Linux partitions which have the majority of the space. Windows only shows the first small FAT32 partition. But, the space is there. You just can't access in Windows.

      To transfer roms to Lakka, see below:
      http://www.lakka.tv/get/linux/rpi/install/first-boot/games/

      Delete
  26. Hi Matt,
    Don't know if you are going to read this, but I hope you will and have a solution for me.
    I am using your previous version of the Kodi/Lakka dual boot of LibreELEC7. All is running fine but I finally wanted to update to LE8. Both using the integrated update option and putting the .tar file into the UPDATE folder manually fail with the message: Kernel or System missing.
    It than rolls-back to LE7.

    ReplyDelete
    Replies
    1. Hi. The Update manual method should always work.
      I suspect maybe using the wrong update file..

      If your using a Pi2 or Pi3 use this file: http://releases.libreelec.tv/LibreELEC-RPi2.arm-8.0.1.tar
      If your using a Pi1 or Pi0 use this file: http://releases.libreelec.tv/LibreELEC-RPi.arm-8.0.1.tar

      Put the tar file in the UPDATE folder and reboot :)

      Delete
    2. Hey, thank you for your reply.
      I did this a couple of times but it just won't update...

      I guess I have to do a fresh install and set everything up again...

      Delete
    3. Oh that sucks.
      Usually manual update method works great.

      I see someone had same issue here:
      https://forum.libreelec.tv/thread-4093-post-29689.html

      Delete
    4. Thanks for the link. I figured out it was a space issue. After deleting some cache and older backup-files the update worked!
      I guess the system didn't have enough space left for the extraction of the .tar file.
      Anyway, I thank you a lot for your quick support.

      Delete

Post a Comment