kernels and their respective initramfs images to the boot partition (usually mounted at
/efi). It uses a script system which can extend its functionality. It also creates boot entries for systemd-boot for the installed kernel and initramfs.
kernel-install is part of and packaged with
For all the details of possible configurations see.
Here are the most important configurations that you can set in
The installation layout that will be followed by kernel-install. For details also see the Standard Boot Loader Specification.
Possible values are:
|Traditional split kernel and initrd images
|Standard Boot Loader Specification type 2 layout, a.k.a. unified kernel images under the
The initrd generator to use to generate the initramfs images. i.e.: mkinitcpio, dracut etc.
In case the
layout is set to uki who should perform the UKI image generation. It could be either ukify which will merge a standalone initramfs image and a kernel image into a UKI image or it could be the initrd generator itself, if it can generate UKI images directly, like mkinitcpio.
kernel-install script is not an initramfs generator itself, but uses another program,
such as mkinitcpio or dracut to generate an initramfs. In order to use an initramfs,
an initramfs generator must be installed.
One can install a kernel from
/usr/lib/modules as follows:
# kernel-install add A.B.C-name /usr/lib/modules/A.B.C-name/vmlinuz
To remove a kernel, use the
# kernel-install remove A.B.C-name
For generating UKI images,
kernel-install needs a
initrd_generator and an
uki_generator is not specified it will default to ukify. Since 2024-01-15, mkinitcpio no longer creates .efi images in all cases, forcing users to either install the separate package or change the default image generator.
Direct UKI image generation by the initrd generator
Some initramfs generators are actually capable of generating a UKI image directly, e.g.
uki_generator to mkinitcpio:
# echo uki_generator=mkinitcpio >> /etc/kernel/install.conf
In this caseis not needed at all.
kernel-install has the concept of plugins, scripts or other programs for to run when it installs, upgrades, or removes a kernel (and initrd for
bls). For instance, contains
kernel-install plugin scripts that can automatically sign new UKIs for Secure Boot, e.g.
The system administrator can write their own
kernel-install plugins; place them in
/etc/kernel/install.d/ (which will override files in
/usr/lib/kernel/install.d/). The administrator can also disable a system plugin by overriding its basename in the local system directory, i.e.:
# ln -sf /dev/null /etc/kernel/install.d/91-sbctl.install
Tips and tricks
For a pacman hook triggering on update of a kernel package to install that kernel automatically,AUR can be installed.
A similar, conflicting functionality is already performed by the mkinitcpio package's pacman hooks. If you want to switch to kernel-install, you will need to manually mask the pacman hooks of mkinitcpio:
# ln -s /dev/null /etc/pacman.d/hooks/60-mkinitcpio-remove.hook # ln -s /dev/null /etc/pacman.d/hooks/90-mkinitcpio-install.hook
Unified kernel images
"... is missing .efi suffix."
Due to the way mkinitcpio worked in the past, mkinitcpio was always generating a UKI image when the kernel-install
layout was set to uki, even when there was no value set for
uki_generator. This is because that configuration option didn't have a default value of ukify when kernel-install support for mkinitcpio was added.
This is no longer the case. This can result in error messages like: "... is missing .efi suffix.", in case the value of
uki_generator is not set and systemd-ukify is not installed.
To fix this either install systemd-ukify or set
uki_generator to mkinitcpio.