The '-r*' versioning of kernels ending with '*.*.*-gentoo-r*' is causing refind's automatic loading capabilities to break. In my case, my kernel version is 5.15.32-r1; so in my refind.conf (attached), "initrd=initramfs-%v-gentoo-r1.img" (I'm using Dracut) should work, but it doesn't. Furthermore, IMO, "initrd=initramfs-%v-gentoo-r1.img" beats the purpose of the automatic loading feature, as it would require the user to keep updating (or remove) the '-r*' parts. Ideally, all kernel versions should end "*.*.*.-gentoo" or in a more predictable manner; therefore, the user could keep your refind.conf consistent and the auto finding featuring working. (In my use case, "initrd=initramfs-%v-gentoo.img") As a workaround, I did end up having to hard line the version in refind.conf. However, genr8eofl (on IRC) also suggested it possible simply remove the '-r*' from /boot, /EFI and /lib/modules, and avoid having to modify refind.conf Reproducible: Always
Created attachment 769712 [details] refind.conf
I suppose you're building your own kernel and not using sys-kernel/gentoo-kernel*?
Yes.
Which is actually a good point, cause the makes this problem is specific to sys-kernel/gentoo-sources.
I don't know what is the default naming scheme for kernels, but if your kernel is named for example bzImage-5.15.32-gentoo-r1.efi, %v would be `5.15.32-gentoo-r1`, so refind_linux.conf should only contain `initrd=initramfs-%v.img` (%v contains everything from the first digit to the last digit). If that is not the case, please post a ls in that directory, so I can see what they look like.
I installed sys-kernel/gentoo-kernel-bin-6.6.58-r2 and the files in /boot are: /boot/vmlinuz-6.6.58-gentoo-dist /boot/initramfs-6.6.58-gentoo-dist.img There is no -r2 in the generated name, so I will assume this bug is resolved. Please reopen if you have a concrete example based on current kernel sources.