Closed AndrewAmmerlaan closed 4 months ago
Good idea, will investigate and integrate this
I've implemented reading os-release for kernel prefix here https://github.com/Biosias/uefi-mkconfig/commit/385afb44f1066e18d3948286e9a5099da3542f30 .
If you are able to, could you please send me an example of how insides of /etc/kernel/entry-token
looks like ? I have never seen it nor have I been able to find example online so far.
If you are able to, could you please send me an example of how insides of /etc/kernel/entry-token looks like ? I have never seen it nor have I been able to find example online so far.
It contains simple plain text, similar to /etc/kernel/cmdline
. Here's mine as an example:
andrew@andrew-gentoo-laptop ~ % cat /etc/kernel/entry-token
linux
Nice, thank you very much!
I've added sourcing prefixes from entry-token files in https://github.com/Biosias/uefi-mkconfig/commit/5e27582d464ce2464a7b60afc749e6985919768c
Great, Thanks! I'll close this issue then.
By the way, could you maybe do a quick double check of the logic we use to set the kernel command line for the boot entry? There was a user on the forum that seemed to be having difficulty setting the cmdline, but this may also just be a case of the firmware being weird: https://forums.gentoo.org/viewtopic-t-1168382-highlight-installkernel.html
We currently hardcode "gentoo" as a valid prefix for the kernel. If we read the value of
ID
from/etc/os-release
or/usr/lib/os-release
and use this instead we can avoid hardcoding the distribution name and therefore achieve support for arbitrary distributions.Something else to consider is reading the contents of
/etc/kernel/entry-token
or/usr/lib/kernel/entry-token
(if they exist) and uses these as valid prefix'es as well. The contents of these files are used by systemd'skernel-install
to prefix UKI entries.