Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 837566 - sys-boot/refind: '-r*' ending on kernels versions breaks automatic loading
Summary: sys-boot/refind: '-r*' ending on kernels versions breaks automatic loading
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-10 01:17 UTC by Randall
Modified: 2023-09-07 10:55 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
refind.conf (file_837566.txt,349 bytes, text/plain)
2022-04-10 01:18 UTC, Randall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randall 2022-04-10 01:17:36 UTC
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
Comment 1 Randall 2022-04-10 01:18:13 UTC
Created attachment 769712 [details]
refind.conf
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-04-10 16:22:47 UTC
I suppose you're building your own kernel and not using sys-kernel/gentoo-kernel*?
Comment 3 Randall 2022-04-10 16:24:10 UTC
Yes.
Comment 4 Randall 2022-04-10 16:25:20 UTC
Which is actually a good point, cause the makes this problem is specific to sys-kernel/gentoo-sources.
Comment 5 Viorel Munteanu gentoo-dev 2023-09-07 10:55:11 UTC
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.