Uldreth
Posts: 5
Joined: Tue Aug 15, 2017 10:53 am

Using GRUB with Solus on UEFI

Mon Sep 04, 2017 6:24 pm

Introduction:

For Legacy/MBR, Solus uses GRUB as bootloader, like most other modern GNU/Linux distributions. However, for EFI/GPT, Solus uses a bootloader called goofiboot, instead of GRUB.

It needs to be said, that Legacy/MBR allowed only one bootloader to exist per physical drive, hence a good bootloader had to be able to handle multiple operating systems, if a multiboot scenario was to be realized. Which is also the reason why in Legacy mode with MBR partitioning scheme, if one wishes to dual boot MS Windows with a Linux distro, one should install Windows first. Both operating system will override the other's bootloader, but only Linux' bootloader (GRUB) can handle both systems.

UEFI/GPT changed this. Multiple bootloaders can exist simultanously on a partition called ESP (EFI System Partition - not to be confused with extrasensory perception). These bootloaders can be swapped in EFI. There are usually two ways to go around that. In the main EFI interface (obtained by incessantly hammering a key like F2, F12 etc. during startup), one should see something like this:

Image

Do note that my machine is an ASUS X550V laptop, different models will have different layouts for the interface. Here "boot" denotes the bootloader for my Arch Linux installation (which is GRUB), and "Linux Boot Manager" denotes the Solus bootloader (which is goofiboot). One my select a bootloader, and that will be used as default from then on.

The other way is to hammer a different key (for me, it is ESC), then one may arrive at a menu that looks like this:

Image

This is often called the "One-time boot menu", here a selection does not change the default bootloader. Selecting "boot" (Arch Linux' GRUB) will give the usual GRUB screen (at this stage, without the Solus entry):

Image

while selecting "Linux Boot Manager" will give Solus' boot menu:

Image

If the Solus boot menu doesn't appear for you, you can make it appear by hammering a key (like space), and you can set timeout by booting into Solus, and typing

Code: Select all

sudo clr-boot-manager set-timeout 5
then

Code: Select all

sudo clr-boot-manager update
then reboot. This will set a timeout of 5 secs.

Thus, dual booting is possible without problems, through EFI's own boot menu. Some people (me definitely) might find this inconvenient, however, and may wish to use a single bootloader for all their operating systems. This guide will explain how to use the bootloader of another Linux distribution (provided said distro uses GRUB) to boot both that distro and Solus. For me this other distro is Arch Linux, however for the sake of neutrality I will refer to it as "Other Linux".

Steps:

I will note that Solus with UEFI simply doesn't support GRUB. Period. I assume it is absolutely possible to set it up properly with GRUB, but this would include having to do some major manipulation of the distro at a pretty low level, this is probably both hard and dangerous. Instead, we will simply make an entry in Other Linux' GRUB, which will point to Solus' bootloader. The GRUB entry will only invoke Solus' bootloader, and then Solus' bootloader will boot Solus.
  • Step 1: Boot Other Linux.
  • Step 2: We will need to check two things. One is, how does the /boot folder of Other Linux look like. In particular, within /boot, we need to find something like /boot/EFI/goofiboot/goofibootx64.efi. This is just one possible path, afaik it can also be /boot/efi/EFI/goofiboot/goofibootx64.efi. You will need to remember this path. Here is a screenshot of mine for reference:

    Image
  • Step 3: The other thing we need to check is the name of the ESP (EFI System Partition). This will be almost certainly sda1, but do check it. Here is a screenshot of GParted showing my ESP:

    Image
  • Step 4: Use a text editor (in my case, it is nano, use whatever you want, but you must be able to open a file with root rights) to open /etc/grub.d/40_custom . Remember we are still in Other Linux. For nano, you can do this by

    Code: Select all

    sudo nano /etc/grub.d/40_custom
    Leave the contents of this file alone, but add the following code to the end of the file:

    Code: Select all

    menuentry "Solus" {
            insmod part_gpt
            insmod fat
            set root="hd0,gpt1"
            chainloader /EFI/goofiboot/goofibootx64.efi}
    Things to note here: hd0 is the name of your physical drive. It numbers from 0. So first drive is hd0, second hd1 etc. gpt1 is essentially sda1, if hd0 corresponds to sda. You will need to place the correct names here. The path in the entry that starts with "chainloader", it might also need to be modified, depending on the path I have asked you to check in Step 2. Everything after /boot should be here, but if it doesn't work, feel free to experiment. Here is a screenshot:

    Image

    Afterwards save and exit (for nano, press ctrl+X, then when it asks if you want to save it, press Y for "yes").
  • Step 5: Open a terminal and type

    Code: Select all

    sudo grub-mkconfig -o /boot/grub/grub.cfg
    to refresh GRUB. Now reboot and if needed, set EFI to use Other Linux' bootloader (in my example, "boot"). When it gets to GRUB, there should be an entry for Solus. When you select that entry, you should arrive at Solus' bootloader menu.

jppmarujo
Posts: 2
Joined: Sun Oct 01, 2017 1:12 am

Re: Using GRUB with Solus on UEFI

Mon Oct 02, 2017 2:23 am

Great tutorial!
Can i ask what Conky theme are you using and how can i get it? It looks amazing (it seems some derivative of Vision).

Thank you, for both things! :)

Return to “Tutorials”