Skip to content

Matching systemd kernel-install layout configuration

Ádám Maróti requested to merge 05storm26/mkinitcpio:05storm26/uki into master

Mkinitcpio now evaluates the "layout" configuration value configured for kernel-install and generates presets and initramfs/unified kernel images in conformance with that layout.

If there are CPU microcode updates installed under /boot (i.e.: /boot/intel-ucode.img) now mkinitcpio preset generation will automatically include them in the presets.

Mkinitcpio now automatically picks up *-ucode.img images from /boot, like CPU microdode updates (e.g.: intel-ucode.img).

Added two new convenience binaries to the package:

  • regenerate-mkinitcpio-presets
  • reinstall-kernels

You can use these to easily change your kernel configuration: after changing your setup (either changing your mkinitcpio presets or changing your /etc/kernel/install.conf "layout" configuration).

  1. regenerate-mkinitcpio-presets: Makes mkinitcpio generate the default presets for your installed kernel packages based on the system configuration just as if you removed and reinstalled them using the pacman.

  2. reinstall-kernels: Runs mkinitcpio for all mkinitcpio presets, and if your layout configuration requires it, copies your kernel images to the proper location (for bios layout to /boot/vmlinuz- for EFI BLS type 1 to ///<version/vmlinuz> for the uki layout unified kernel images are emitted to //EFI/Linux/{,-fallback}.efi).

    However other installation hooks like, i.e.: secure boot signing your kernels, or kernel-install install scripts are not triggered by reinstall-kernels.

To change from one layout configuration to another set layout= in /etc/kernel/install.conf.


$ cat /etc/kernel/install.conf layout=uki

after you configured the layout you would like run:

$ sudo regenerate-mkinitcpio-presets $ sudo reinstall-kernels

(if you want to sign them for secure boot you still need to do that after reinstall-kernels.: e.g.: sudo sbctl sign-all -g)

The mkinitcpio initrd generator for systemd kernel-install now also respects the configured layout for kernel-install.

There are 3 layout configurations now:

  • traditional: no /efi of /boot/efi directories. /boot/ will be popuplated with separated initramfs and kernel image files. e.g.: /boot/vmlinuz, /boot/initramfs, /boot/initramfs-fallback

    You can use this configuration by not having EFI related partitions like /efi or /boot/efi.

  • EFI bls type 1: this is the default for efi systems. The esp partition (mounted as either /efi or /boot/efi) is used for installing the separate kernel and initramfs images.

    This is the default layout for if an esp mountpoint (/efi or /boot/efi) exists. This corresponds to layout=bls.

    The kernel and initramfs files are installed to: ////.

  • EFI bls type 2: this is the unified kernel images layout.

    The unified kernel images are installed to //EFI/Linux/{,-fallback}.efi

    This corresponds to layout=uki.

Merge request reports