Switiching to rEFInd from systemd-boot (w/ brtfs)

FWIW and for the record, what rEFInd does (mostly) is the autodiscovery of existing bootable files (.efi and initrd images) and UEFI entries, and provides a nice GUI to present them (taking advantage of efifb capabilities).

This can also be done with a properly developed grub.cfg (possibly consisting of more than one file).
A known example of this is the SuperGrub2 project.
This has been included in my next projects TODO list, for some time now. I have already created a very alpha version of a package which exists in my own grub menus. It is not exactly production ready, but after I finish with my current projects, I hope I can create a grub-based rEFInder :rofl: .

2 Likes

I have used rEFInd with grub either booting from grubx64.efi or the linuz-linux image file. Above i just tried with systemd-boot but i haven’t tried without any bootloaders? I’m not good with boot stanzas. :wink:

Shouldn’t need any boot stanzas in the absence of special needs. C couple of msgs ago described the process - as long as rEFInd can find a bootable file, it will present it. If it is not on a known filesystem, THEN there might be a difficulty. If I can find time (too many games to watch!) I’ll give it a shot to make sure… :grin:

1 Like

I know how to install and use rEFind with grub or using the vmlinuz-linux image file. I just don’t know how to set it up and use it if you uninstall systemd-boot. It’s not as simple as people make it out to be. If you don’t know the steps required then it doesn’t work

It should be as simple as any other vmlinuz-linux boot - as long as it is located where it can find it. As I mentioned, I’ll have to try it on another build shortly… maybe I’ll have to write an addendum for our wiki!

1 Like

I decided to install endeavourOS without any boot manager and then install rEFInd via chroot in the live system.
I’ll keep you updated on my success/failure :slight_smile:
Thanks for all the input!

1 Like

Okay i think i’m ready to give up now and just stick to systemd-boot.

I tried reinstallting endeavourOS without any bootloader, i also added refind to the customized installation process aswell as a user script:

refind-install
mkdir /efi/EFI/refind/drivers_x64
cp /usr/share/refind/drivers_x64/btrfs_x64.efi /efi/EFI/refind/drivers_x64

i hoped that this might already do the trick but sadly not.
This way the initramfs-linux.img and vmlinuz-linux files were installed to /boot though which i hoped would be easier for me to configure regarding to refind.conf because many examples were structured that way.
I tried different manual boot stanzes and it always ended with “Invalid loader file! Error Not Found while loading vmlinuz-linux”
Then i read something that rEFInd does not really work when /boot is encrypted and thats the place were the kernel resides. On the other hand i saw many examples where encryption was used.

I don’t know if it’s a problem with refind.conf or refind_linux.confor something else entirely. Sometimes i read the manual stanzas are not really necessary when there is only one OS and refind_linux.conf is all you need + it is configured automatically through refind-install, but that did not really worked for me :confused:
Since i’m still clueless what the problem is and already spent to much time i stick to systemd-boot.

for anyone who needs to chroot into the system here’s what you need to do when using btrfs:

lsblk -f
sudo cryptsetup open /dev/nvme0n1p2 enc_part #change /dev/XXX accordingly
sudo mount /dev/mapper/enc_part /mnt
less /mnt/@/etc/fstab #save output
# mount every subvolume listed in fstab
sudo mount -o subvol=@ /dev/mapper/enc_part /mnt/
sudo mount -o subvol=@home /dev/mapper/enc_part /mnt/home
sudo mount -o subvol=@cache /dev/mapper/enc_part /mnt/var/cache
sudo mount -o subvol=@log /dev/mapper/enc_part /mnt/var/log
sudo mount /dev/nvme0n1p1 /mnt/efi #change /dev/XXX accordingly to esp
chroot /mnt/