summaryrefslogtreecommitdiffstats
path: root/upstream/mageia-cauldron/man8/kernel-install.8
blob: 6c8d93d98c7e245b7d59c9e0db02525538cb232b (plain)
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
'\" t
.TH "KERNEL\-INSTALL" "8" "" "systemd 255" "kernel-install"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
kernel-install \- Add and remove kernel and initrd images to and from /boot
.SH "SYNOPSIS"
.HP \w'\fBkernel\-install\fR\ 'u
\fBkernel\-install\fR [OPTIONS...] add \fIKERNEL\-VERSION\fR \fIKERNEL\-IMAGE\fR [\fIINITRD\-FILE\fR...]
.HP \w'\fBkernel\-install\fR\ 'u
\fBkernel\-install\fR [OPTIONS...] remove \fIKERNEL\-VERSION\fR
.HP \w'\fBkernel\-install\fR\ 'u
\fBkernel\-install\fR [OPTIONS...] inspect [\fIKERNEL\-VERSION\fR] [\fIKERNEL\-IMAGE\fR] [\fIINITRD\-FILE\fR...]
.HP \w'\fBkernel\-install\fR\ 'u
\fBkernel\-install\fR [OPTIONS...] list
.SH "DESCRIPTION"
.PP
\fBkernel\-install\fR
is used to install and remove kernel and initrd images
\&\s-2\u[1]\d\s+2
to and from the boot loader partition, referred to as
\fI$BOOT\fR
here\&. It will usually be one of
/boot/,
/efi/, or
/boot/efi/, see below\&.
.PP
\fBkernel\-install\fR
will run the executable files ("plugins") located in the directory
/usr/lib/kernel/install\&.d/
and the local administration directory
/etc/kernel/install\&.d/\&. All files are collectively sorted and executed in lexical order, regardless of the directory in which they live\&. However, files with identical filenames replace each other\&. Files in
/etc/kernel/install\&.d/
take precedence over files with the same name in
/usr/lib/kernel/install\&.d/\&. This can be used to override a system\-supplied executables with a local file if needed; a symbolic link in
/etc/kernel/install\&.d/
with the same name as an executable in
/usr/lib/kernel/install\&.d/, pointing to
/dev/null, disables the executable entirely\&. Executables must have the extension
"\&.install"; other extensions are ignored\&.
.PP
An executable placed in these directories should return
\fB0\fR
on success\&. It may also return
\fB77\fR
to cause the whole operation to terminate (executables later in lexical order will be skipped)\&.
.SH "COMMANDS"
.PP
The following commands are understood:
.PP
\fBadd [[[\fR\fB\fIKERNEL\-VERSION\fR\fR\fB] \fR\fB\fIKERNEL\-IMAGE\fR\fR\fB] [\fR\fB\fIINITRD\-FILE\fR\fR\fB \&.\&.\&.]]\fR
.RS 4
This command takes a kernel version string and a path to a kernel image file as arguments\&. If the former is omitted, specified as an empty string or as "\-" it defaults to the current kernel version, i\&.e\&. the same string
\fBuname \-r\fR
returns\&. If the latter is omitted, specified as an empty string or as "\-" defaults to
/usr/lib/modules/\fIKERNEL_VERSION\fR/vmlinuz\&. Optionally, one or more initrd images may be specified as well (note that plugins might generate additional ones)\&.
.sp
The executable files from
/usr/lib/kernel/install\&.d/*\&.install
and
/etc/kernel/install\&.d/*\&.install
(i\&.e\&. the plugins) are called with the following arguments:
.sp
.if n \{\
.RS 4
.\}
.nf
add \fIKERNEL\-VERSION\fR $BOOT/\fIENTRY\-TOKEN\fR/\fIKERNEL\-VERSION\fR/ \fIKERNEL\-IMAGE\fR \e
          [\fIINITRD\-FILE\fR \&.\&.\&.]
.fi
.if n \{\
.RE
.\}
.sp
The third argument directly refers to the path where to place kernel images, initrd images and other resources for
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
Type #1 entries (the "entry directory")\&. If other boot loader schemes are used the parameter may be ignored\&.
.sp
The
\fIENTRY\-TOKEN\fR
string is typically the machine ID and is supposed to identify the local installation on the system\&. For details see below\&.
.sp
Two default plugins execute the following operations in this case:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBkernel\-install\fR
creates
$BOOT/\fIENTRY\-TOKEN\fR/\fIKERNEL\-VERSION\fR, if enabled (see
\fI$KERNEL_INSTALL_LAYOUT\fR)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
50\-depmod\&.install
runs
\fBdepmod\fR(8)
for the
\fIKERNEL\-VERSION\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
90\-loaderentry\&.install
copies
\fIKERNEL\-IMAGE\fR
to
$BOOT/\fIENTRY\-TOKEN\fR/\fIKERNEL\-VERSION\fR/linux\&. If
\fIINITRD\-FILE\fRs are provided, it also copies them to
$BOOT/\fIENTRY\-TOKEN\fR/\fIKERNEL_VERSION\fR/\fIINITRD\-FILE\fR\&. This can also be used to prepend microcode before the actual initrd\&. It also creates a boot loader entry according to the
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
(Type #1) in
$BOOT/loader/entries/\fIENTRY\-TOKEN\fR\-\fIKERNEL\-VERSION\fR\&.conf\&. The title of the entry is the
\fIPRETTY_NAME\fR
parameter specified in
/etc/os\-release
or
/usr/lib/os\-release
(if the former is missing), or "Linux
\fIKERNEL\-VERSION\fR", if unset\&.
.sp
If
\fI$KERNEL_INSTALL_LAYOUT\fR
is not "bls", this plugin does nothing\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
90\-uki\-copy\&.install
copies a file
uki\&.efi
from
\fI$KERNEL_INSTALL_STAGING_AREA\fR
or if it does not exist the
\fIKERNEL\-IMAGE\fR
argument, only if it has a
"\&.efi"
extension, to
$BOOT/EFI/Linux/\fIENTRY\-TOKEN\fR\-\fIKERNEL\-VERSION\fR\&.efi\&.
.sp
If
\fI$KERNEL_INSTALL_LAYOUT\fR
is not "uki", this plugin does nothing\&.
.RE
.sp
Added in version 198\&.
.RE
.PP
\fBadd\-all\fR
.RS 4
This is the same as
\fBadd\fR
(see above), but invokes the operation iteratively for every installed kernel in
/usr/lib/modules/\&. This operation is only supported on systems where the kernel image is installed in
/usr/lib/modules/\fIKERNEL\-VERSION\fR/vmlinuz\&.
.sp
Added in version 255\&.
.RE
.PP
\fBremove \fR\fB\fIKERNEL\-VERSION\fR\fR
.RS 4
This command expects a kernel version string as single argument\&.
.sp
The executable files from
/usr/lib/kernel/install\&.d/*\&.install
and
/etc/kernel/install\&.d/*\&.install
(i\&.e\&. the plugins) are called with the following arguments:
.sp
.if n \{\
.RS 4
.\}
.nf
remove \fIKERNEL\-VERSION\fR $BOOT/\fIENTRY\-TOKEN\fR/\fIKERNEL\-VERSION\fR/
.fi
.if n \{\
.RE
.\}
.sp
Afterwards,
\fBkernel\-install\fR
removes the entry directory
$BOOT/\fIENTRY\-TOKEN\fR/\fIKERNEL\-VERSION\fR/
and its contents, if it exists\&.
.sp
Two default plugins execute the following operations in this case:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
50\-depmod\&.install
removes the files generated by
\fBdepmod\fR
for this kernel again\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
90\-loaderentry\&.install
removes the file
$BOOT/loader/entries/\fIENTRY\-TOKEN\fR\-\fIKERNEL\-VERSION\fR\&.conf\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
90\-uki\-copy\&.install
removes the file
$BOOT/EFI/Linux/\fIENTRY\-TOKEN\fR\-\fIKERNEL\-VERSION\fR\&.efi\&.
.RE
.sp
Added in version 198\&.
.RE
.PP
\fBinspect [[[\fR\fB\fIKERNEL\-VERSION\fR\fR\fB] \fR\fB\fIKERNEL\-IMAGE\fR\fR\fB] [\fR\fB\fIINITRD\-FILE\fR\fR\fB \&.\&.\&.]]\fR
.RS 4
Takes the same parameters as
\fBadd\fR\&.
.sp
Shows the various paths and parameters configured or auto\-detected\&. In particular shows the values of the various
\fI$KERNEL_INSTALL_*\fR
environment variables listed below, as they would be passed to plugins\&. The
\fB\-\-json\fR
option can be used to get the output of this verb as a JSON object\&.
.sp
Added in version 251\&.
.RE
.PP
\fBlist\fR
.RS 4
Shows the various installed kernels\&. This enumerates the subdirectories of
/usr/lib/modules/, and shows whether a kernel image is installed there\&.
.sp
Added in version 255\&.
.RE
.SH "COMPATIBILITY WITH THE KERNEL BUILD SYSTEM"
.HP \w'\fBinstallkernel\fR\ 'u
\fBinstallkernel\fR [OPTIONS...] VERSION VMLINUZ [MAP] [INSTALLATION\-DIR]
.PP
When invoked as
\fBinstallkernel\fR, this program accepts arguments as specified by the kernel build system\*(Aqs
\fBmake install\fR
command\&. The
\fIVERSION\fR
and
\fIVMLINUZ\fR
parameters specify the kernel version and the kernel binary\&. The other two parameters (\fIMAP\fR
and
\fIINSTALLATION\-DIR\fR) are currently ignored\&.
.SH "THE \FI$BOOT\FR PARTITION"
.PP
The partition where the kernels and
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
snippets are located is called
\fI$BOOT\fR\&.
\fBkernel\-install\fR
determines the location of this partition by checking
/efi/,
/boot/, and
/boot/efi/
in turn\&. The first location where
$BOOT/loader/entries/
or
$BOOT/\fIENTRY\-TOKEN\fR/
exists is used\&.
.SH "OPTIONS"
.PP
The following options are understood:
.PP
\fB\-\-esp\-path=\fR
.RS 4
Path to the EFI System Partition (ESP)\&. If not specified,
/efi/,
/boot/, and
/boot/efi/
are checked in turn\&. It is recommended to mount the ESP to
/efi/, if possible\&.
.RE
.PP
\fB\-\-boot\-path=\fR
.RS 4
Path to the Extended Boot Loader partition, as defined in the
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2\&. If not specified,
/boot/
is checked\&. It is recommended to mount the Extended Boot Loader partition to
/boot/, if possible\&.
.RE
.PP
\fB\-\-make\-entry\-directory=yes|no|auto\fR
.RS 4
Controls creation and deletion of the
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
Type #1 entry directory on the file system containing resources such as kernel and initrd images during
\fBadd\fR
and
\fBremove\fR, respectively\&. The directory is named after the entry token, and is placed immediately below the boot root directory\&. When
"auto", the directory is created or removed only when the install layout is
"bls"\&. Defaults to
"auto"\&.
.sp
Added in version 254\&.
.RE
.PP
\fB\-\-entry\-token=\fR
.RS 4
Controls how to name and identify boot loader entries for this kernel installation or deletion\&. Takes one of
"auto",
"machine\-id",
"os\-id",
"os\-image\-id", or an arbitrary string prefixed by
"literal:"
as argument\&.
.sp
If set to
\fBmachine\-id\fR
the entries are named after the machine ID of the running system (e\&.g\&.
"b0e793a9baf14b5fa13ecbe84ff637ac")\&. See
\fBmachine-id\fR(5)
for details about the machine ID concept and file\&.
.sp
If set to
\fBos\-id\fR
the entries are named after the OS ID of the running system, i\&.e\&. the
\fIID=\fR
field of
\fBos-release\fR(5)
(e\&.g\&.
"fedora")\&. Similarly, if set to
\fBos\-image\-id\fR
the entries are named after the OS image ID of the running system, i\&.e\&. the
\fIIMAGE_ID=\fR
field of
os\-release
(e\&.g\&.
"vendorx\-cashier\-system")\&.
.sp
If set to
\fBauto\fR
(the default), the
/etc/kernel/entry\-token
(or
$KERNEL_INSTALL_CONF_ROOT/entry\-token) file will be read if it exists, and the stored value used\&. Otherwise if the local machine ID is initialized it is used\&. Otherwise
\fIIMAGE_ID=\fR
from
os\-release
will be used, if set\&. Otherwise,
\fIID=\fR
from
os\-release
will be used, if set\&. Otherwise a randomly generated machine ID is used\&.
.sp
Using the machine ID for naming the entries is generally preferable, however there are cases where using the other identifiers is a good option\&. Specifically: if the identification data that the machine ID entails shall not be stored on the (unencrypted)
\fI$BOOT_ROOT\fR
partition, or if the ID shall be generated on first boot and is not known when the entries are prepared\&. Note that using the machine ID has the benefit that multiple parallel installations of the same OS can coexist on the same medium, and they can update their boot loader entries independently\&. When using another identifier (such as the OS ID or the OS image ID), parallel installations of the same OS would try to use the same entry name\&. To support parallel installations, the installer must use a different entry token when adding a second installation\&.
.sp
Added in version 254\&.
.RE
.PP
\fB\-v\fR, \fB\-\-verbose\fR
.RS 4
Output additional information about operations being performed\&.
.sp
Added in version 242\&.
.RE
.PP
\fB\-\-root=\fR\fB\fIroot\fR\fR
.RS 4
Takes a directory path as an argument\&. All paths will be prefixed with the given alternate
\fIroot\fR
path, including config search paths\&. This is useful to operate on a system image mounted to the specified directory instead of the host system itself\&.
.sp
Added in version 255\&.
.RE
.PP
\fB\-\-image=\fR\fB\fIimage\fR\fR
.RS 4
Takes a path to a disk image file or block device node\&. If specified, all operations are applied to the file system in the indicated disk image\&. This option is similar to
\fB\-\-root=\fR, but operates on file systems stored in disk images or block devices\&. The disk image should either contain just a file system or a set of file systems within a GPT partition table, following the
\m[blue]\fBDiscoverable Partitions Specification\fR\m[]\&\s-2\u[3]\d\s+2\&. For further information on supported disk images, see
\fBsystemd-nspawn\fR(1)\*(Aqs switch of the same name\&.
.sp
Added in version 255\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a short help text and exit\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print a short version string and exit\&.
.RE
.PP
\fB\-\-no\-pager\fR
.RS 4
Do not pipe output into a pager\&.
.RE
.PP
\fB\-\-json=\fR\fIMODE\fR
.RS 4
Shows output formatted as JSON\&. Expects one of
"short"
(for the shortest possible output without any redundant whitespace or line breaks),
"pretty"
(for a pretty version of the same, with indentation and line breaks) or
"off"
(to turn off JSON output, the default)\&.
.RE
.PP
\fB\-\-image\-policy=\fR\fB\fIpolicy\fR\fR
.RS 4
Takes an image policy string as argument, as per
\fBsystemd.image-policy\fR(7)\&. The policy is enforced when operating on the disk image specified via
\fB\-\-image=\fR, see above\&. If not specified defaults to the
"*"
policy, i\&.e\&. all recognized file systems in the image are used\&.
.RE
.PP
\fB\-\-no\-legend\fR
.RS 4
Do not print the legend, i\&.e\&. column headers and the footer with hints\&.
.RE
.SH "ENVIRONMENT VARIABLES"
.SS "Environment variables exported for plugins"
.PP
If
\fB\-\-verbose\fR
is used,
\fI$KERNEL_INSTALL_VERBOSE=1\fR
will be exported for plugins\&. They may output additional logs in this case\&.
.PP
\fI$KERNEL_INSTALL_IMAGE_TYPE=uki|pe|unknown\fR
is set for the plugins to specify the type of the kernel image\&.
.PP
uki
.RS 4
Unified kernel image\&.
.sp
Added in version 254\&.
.RE
.PP
pe
.RS 4
PE binary\&.
.sp
Added in version 254\&.
.RE
.PP
unknown
.RS 4
Unknown type\&.
.sp
Added in version 254\&.
.RE
.PP
\fI$KERNEL_INSTALL_MACHINE_ID\fR
is set for the plugins to the desired machine\-id to use\&. It\*(Aqs always a 128\-bit ID\&. Normally it\*(Aqs read from
/etc/machine\-id, but it can also be overridden via
\fI$MACHINE_ID\fR
(see below)\&. If not specified via these methods, a fallback value will generated by
\fBkernel\-install\fR
and used only for a single invocation\&.
.PP
\fI$KERNEL_INSTALL_ENTRY_TOKEN\fR
is set for the plugins to the desired entry "token" to use\&. It\*(Aqs an identifier that shall be used to identify the local installation, and is often the machine ID, i\&.e\&. same as
\fI$KERNEL_INSTALL_MACHINE_ID\fR, but might also be a different type of identifier, for example a fixed string or the
\fIID=\fR,
\fIIMAGE_ID=\fR
values from
/etc/os\-release\&. The string passed here will be used to name Boot Loader Specification entries, or the directories the kernel image and initial RAM disk images are placed into\&.
.PP
Note that while
\fI$KERNEL_INSTALL_ENTRY_TOKEN\fR
and
\fI$KERNEL_INSTALL_MACHINE_ID\fR
are often set to the same value, the latter is guaranteed to be a valid 32 character ID in lowercase hexadecimals while the former can be any short string\&. The entry token to use is read from
/etc/kernel/entry\-token, if it exists\&. Otherwise a few possible candidates below
\fI$BOOT\fR
are checked for Boot Loader Specification Type 1 entry directories, and if found the entry token is derived from that\&. If that is not successful,
\fI$KERNEL_INSTALL_MACHINE_ID\fR
is used as fallback\&.
.PP
\fI$KERNEL_INSTALL_BOOT_ROOT\fR
is set for the plugins to the absolute path of the root directory (mount point, usually) of the hierarchy where boot loader entries, kernel images, and associated resources should be placed\&. This usually is the path where the XBOOTLDR partition or the ESP (EFI System Partition) are mounted, and also conceptually referred to as
\fI$BOOT\fR\&. Can be overridden by setting
\fI$BOOT_ROOT\fR
(see below)\&.
.PP
\fI$KERNEL_INSTALL_LAYOUT=auto|bls|uki|other|\&.\&.\&.\fR
is set for the plugins to specify the installation layout\&. Additional layout names may be defined by convention\&. If a plugin uses a special layout, it\*(Aqs encouraged to declare its own layout name and configure
\fIlayout=\fR
in
install\&.conf
upon initial installation\&. The following values are currently understood:
.PP
bls
.RS 4
Standard
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
Type #1 layout, compatible with
\fBsystemd-boot\fR(7): entries in
$BOOT/loader/entries/\fIENTRY\-TOKEN\fR\-\fIKERNEL\-VERSION\fR[+\fITRIES\fR]\&.conf, kernel and initrds under
$BOOT/\fIENTRY\-TOKEN\fR/\fIKERNEL\-VERSION\fR/
.sp
Implemented by
90\-loaderentry\&.install\&.
.sp
Added in version 250\&.
.RE
.PP
uki
.RS 4
Standard
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
Type #2 layout, compatible with
\fBsystemd-boot\fR(7): unified kernel images under
$BOOT/EFI/Linux
as
$BOOT/EFI/Linux/\fIENTRY\-TOKEN\fR\-\fIKERNEL\-VERSION\fR[+\fITRIES\fR]\&.efi\&.
.sp
Implemented by
90\-uki\-copy\&.install\&.
.sp
Added in version 253\&.
.RE
.PP
other
.RS 4
Some other layout not understood natively by
\fBkernel\-install\fR\&.
.sp
Added in version 250\&.
.RE
.PP
auto
.RS 4
Pick the layout automatically\&. If the kernel is a UKI set layout to
\fBuki\fR\&. If not default to
\fBbls\fR
if
$BOOT/loader/entries\&.srel
with content
"type1"
or
$BOOT/\fIENTRY\-TOKEN\fR
exists, or
\fBother\fR
otherwise\&.
.sp
Leaving layout blank has the same effect\&. This is the default\&.
.sp
Added in version 254\&.
.RE
.PP
\fI$KERNEL_INSTALL_INITRD_GENERATOR\fR
and
\fI$KERNEL_INSTALL_UKI_GENERATOR\fR
are set for plugins to select the initrd and/or UKI generator\&. This may be configured as
\fIinitrd_generator=\fR
and
\fIuki_generator=\fR
in
install\&.conf, see below\&.
.PP
\fI$KERNEL_INSTALL_STAGING_AREA\fR
is set for plugins to a path to a directory\&. Plugins may drop files in that directory, and they will be installed as part of the loader entry, based on the file name and extension: Files named
initrd*
will be installed as
\fIINITRD\-FILE\fRs, and files named
microcode*
will be prepended before
\fIINITRD\-FILE\fRs\&.
.SS "Environment variables understood by kernel\-install"
.PP
\fI$KERNEL_INSTALL_CONF_ROOT\fR
can be set to override the location of the configuration files read by
\fBkernel\-install\fR\&. When set,
install\&.conf,
entry\-token, and other files will be read from this directory\&.
.PP
\fI$KERNEL_INSTALL_PLUGINS\fR
can be set to override the list of plugins executed by
\fBkernel\-install\fR\&. The argument is a whitespace\-separated list of paths\&.
"KERNEL_INSTALL_PLUGINS=:"
may be used to prevent any plugins from running\&.
.PP
\fI$MACHINE_ID\fR
can be set for
\fBkernel\-install\fR
to override
\fI$KERNEL_INSTALL_MACHINE_ID\fR, the machine ID\&.
.PP
\fI$BOOT_ROOT\fR
can be set for
\fBkernel\-install\fR
to override
\fI$KERNEL_INSTALL_BOOT_ROOT\fR, the installation location for boot entries\&.
.PP
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\&.
.SH "EXIT STATUS"
.PP
If every executable returns 0 or 77, 0 is returned, and a non\-zero failure code otherwise\&.
.SH "FILES"
.PP
/etc/kernel/install\&.d/*\&.install, /usr/lib/kernel/install\&.d/*\&.install
.RS 4
Drop\-in files which are executed by
\fBkernel\-install\fR\&.
.sp
Added in version 198\&.
.RE
.PP
/etc/kernel/cmdline, /usr/lib/kernel/cmdline, /proc/cmdline
.RS 4
Specifies the kernel command line to use\&. The first of the files that is found will be used\&.
\fI$KERNEL_INSTALL_CONF_ROOT\fR
may be used to override the search path; see below for details\&.
.sp
Added in version 198\&.
.RE
.PP
/etc/kernel/devicetree, /usr/lib/kernel/devicetree
.RS 4
Specifies the partial path to the file containing the device tree blob to install with the kernel and use at boot\&. The first of the files that is found will be used\&.
\fI$KERNEL_INSTALL_CONF_ROOT\fR
may be used to override the search path; see below for details\&.
.sp
The
devicetree
file contains a path, and this path specifies a location relative to the kernel install tree\&. A set of locations is checked, including in particular
/usr/lib/modules/\fIKERNEL_VERSION\fR/dtb/, which is the recommended location to place the dtb files under\&. For example, with
"broadcom/bcm2711\-rpi\-4\-b\&.dtb"
in the
devicetree
file, the device tree blob for the Raspberry Pi 4 Model B would be installed, and the actual file would be
/usr/lib/modules/\fIKERNEL_VERSION\fR/dtb/broadcom/bcm2711\-rpi\-4\-b\&.dtb\&.
.sp
Added in version 255\&.
.RE
.PP
/etc/kernel/tries
.RS 4
Read by
90\-loaderentry\&.install
and
90\-uki\-copy\&.install\&. If this file exists, a numeric value is read from it and the naming of the generated entry file or UKI is altered to include it as
$BOOT/loader/entries/\fIENTRY\-TOKEN\fR\-\fIKERNEL\-VERSION\fR+\fITRIES\fR\&.conf
or
$BOOT/EFI/Linux/\fIENTRY\-TOKEN\fR\-\fIKERNEL\-VERSION\fR+\fITRIES\fR\&.efi, respectively\&. This is useful for boot loaders such as
\fBsystemd-boot\fR(7)
which implement boot attempt counting with a counter embedded in the entry file name\&.
\fI$KERNEL_INSTALL_CONF_ROOT\fR
may be used to override the search path; see below for details\&.
.sp
Added in version 240\&.
.RE
.PP
/etc/kernel/entry\-token
.RS 4
If this file exists it is read and used as "entry token" for this system, i\&.e\&. is used for naming Boot Loader Specification entries\&. See
\fI$KERNEL_INSTALL_ENTRY_TOKEN\fR
above for details\&.
\fI$KERNEL_INSTALL_CONF_ROOT\fR
may be used to override the search path; see below for details\&.
.sp
Added in version 251\&.
.RE
.PP
/etc/machine\-id
.RS 4
The content of this file specifies the machine identification
\fIMACHINE\-ID\fR\&.
.sp
Added in version 198\&.
.RE
.PP
/etc/os\-release, /usr/lib/os\-release
.RS 4
Read by
90\-loaderentry\&.install\&. If available,
\fIPRETTY_NAME=\fR
is read from these files and used as the title of the boot menu entry\&. Otherwise,
"Linux \fIKERNEL\-VERSION\fR"
will be used\&.
.sp
Added in version 198\&.
.RE
.PP
/etc/kernel/install\&.conf, /usr/lib/kernel/install\&.conf
.RS 4
Configuration file with options for
\fBkernel\-install\fR, as a series of
\fIKEY=\fR\fIVALUE\fR
assignments, compatible with shell syntax, following the same rules as described in
\fBos-release\fR(5)\&. The first of the files that is found will be used\&.
\fI$KERNEL_INSTALL_CONF_ROOT\fR
may be used to override the search path; see below for details\&.
.sp
Currently, the following keys are supported:
\fIMACHINE_ID=\fR,
\fIBOOT_ROOT=\fR,
\fIlayout=\fR,
\fIinitrd_generator=\fR,
\fIuki_generator=\fR\&. See the Environment variables section above for details\&.
.sp
Added in version 250\&.
.RE
.PP
/etc/kernel/uki\&.conf
.RS 4
Ini\-style configuration file for
\fBukify\fR(1)
which is only effective when
\fI$KERNEL_INSTALL_LAYOUT\fR
or
\fIlayout=\fR
in
install\&.conf
is set to
\fBuki\fR
and
\fI$KERNEL_INSTALL_UKI_GENERATOR\fR
or
\fIuki_generator=\fR
in
install\&.conf
is set to
\fBukify\fR, or is unset\&.
\fI$KERNEL_INSTALL_CONF_ROOT\fR
may be used to override the search path; see below for details\&.
.sp
Added in version 255\&.
.RE
.PP
/usr/lib/modules/\fIKERNEL\-VERSION/\fR
.RS 4
Location for installed kernel modules and other kernel related resources\&. For each locally installed kernel a directory named after the kernel version (\fBuname \-r\fR) is kept\&.
.sp
Added in version 255\&.
.RE
.PP
/usr/lib/modules/\fIKERNEL\-VERSION/vmlinuz\fR
.RS 4
Location for installed kernel images\&. This is the recommended location for OS package managers to install kernel images into (as applicable), from which
\fBkernel\-install add\fR
then copies it into the final boot partition\&.
.sp
Added in version 255\&.
.RE
.PP
For various cases listed above, if the
\fI$KERNEL_INSTALL_CONF_ROOT\fR
environment variable is set, it will override the search path\&. The files will be loaded
\fIonly\fR
from the directory specified by the environment variable\&. When the variable is not set, the listed paths are tried in turn, and the first file that exists is used\&.
.SH "SEE ALSO"
.PP
\fBmachine-id\fR(5),
\fBos-release\fR(5),
\fBdepmod\fR(8),
\fBsystemd-boot\fR(7),
\fBukify\fR(1),
\m[blue]\fBBoot Loader Specification\fR\m[]\&\s-2\u[2]\d\s+2
.SH "NOTES"
.IP " 1." 4
Nowadays actually CPIO archives used as an "initramfs", rather than "initrd". See
\fBbootup\fR(7)
for an explanation.
.IP " 2." 4
Boot Loader Specification
.RS 4
\%https://uapi-group.org/specifications/specs/boot_loader_specification
.RE
.IP " 3." 4
Discoverable Partitions Specification
.RS 4
\%https://uapi-group.org/specifications/specs/discoverable_partitions_specification
.RE