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/

Well try out bootctl remove and remove any kernel images in your /boot or /efi directory .

After which, run sudo pacman -R kernel-install-for-dracut , after which , run yay -S dracut-hook && linux linux-headers followed by running refind-install

.Reboot and see if the system boots and shows EOS as an option.rEFIndā€™s autodetect should detect the files.

Please paste out the part of your refind.conf which specifies the boot entry and initramfs files . I think I might be able help you.

EDIT:This works , just tried it on my host system.

:rofl:

1 Like

Maybe the op still wants rEFInd ? :skull:

1 Like

Well thanks for your offer to help. I continued using systemd-boot and unfortunately I donā€™t have time to try out something so fundamental at the moment.

1 Like

You were right! Somewhatā€¦ :sweat_smile:

Perhaps thatā€™s why a year later itā€™s still called rEFIND? :man_shrugging:

[EDIT: @Hitman_Agent47 tā€™was an early morning feeble attempt at humor.]

2 Likes

Well if you would change your mind sometime then please do consider my reply . I have made some massive edits and tried it out on my host system.

2 Likes