diff --git a/man/kernel-install.xml b/man/kernel-install.xml index 0bf57b4d53..26ae87f1d4 100644 --- a/man/kernel-install.xml +++ b/man/kernel-install.xml @@ -562,6 +562,13 @@ on the file name and extension: Files named initrd* will be installed as INITRD-FILEs, and files named microcode* will be prepended before INITRD-FILEs. + $KERNEL_INSTALL_ENTRY_NAME is set for the plugins to the resolved entry name, + derived by expanding specifiers in the entry name format string. This is the base name (without file + extension) used for UKI files, loader entry configuration files, and similar. By default this is + ENTRY-TOKEN-KERNEL-VERSION, + matching the traditional naming. See $KERNEL_INSTALL_ENTRY_NAME_FORMAT below for + details on the available specifiers. + @@ -589,6 +596,73 @@ The last two variables may also be set in install.conf. Variables set in the environment take precedence over the values specified in the config file. + + $KERNEL_INSTALL_ENTRY_NAME_FORMAT can be set to configure the format string + used to derive the entry name for boot loader entries and UKI files. The format string is expanded + using specifier expansion. May also be configured as entry_name_format= in + install.conf. The following specifiers are understood: + + + Specifiers available in <varname>$KERNEL_INSTALL_ENTRY_NAME_FORMAT</varname> + + + + + + + Specifier + Meaning + Details + + + + + + + + %e + Entry token + The entry token, same as $KERNEL_INSTALL_ENTRY_TOKEN. + + + + + + + + + %v + Kernel version + The kernel version being installed. Note that unlike the common specifier %v which expands to the currently running kernel version (i.e. uname -r), here it refers to the target kernel version passed to kernel-install. + + + + + + +
+ + The resolved entry name must be a valid filename (no path separators). Defaults to + %e-%v, which produces the traditional + ENTRY-TOKEN-KERNEL-VERSION + naming. + + For example, setting entry_name_format=%M_%A_%a on a system with + IMAGE_ID=myos, IMAGE_VERSION=20250830, and architecture + x86-64 would produce entry names like + myos_20250830_x86-64. + + Note that the entry name is resolved at the time of each + kernel-install invocation. If the format string uses specifiers that + depend on mutable system state (e.g. %M, %A, + %H), and that state changes between installing and removing a kernel, + the remove operation may compute a different entry name than + add did, leaving stale files on the boot partition. The + entry_name_format= setting should therefore remain stable across a + kernel's install/remove lifecycle. Additionally, the format should produce a unique name + for each installed kernel, e.g. by including %v (kernel version) or + %A (IMAGE_VERSION); otherwise installing multiple + kernels will overwrite each other's boot entries.
@@ -726,7 +800,8 @@ BOOT_ROOT=, layout=, initrd_generator=, - uki_generator=. + uki_generator=, + entry_name_format=. See the Environment variables section above for details.