How to install multiple Linux Distros and Windows 8 on UEFI?

by Santiago   Last Updated February 22, 2018 03:02 AM

I want to install Windows 8 + Ubuntu 14.04 for daily use + Ubuntu Studio for audio production. The method I've followed is to install W8 in the clean disk, then shrink the Windows personal data partition and install the linux distributions on the space avaible. To install them I create a / and a /home partition for each distribution, but the EFI boot partition which is created by W8 at the begining of the disk is unique. I installed both bootloaders on it. Now Ubuntu Studio boots perfectly but Ubuntu 14.04 does not (even appears as Unknown linux distribution in the grub menu).

Is there any problem with installing various linux bootloaders in the same boot partition (maybe because kernels get mixed or something)? Or my problem should be unrelated to this? If there is trouble with it, should I make a boot partition in sda7 or so for one of the bootloaders, or its crucial for the boot partition to reside at the beginning of the disk? Could the solution be to somehow get W8 installed in the partitions I want so I have no problem in making various boot partitions at the beginning of the disk?

Thank you very much for your time



Answers 1


To install them I create a / and a /home partition for each distribution, but the EFI boot partition which is created by W8 at the beginning of the disk is unique.

Looks good to me, I would have done the same.

Is there any problem with installing various linux bootloaders in the same boot partition (maybe because kernels get mixed or something)?

There are usually no kernels on the EFI partition. Regarding Ubuntu there are some EFI applications (the bootloader) and minimal grub.cfg files involved that point to the corresponding root partition and the individual complete grub.cfg maintained by update-grub.

Ideally both installs should have created different folders in \EFI\ (mounted as /boot/efi/EFI) like ubuntu and ubuntustudio and os-prober should have properly detected other existing operating systems. If there is an issue with the complete grub.cfg having malformed entries, then we need to take a closer look that this file.

Is there any problem with installing various linux bootloaders...

Sorry I digress. Yes, I know that installing Ubuntu several times (on separate disks) on a T530 like mine causes issues with the boot order entries in the firmware menu (another installation of Fedora has no problems, just the 2 Ubuntus interfere with each other).

If all OS are on one partition, so you can't boot them even if a default loader exists, then a possible workaround is to create a configuration in the default space that can boot all installed OS.

  1. Install the EFI loader with the removable option:

    grub-install --target x86_64-efi --removable /dev/sda
    
  2. Edit the newly created config file (nano /boot/efi/EFI/boot/grub.cfg) and replace the content with matching menu entries like this for example:

    set timeout=3
    menuentry 'Ubuntu' {
        chainloader /efi/ubuntu/grubx64.efi
    }
    menuentry 'Ubuntu Studio' {
        chainloader /efi/ubuntustudio/grubx64.efi
    }
    menuentry 'Windows' {
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
    }
    menuentry 'Firmware Setup' {
        fwsetup
    }
    
  3. Select to boot from the harddisk instead of an OS entry.

    If that doesn't work, pick the grub-mkimage line from my answer in UEFI machine doesn't boot Ubuntu through NVRAM bootcatalog. How to fix? and copy the resulting bootx64.efi to /boot/efi/EFI/boot/.

    If there doesn't exist a folder for each OS in /EFI/ make a copy of the existing Ubuntu and replace the UUID of the root filesystem with the UUID of the actual root filesystem in grub.cfg of that folder.

    If you need secure boot fucntionality rename EFI/boot/bootx64.efi to EFI/boot/grubx64.efi, copy EFI/ubuntu/shimx64.efi to EFI/boot/bootx64.efi and replace grubx64.efi with shimx64.efi in the example above.

Helpful questions:

LiveWireBT
LiveWireBT
December 19, 2014 13:11 PM

Related Questions


seperate EFI partitions per disk?

Updated June 27, 2017 09:02 AM



Ubuntu - win 8.1 dual boot - ssd and uefi woes

Updated July 13, 2015 22:00 PM

Restore Windows loader after deleting partition

Updated October 19, 2017 07:02 AM