1KERNEL-INSTALL(8)               kernel-install               KERNEL-INSTALL(8)
2
3
4

NAME

6       kernel-install - Add and remove kernel and initramfs images to and from
7       /boot
8

SYNOPSIS

10       kernel-install COMMAND [OPTIONS...] KERNEL-VERSION KERNEL-IMAGE
11                      [INITRD-FILE...]
12

DESCRIPTION

14       kernel-install is used to install and remove kernel and initramfs
15       images to and from the boot loader partition, referred to as $BOOT
16       here. It will usually be one of /boot, /efi, or /boot/efi, see below.
17
18       kernel-install will execute the files located in the directory
19       /usr/lib/kernel/install.d/ and the local administration directory
20       /etc/kernel/install.d/. All files are collectively sorted and executed
21       in lexical order, regardless of the directory in which they live.
22       However, files with identical filenames replace each other. Files in
23       /etc/kernel/install.d/ take precedence over files with the same name in
24       /usr/lib/kernel/install.d/. This can be used to override a
25       system-supplied executables with a local file if needed; a symbolic
26       link in /etc/kernel/install.d/ with the same name as an executable in
27       /usr/lib/kernel/install.d/, pointing to /dev/null, disables the
28       executable entirely. Executables must have the extension ".install";
29       other extensions are ignored.
30
31       An executable should return 0 on success. It may also return 77 to
32       cause the whole operation to terminate (executables later in lexical
33       order will be skipped).
34

COMMANDS

36       The following commands are understood:
37
38       add KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE ...]
39           This command expects a kernel version string and a path to a kernel
40           image file as arguments.  kernel-install calls the executables from
41           /usr/lib/kernel/install.d/*.install and
42           /etc/kernel/install.d/*.install with the following arguments:
43
44               add KERNEL-VERSION $BOOT/MACHINE-ID/KERNEL-VERSION/ KERNEL-IMAGE [INITRD-FILE ...]
45
46           Three default plugins execute the following operations in this
47           case:
48
49           ·   00-entry-directory.install creates the directory
50               $BOOT/MACHINE-ID/KERNEL-VERSION/ if $BOOT/MACHINE-ID/ already
51               exists.
52
53           ·   50-depmod.install runs depmod(8) for the KERNEL-VERSION.
54
55           ·   90-loaderentry.install copies KERNEL-IMAGE to
56               $BOOT/MACHINE-ID/KERNEL-VERSION/linux. If an INITRD-FILE is
57               provided, it also copies INITRD-FILE to
58               $BOOT/MACHINE-ID/KERNEL_VERSION/INITRD-FILE. It also creates a
59               boot loader entry according to the Boot Loader Specification[1]
60               in $BOOT/loader/entries/MACHINE-ID-KERNEL-VERSION.conf. The
61               title of the entry is the PRETTY_NAME parameter specified in
62               /etc/os-release or /usr/lib/os-release (if the former is
63               missing), or "Linux KERNEL-VERSION", if unset.
64
65               If the entry directory $BOOT/MACHINE-ID/KERNEL-VERSION/ does
66               not exist, this plugin does nothing.
67
68       remove KERNEL-VERSION
69           This command expects a kernel version string as single argument.
70           This calls executables from /usr/lib/kernel/install.d/*.install and
71           /etc/kernel/install.d/*.install with the following arguments:
72
73               remove KERNEL-VERSION $BOOT/MACHINE-ID/KERNEL-VERSION/
74
75           Afterwards, kernel-install removes the directory
76           $BOOT/MACHINE-ID/KERNEL-VERSION/ and its contents.
77
78           Two default plugins execute the following operations in this case:
79
80           ·   50-depmod.install removes the files generated by depmod for
81               this kernel again.
82
83           ·   90-loaderentry.install removes the file
84               $BOOT/loader/entries/MACHINE-ID-KERNEL-VERSION.conf.
85

THE $BOOT PARTITION

87       The partition where the kernels and Boot Loader Specification[1]
88       snippets are located is called $BOOT.  kernel-install determines the
89       location of this partition by checking /efi/, /boot/, and /boot/efi in
90       turn. The first location where $BOOT/loader/entries/ or
91       $BOOT/$MACHINE_ID/ exists is used.
92

OPTIONS

94       The following options are understood:
95
96       -v, --verbose
97           Output additional information about operations being performed.
98
99       -h, --help
100           Print a short help text and exit.
101

ENVIRONMENT VARIABLES

103       If --verbose is used, $KERNEL_INSTALL_VERBOSE=1 will be set for the
104       plugins. They may output additional logs in this case.
105

EXIT STATUS

107       If every executable returns 0 or 77, 0 is returned, and a non-zero
108       failure code otherwise.
109

FILES

111       /usr/lib/kernel/install.d/*.install /etc/kernel/install.d/*.install
112           Drop-in files which are executed by kernel-install.
113
114       /etc/kernel/cmdline /proc/cmdline
115           Read by 90-loaderentry.install. The content of the file
116           /etc/kernel/cmdline specifies the kernel command line to use. If
117           that file does not exist, /proc/cmdline is used.
118
119       /etc/kernel/tries
120           Read by 90-loaderentry.install. If this file exists a numeric value
121           is read from it and the naming of the generated entry file is
122           slightly altered to include it as
123           $BOOT/loader/entries/MACHINE-ID-KERNEL-VERSION+TRIES.conf. This is
124           useful for boot loaders such as systemd-boot(7) which implement
125           boot attempt counting with a counter embedded in the entry file
126           name.
127
128       /etc/machine-id
129           The content of the file specifies the machine identification
130           MACHINE-ID.
131
132       /etc/os-release /usr/lib/os-release
133           The content of the file specifies the operating system title
134           PRETTY_NAME.
135

SEE ALSO

137       machine-id(5), os-release(5), depmod(8), systemd-boot(7), Boot Loader
138       Specification[1]
139

NOTES

141        1. Boot Loader Specification
142           https://systemd.io/BOOT_LOADER_SPECIFICATION
143
144
145
146systemd 243                                                  KERNEL-INSTALL(8)
Impressum