-
Notifications
You must be signed in to change notification settings - Fork 7
/
installkernel.8
102 lines (102 loc) · 3.39 KB
/
installkernel.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
.TH INSTALLKERNEL 8 "2019-12-06" "Gentoo Linux"
.SH NAME
installkernel \- install a new kernel image
.SH SYNOPSIS
.BI "installkernel " "version zImage System.map [directory]"
.SH DESCRIPTION
.PP
.B installkernel
installs a new kernel image onto the system from the Linux source
tree. It is called by the Linux kernel makefiles when
.B make install
is invoked there, and also by portage when distribution kernels are installed.
.P
If an unified kernel image was generated, it is installed as
.IR {directory}/vmlinuz-{version}.efi .
Otherwise, the new kernel is installed into
.IR {directory}/vmlinuz-{version} .
If a symbolic link
.I {directory}/vmlinuz
already exists, it is refreshed by making a link from
.I {directory}/vmlinuz
to the new kernel, and the previously installed kernel is available as
.IR {directory}/vmlinuz.old .
.P
In addition to that,
.I System.map
passed on the command-line is installed using the same logic.
If the directory containing
.I System.map
contains
.I .config
file, it is also installed. If the directory containing the kernel image
contains an
.I initrd
file, it is also installed.
.P
Kernel installs are logged to
.IR /var/log/installkernel.log
in a tab separated file containing the columns:
DATE, KI_VENDOR, VERSION, CONF_ROOT, LAYOUT, INITRD_GEN, UKI_GEN, BOOT_ROOT, KERNEL_REL_PATH, INITRD_REL_PATH and PLUGIN_OVERRIDE.
.P
If systemd's kernel-install is present on the system and the environment
variable
.B SYSTEMD_KERNEL_INSTALL
is set to 1, then it is called to install the kernel. The default setting
for this environment variable is controlled by the installkernel ebuild. When
kernel installation is delegated to systemd's kernel-install this manual is not
applicable. See the kernel-install manual for more information. Systemd's
kernel-install supports various different layouts, the default "compat" layout
is similar, but not identical, to the layout used by this installkernel. The
locations of plugin scripts, as well as recognized environment variables, are
also different.
.SH BUGS
installkernel resides in /sbin only because the Linux kernel makefiles
call it from there. It should really be in /usr/sbin. It isn't
needed to boot a system.
.SH PLUGINS
Custom preinst and postinst plugin scripts may be installed into
.IR /etc/kernel/preinst.d
and
.IR /etc/kernel/postinst.d.
Plugins provided by packages should be installed into
.IR /usr/lib/kernel/preinst.d
and
.IR /usr/lib/kernel/postinst.d
instead.
Plugin scripts that generate an initramfs should install the generated
initramfs, named "initrd", in the same location as the kernel image. Plugin
scripts that generate an unified kernel image should install the generated UKI,
named "uki.efi", in the same location as the kernel image.
The environment variables
.B INSTALLKERNEL_PREINST_PLUGINS
and
.B INSTALLKERNEL_POSTINST_PLUGINS
may be used to provide a custom list of plugin scripts to execute
.P
The settings
.RS
.IP \(bu (bullet)
layout
.IP \(bu (bullet)
initrd_generator
.IP \(bu (bullet)
uki_generator
.RE
are read from
.IR /usr/lib/kernel/install.conf
and/or
.IR /etc/kernel/install.conf
, where the latter takes precedence over the former. And exposed to the plugins
as:
.RS
.IP \(bu (bullet)
INSTALLKERNEL_LAYOUT
.IP \(bu (bullet)
INSTALLKERNEL_INITRD_GENERATOR
.IP \(bu (bullet)
INSTALLKERNEL_UKI_GENERATOR
.RE
respectively. If the environment variable
.B INSTALLKERNEL_CONF_ROOT
is set, then the install.conf at this location is used instead.