Mydriaze did you check Windows 10 dual boot with UEFI ? It shows a quite easy way for dual boot.
Posts by jkovacs
-
-
quicktrick if you followed the above steps all you need to do is to
- set the extra partition labels (only need to add GRUB and Windows as other are already there) to ignore under .config/udev.rules.d/95-udevil-mount.rules, e.g.:
CodeENV{ID_FS_LABEL}=="EFI|BOOT|Recovery|RECOVERY|SETTINGS|boot|root0|share0|GRUB|Windows", GOTO="exit"
- double check if the partition labels are correct, e.g.:
Code/dev/sda1 Recovery /dev/sda2 EFI /dev/sda3 /dev/sda4 Windows /dev/sda5 GRUB /dev/sda6 BOOT /dev/sda7 STORAGE
Note: I had issues adding the label to the EFI (/dev/sda2) partition with GParted, but worked with mlabel from the terminal under Ubuntu Live:
Regarding the 'grub-install' command: yes, for Grub, both the boot and efi are the same /dev/sda5 (decoupled from both windows and libreelec). /dev/sda6 is only a boot for libreelec.
R, Janos
-
That old plugin is not available for download anymore...
...so started to create my own addon. I was about to test when realized that even with the extra tools there is no grub-* in libreelec
...but the good thing is that there is efibootmgr which also supports one-time-only boot changes!
The only drawback is that it can boot partition that is know by EFI.
-
Thanks camyoung11 !
That's super helpful - although I'll have to extend a bit with explicitly mounting the boot partition as
- I prefer to hide all the non-content partitions from LibreElec
- As shown above, I have grub on the EFI partition which is hidden by default on LibreElec.
Janos
-
I mentioned EFI as I think it's easier, but basically MBR could also work.
Does your NUC support EFI?
Do you know what partitions would be needed for Volumio? Does it boot via syslinux like LibreElec?
-
Hi Balazs,
I didn't even hear about Volumio before but basically you need a bootloader like grub and manually placing the content on the partitions...
On high level:
- Get a linux live system - e.g. Ubuntu Live on USB - that has grub2 and UEFI support
- Set UEFI and boot the live system
- With GParted create the required partitions:
- one fat32 ~100M for EFI (boot,efs)
- two for LibreElec (e.g. one ext3 for boot and another, ext4 for storage, as large as you need
- other partitions as Volumio requires
- Update your live system and add grub-efi-amd64
- Install grub into the first partition
- Create your grub config for both LibreElec and Volumio
- Copy required content on the target partitions for both libreelec and volumio
- Enjoy!
R, Janos
-
-
Hi,
NUC NUC7i5BNH, Windows 10, LibreELEC, Dual boot, UEFI, Grub2
I just want to share the steps I used to set up dual boot. All you need is Ubuntu Live on bootable USB, no need to use any extra tools on windows or hack the EFI stuff.
Next step would be to create
- a simple win10 app and
- a simple LibreElec plugin
to set next-time-default-boot-entry, but if your (remote) keyboard works at boot time, you can easily select which OS to boot...
R, Janos
Note: all these are typed in w/o copy&pasting so expect typos!
1. Install Win10 in UEFI mode
First install Windows 10. Make sure you boot in UEFI mode to do the install. Let windows create all the extra partitions but make sure you leave enough space behind for LibreELEC:
CodePartitions created: /dev/sda1 NTFS Recovery 500MB hidden,diag /dev/sda2 FAT32 EFI system 100MB boot,esp /dev/sda3 unknown MS Reserved 16MB msftres /dev/sda4 NTFS Windows 120GB msftdata <leave enough unused space behind for LibreElec: ~8-16G>
2. Boot Ubuntu 18.04 Live in UEFI mode
Everything you have to do in a terminal must be with root! - so always start with:
2.a. Use GParted and create extra partitions for LibreELEC
Code/dev/sda5 FAT32 Grub Boot Manager 100MB Label=GRUB /dev/sda6 EXT3 LibreElec Boot 1024MB Label=BOOT /dev/sda7 EXT4 LibreElec Storage 16GB Label=STORAGE
Note: set the LibreElec Storage size to what fits for you
3. Copy LibreElec to target file-system
- As usual, create an USB boot drive
- Plug-in the USB drive while still in Ubuntu Live
- USB drive should auto-mount under /media/ubuntu/LIBREELEC
- Copy two files to the LibreElec boot partition
Codemkdir /mnt/sda6 mount /dev/sda6 /mnt/sda6 cp /media/ubuntu/LIBREELEC/KERNEL /mnt/sda6/ cp /media/ubuntu/LIBREELEC/SYSTEM /mnt/sda6/ umount /mnt/sda6
4. Configure UEFI
4.a. Update the live session to get latest grub2 and tools
4.b. Install Grub2
Code# mount the target partition sudo su mkdir /mnt/sda5 mount /dev/sda5 /mnt/sda5 # install grub2 to EFI grub-install --target=x86_64-efi --bootloader-id=LibreElec --boot-directory=/mnt/sda5 --efi-directory=/mnt/sda5 # check that libreElec is the new default efibootmgr -v
4.c. Create grub config files
The grub-efi configuration
The grub-menu configuration:
Code
Display Morecat << EOF > /mnt/sda5/grub/grub.cfg set default=0 set timeout=5 insmod efi_gop insmod efi_uga insmod font loadfont /grub/fonts/unicode.pf2 menuentry "LibreElec" { insmod part_gpt insmod ext2 set root='hd0,gpt6' linux /KERNEL boot=/dev/sda6 disk=/dev/sda7 quiet } menuentry "Microsoft Windows x86_64 UEFI-GPT" { insmod part_gpt insmod fat insmod chain set root='hd0,gpt2' chainloader /EFI/Microsoft/Boot/bootmgfw.efi } EOF
4.d. Clean up and reboot
Optional steps:
- if you want to use UUID instead of fixed partitions:
2.b. Record what UUIDs are there for the following partitions (e.g. from GParted, using information on the partitions):
- /dev/sda2 - the EFI partition
- /dev/sda6 - the LibreElec boot partition
- /dev/sda7 - the LibreElec storage partition
4.c. Use the below menu-entries in the grub/grub.cfg:
Code
Display Moremenuentry "LibreElec" { # boot: /dev/sda6 UUID: ABCD-EFGH-JKLM-1234 # stor: /dev/sda7 UUID: 1234-DCBA-8765-MLKJ insmod part_gpt insmod ext2 insmod search_fs_uuid set root='hd0,gpt6' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt6 --hint-efi=hd0,gpt6 --hint-baremetal=ahci0,gpt6 ABCD-EFGH-JKLM-1234 else search --no-floppy --fs-uuid --set=root ABCD-EFGH-JKLM-1234 fi linux /KERNEL boot=UUID=ABCD-EFGH-JKLM-1234 disk=UUID=1234-DCBA-8765-MLKJ quiet } menuentry "Microsoft Windows x86_64 UEFI-GPT" { # EFI: /dev/sda2 UUID: QWER-9876 insmod part_gpt insmod fat insmod search_fs_uuid insmod chain set root='hd0,gpt2' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 QWER-9876 else search --no-floppy --fs-uuid --set=root QWER-9876 fi chainloader /EFI/Microsoft/Boot/bootmgfw.efi }