Looking for help with reFind

Hey all! Current Arch user, but I learned to use Arch with EOS, so I hope it’s ok I came here with my questions.

Anyhow, I’m on a fresh install of Arch which I originally did with systemd using Archinstall.

I have installed reFind by downloading the refind package with pacman and then run refind-install.

Then after checking refind was working, I removed systemd boot using bootctl remove.

Now it’s where the confusion kicks in… if I boot from the autogenerated efi stanzas everything works fine, but if I use the general vm* ones system fails to boot, sometimes throwing a kernel panic.

Our of curiosity, I installed the cachyos kernel from the chaotic-aur which added itself to /boot, but when I try to use it the system fails to boot with the log on screen showing as if it’s trying to access a drive or mount point it cannot find.

Most of the info I find online about refind is how to do manual stanzas, but I actually would prefer to just leave it automatic, and I’m having trouble parsing what I’m supposed to do.

If there’s a friendly local refind expert I’d appreciate the help ^^

Thank you!

The automatic config generation has a couple “gotchas”. A big one is you need to uncomment the extra_kernel_version_strings option in refind.conf and specify which kernels you would like it to find matching initrds for, otherwise it will just use whatever initramfs image it finds first. If it tries to use the wrong one, it will fail to boot.

See this related section in the ArchWiki article: https://wiki.archlinux.org/title/REFInd#For_kernels_automatically_detected_by_rEFInd

For kernels automatically detected by rEFInd

rEFInd has two (or more) configuration files. refind.conf, which lies in the ESP, configures rEFInd itself. On the other hand refind_linux.conf lies in /boot, i.e. the directory that kernel images lie, and it configures how the kernels are booted.

For automatically detected kernels you can either specify the kernel parameters explicitly in /boot/refind_linux.conf or rely on rEFInd’s ability to identify the root partition and kernel parameters. See Methods of Booting Linux: For Those With Foresight or Luck: The Easiest Method for more information.

Tip:

For rEFInd to support the naming scheme of Arch Linux kernels and thus allow matching them with their respective initramfs images, you must uncomment and edit extra_kernel_version_strings option in refind.conf. E.g.:

esp/EFI/refind/refind.conf
...
extra_kernel_version_strings "linux-hardened,linux-rt-lts,linux-zen,linux-lts,linux-rt,linux"
...

Warning: Without extra_kernel_version_strings set, rEFInd will incorrectly pass the first initramfs it finds as the initrd= kernel parameter, instead of using the correct initramfs for the kernel. This will result in a failure to boot since the matching loadable kernel modules will not be available.

Note:

  • rEFInd only supports detecting one initramfs image per kernel, meaning it will not detect fallback initramfs nor external microcode initramfs images. If used, they must be specified manually.
  • Without the above extra_kernel_version_strings line, the %v variable in refind_linux.conf will not work for Arch Linux kernels.
1 Like

Thank you for all this info! I will give it another shot sometime.

You are a rockstar, I was missing the extra_kernel_version_strings and now it works like a charm!

Honestly that bit is so vital for Arch that it surprises me it’s hidden so deep into the wiki entry, it should probably be in the installation section.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.