From 4b2d80bb0a9725a871aaec1d0abeeb4fee2c6eda Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Jun 2018 18:14:22 +0200 Subject: [PATCH] man: update kernel-install(8) documentation Many general updates, but most importantly, document the /etc/kernel/tries logic briefly. --- man/kernel-install.xml | 92 +++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 32 deletions(-) diff --git a/man/kernel-install.xml b/man/kernel-install.xml index 884b25da9b..83e50c8d70 100644 --- a/man/kernel-install.xml +++ b/man/kernel-install.xml @@ -63,49 +63,61 @@ add KERNEL-VERSION KERNEL-IMAGE - kernel-install creates the directory + This command expects a kernel version string and a path to a kernel image file as + arguments. kernel-install creates the directory /boot/MACHINE-ID/KERNEL-VERSION/ - and calls executables from - /usr/lib/kernel/install.d/*.install and - /etc/kernel/install.d/*.install with - the arguments - add KERNEL-VERSION \ - /boot/MACHINE-ID/KERNEL-VERSION/ KERNEL-IMAGE + and calls the executables from /usr/lib/kernel/install.d/*.install and + /etc/kernel/install.d/*.install with the following arguments: + + add KERNEL-VERSION /boot/MACHINE-ID/KERNEL-VERSION/ KERNEL-IMAGE - The kernel-install plugin 50-depmod.install runs depmod for the KERNEL-VERSION. + Two default plugins execute the following operations in this case: - The kernel-install plugin - 90-loaderentry.install copies - KERNEL-IMAGE to - /boot/MACHINE-ID/KERNEL-VERSION/linux. - It also creates a boot loader entry according to the boot - loader specification in - /boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf. - The title of the entry is the - PRETTY_NAME parameter specified - in /etc/os-release or - /usr/lib/os-release (if the former is - missing), or "Linux - KERNEL-VERSION", if unset. If - the file initrd is found next to the - linux file, the initrd will be added to - the configuration. + + + 50-depmod.install runs + depmod8 for the + KERNEL-VERSION. + + 90-loaderentry.install copies KERNEL-IMAGE + to + /boot/MACHINE-ID/KERNEL-VERSION/linux. + It also creates a boot loader entry according to the Boot Loader Specification in + /boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf. + The title of the entry is the PRETTY_NAME parameter specified in + /etc/os-release or /usr/lib/os-release (if the former is + missing), or "Linux KERNEL-VERSION", if unset. If the file + initrd is found next to the kernel image file, the initrd will be added to the + configuration. + remove KERNEL-VERSION - Calls executables from /usr/lib/kernel/install.d/*.install - and /etc/kernel/install.d/*.install with the arguments + This command expects a kernel version string as single argument. This calls executables from + /usr/lib/kernel/install.d/*.install and + /etc/kernel/install.d/*.install with the following arguments: + remove KERNEL-VERSION /boot/MACHINE-ID/KERNEL-VERSION/ - kernel-install removes the entire directory - /boot/MACHINE-ID/KERNEL-VERSION/ afterwards. + Afterwards, kernel-install removes the directory + /boot/MACHINE-ID/KERNEL-VERSION/ + and its contents. + + Two default plugins execute the following operations in this case: + + + + 50-depmod.install removes the files generated by depmod for this kernel again. + + 90-loaderentry.install removes the file + /boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf. + - The kernel-install plugin 90-loaderentry.install removes the file - /boot/loader/entries/MACHINE-ID-KERNEL-VERSION.conf. @@ -136,8 +148,22 @@ /proc/cmdline - The content of the file /etc/kernel/cmdline specifies the kernel command line to use. - If that file does not exist, /proc/cmdline is used. + Read by 90-loaderentry.install. The content of the file + /etc/kernel/cmdline specifies the kernel command line to use. If that file does not + exist, /proc/cmdline is used. + + + + + /etc/kernel/tries + + + Read by 90-loaderentry.install. If this file exists a numeric value is read from + it and the naming of the generated entry file is slightly altered to include it as + /boot/loader/entries/MACHINE-ID-KERNEL-VERSION+TRIES.conf. This + is useful for boot loaders such as + systemd-boot7 which + implement boot attempt counting with a counter embedded in the entry file name. @@ -165,6 +191,8 @@ machine-id5, os-release5, + depmod8, + systemd-boot7, Boot Loader Specification