site  news  contact

Install to PC with existing rEFind boot manager

August 09, 2022 — BarryK

Originally written March 17, 2019
Updated: March 23, 2020; July 9, 2020; April 24, 2022
Completely rewritten August 4, 2022

This page is written for EasyOS 4.2.2 or later.

There are other web pages that explain how to install EasyOS to an internal drive, such as this one, that focuses on installing to a computer with UEFI-firmware:

https://easyos.org/install/how-to-install-easyos-on-your-hard-drive.html

And this one, that focuses on installing to a legacy-BIOS-firmware computer:

https://easyos.org/install/easy-frugal-installation.html

They both recommend Limine bootloader, that is the "official" bootloader in EasyOS, with a really nice GUI installer.

However, EasyOS does also have the rEFInd bootloader (see /usr/share/refind), and that may be used as an alternative. Note that rEFInd only works on modern UEFI computers, not legacy-BIOS computers, whereas Limine works on both.

This page is a case-study, installing EasyOS to a computer that already has rEFInd installed. Well, you might have a computer that you want to install rEFInd to, so this page will also interest you.

So, whether you already have rEFInd installed, or intend to, read on to see how to install EasyOS and add a menu to rEFInd...

Install EasyOS to a ext4 partition

This is really easy. All that is required is to copy the three files 'vmlinuz', 'initrd' and 'easy.sfs' to a folder in a ext4 partition.

Those three files are in the EasyOS image file. See how to extract them here:

https://easyos.org/user/how-to-update-easyos.html#Manual_updating

Here is the scenario for this page:

The case study is the Author's mid-tower PC, which has Intel i5 CPU, 16GB RAM, 1TB and 4TB rotating-platter hard-drives, and one 500GB SSD.
The 1TB HD has sda1 to sda9 partitions, with sda1 a fat32 ESP partition with rEFind boot manager. The PC does not have Windows, it has various Linux distributions.

The Author decided to install EasyOS into sda9, which has a ext4 filesystem. Here created a folder named "easyos" and copied the three files into it:

img1

That's it, installed. Yes, really, that is all that has to be done.

The final step is to configure a bootmanager to boot EasyOS. In this case study, there is already rEFInd installed, so it is just a matter of creating a new menu entry...

Install and configure rEFInd

Before installing Easy, the computer had conventional "full" installations. This is what is in the partitions of sda:

sda1  ESP fat32
sda2  Quirky Pyro 0.6.2
sda3  Quirky Xerus 8.3
sda5  Quirky Xerus 8.6
sda7  file storage
sda7  swap
sda8  Slackware 14.2
sda9  unused

For those who have not yet installed rEFInd, and want to, here is how...

If running EasyOS on a USB-stick, copy /usr/share/refind/refind_x64.efi to EFI/BOOT/BOOTX64.EFI in the sda1 partition. If not running EasyOS, then rEFInd can be downloaded from its project site.

rEFInd also requires EFI/BOOT/refind.conf, which specifies the boot menu. The project site explains how to populate that file:

https://www.rodsbooks.com/refind/configfile.html 

Here is an example entry, to boot Slackware:

menuentry "Slackware64 14.2 (sda8)" {
volume intern1p8
 loader /boot/vmlinuz-slackware-4.4.14
ostype Linux
options "root=PARTUUID=64685683-08 rootwait rw"
}

...where "64685683" is the disk-identifier of sda, and the "-08" means partition number 8, together forming the partition-id. Well, as "sda8" is not going to change, could have put "root=/dev/sda8".

That format for PARTUUID, "64685683-08", is for a MBR drive. If the drive had a GPT, it would look different, for example "1911d005-c4cb-4f06-8975-208d32755084"

You can find the PARTUUID by running the 'lsblk' utility. Example if sda was a GPT:

# lsblk --pairs -o PARTUUID /dev/sda8
PARTUUID="1911d005-c4cb-4f06-8975-208d32755084"

Partition sda9 is where Easy is installed, so obtaining some information:

# lsblk --pairs -o LABEL,PARTUUID,UUID /dev/sda9
LABEL="intern1p9" PARTUUID="64685683-09" UUID="22b8fd34-d453-46c2-9ecf-d65b344a3be9"

The filesystem label is useful, as that is a way to specify the partition in a menu entry. UUID is the filesystem-id, different from the partition-id!

Here is the entry for rEFInd:
menuentry "EasyOS (partition sda9, folder easyos)" {
volume intern1p9
loader /easyos/vmlinuz
initrd /easyos/initrd
options "rw wkg_uuid=22b8fd34-d453-46c2-9ecf-d65b344a3be9 wkg_dir=easyos"
}
That's it, fully installed, ready to boot! 

Testing the installation

All that remains is to reboot, and EasyOS will be in the rEFInd boot menu...

img6

And she boots to the desktop... yay!

It should be noted though, there is one potential problem. In theory, the UEFI is supposed to see /EFI/BOOT/BOOTX64.EFI in the esp partition, and offer that as a boot choice. It may be the default.
However, prior installations on that computer, especially mainstream Linux distributions, may have installed GRUB2, which messes around with the UEFI boot choices.
In such a situation, it is possible that the rEFInd choice is not even offered in UEFI-Setup. In that case, you will have to use the 'efibootmgr' utility to fix the UEFI boot choices.
How to do that is something you would have to research online.


A disclaimer: Barry Kauler has provided these instructions in good faith, however there is a disclaimer of all responsibility if something does go wrong. if you are a Linux newbie and want to install Easy on the internal hard drive, it is recommended that you find a Linux-knowledgeable guy to help.

Tags: install