How to Dual Boot Ubuntu and Lakka

I am doing this because we need it. I had Ubuntu and Lakka on my Dell XPS 9550 and I use a drive for the OS and a drive for Lakka.

First you want to find your drives with:

sudo fdisk -l

My output looked like:

Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 10AD5A28-92BE-4E59-BC40-521F69AB8864
 
Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048   1050623   1048576   512M EFI System
/dev/nvme0n1p2   1050624 466880511 465829888 222.1G Linux filesystem
/dev/nvme0n1p3 466880512 500117503  33236992  15.9G Linux swap
 
 
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1b2c2e4e
 
Device     Boot   Start       End   Sectors   Size Id Type
/dev/sda1  *       2048   1050624   1048577   512M 83 Linux
/dev/sda2       1052672 468861104 467808433 223.1G 83 Linux

If you still think you need more help identifying which drive and partition please take a look with SUPER GRUB2 DISK. It is a free tool that you can use to boot into and see a more detailed layout of your drives. I used it to identify which partitions I booted from.

THIS IS OPTIONAL: If you can already access Grub menu, proceed to next step

As you can see for myself, disk 1 is Ubuntu and disk 2 is Lakka. So if you are on Ubuntu solely and would like to enable GRUB2 we need to make an edit.

sudo nano /etc/default/grub

or

sudo gedit /etc/default/grub

then

At the top of the file you will see some timeouts. I placed an octothorpe (#) on line 7 to prevent any hidden timeouts. This should enable you to see your GRUB menu.

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="0"
# GRUB_HIDDEN_TIMEOUT=10
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

now we save it

sudo update-grub2

This will enable your GRUB menu

Congrats, you should now see your Grub menu. Now we add Lakka to the GRUB menu.

sudo gedit /etc/grub.d/40_custom

this will open a file that you can add your entry in

For me mine looked like this after I put in my proper partitions in the right place.

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Lakka" {
	search --set=root --label System --hint hd2,msdos1
	linux /KERNEL boot=LABEL=System disk=LABEL=Storage quiet
}

NOOBS: Linux is case sensitive so take a good look and make sure you capitalize what is needed.

NOTE: Hard drives do NOT index from zero, this is why I typed hd2,msdos1

once again, we need to update GRUB2

sudo update-grub2

Once you update you can reboot. If you entered the correct drive and partition with correct labels, you can now boot Lakka!

Show some love if this helps! Thanks for all you guys do!

Shout out to Gouchi for helping out and troubleshooting!

Ciao!

1 Like

Cheers, man! Could I ask for either a tutorial to triple boot with Windows or dual boot between Windows and Lakka? Thank you once again.