mkosi-initrd1
Build initrds or unified kernel images for the current system using mkosi
Usage
mkosi-initrd [options ...]
Overview
mkosi-initrd is wrapper on top of mkosi to simplify the generation of initrds and Unified Kernel Images for the current running system.
Options
--kernel-version=,-k-
Kernel version where to look for the kernel modules to include. Defaults to the kernel version of the running system (
uname-r).
--format=,-t-
Output format. One of
cpio(CPIO archive),uki(a unified kernel image with the image in the.initrdPE section) ordirectory(for generating an image directly in a local directory). Defaults tocpio.
--output=,-o-
Name to use for the generated output image file or directory. Defaults to
initrd.
--output-dir=,-O-
Path to a directory where to place all generated artifacts. Defaults to the current working directory.
-
--generic, -g -
Build a generic initrd without host-specific kernel modules, which should allow the local system to boot on different hardware, although it’s tied to the kernel version of the running system or set with
--kernel-version=.
--profile=-
Set the profiles to enable for the initrd. By default, all profiles are disabled.
The
lvmprofile enables support for LVM. Thenetworkprofile enables support for network viasystemd-networkd. Thenfsprofile enables support for NFS. It requires networking in the initrd, using thenetworkprofile, or some other custom method. Thepkcs11profile enables support for PKCS#11. Theplymouthprofile provides a graphical interface at boot (animation and password prompt). Theraidprofile enables support for RAID arrays.
-
--debug -
Enable additional debugging output.
-
--debug-shell -
Spawn debug shell in sandbox if a sandboxed command fails.
-
--debug-sandbox -
Run
mkosi-sandboxwithstrace.
-
--show-documentation, -D -
Show the man page for mkosi-initrd.
-
--show-summary, -S -
Show the summary of configuration.
-
--version -
Show package version.
-
--help, -h -
Show brief usage information.
Configuration
Configuration for mkosi-initrd is read from /usr/lib, /usr/local/lib, /run, /etc, in increasing order of priority. Under any of those directories, mkosi.conf.d/ can be used for config files, mkosi.extra/ can be used for extra files to include in the initrd, and so on. See the Configuration Settings and FILES sections in mkosi(1) for full details.
For configuration files, use drop-ins, e.g. /etc/mkosi-initrd/mkosi.conf.d/local.conf.
History
- Arch Linux 2026-11-01: the text shown here
- Debian 13 (Trixie)
--debug since Arch Linux 2026-11-01;
--debug-sandbox since Arch Linux 2026-11-01;
--debug-shell since Arch Linux 2026-11-01;
--generic since Arch Linux 2026-11-01;
--show-documentation since Arch Linux 2026-11-01;
--show-summary since Arch Linux 2026-11-01;
-D since Arch Linux 2026-11-01;
-S since Arch Linux 2026-11-01;
-g since Arch Linux 2026-11-01.