DOKK / manpages / debian 10 / mkosi / mkosi.1.en
MKOSI(1) User Commands MKOSI(1)

mkosi - Create legacy-free OS images

usage: mkosi [-h] [--version]

[-d {fedora,debian,ubuntu,arch,opensuse,mageia,centos,clear}] [-r RELEASE] [-m MIRROR] [--repositories REPOS] [-t {raw_gpt,raw_btrfs,raw_squashfs,directory,subvolume,tar}] [-o PATH] [-O DIR] [-f] [-b [BOOTABLE]] [--secure-boot] [--secure-boot-key PATH] [--secure-boot-certificate PATH] [--read-only] [--encrypt {all,data}] [--verity] [--compress] [--xz] [-i] [-p PACKAGE] [--with-docs] [-T] [--cache PATH] [--extra-tree PATH] [--skeleton-tree PATH] [--build-script PATH] [--build-sources PATH] [--build-dir PATH] [--build-package PACKAGE] [--postinst-script PATH] [--use-git-files USE_GIT_FILES] [--git-files {cached,others}] [--with-network] [--settings PATH] [--root-size BYTES] [--esp-size BYTES] [--swap-size BYTES] [--home-size BYTES] [--srv-size BYTES] [--checksum] [--sign] [--key KEY] [--bmap] [--password PASSWORD] [--extra-search-paths EXTRA_SEARCH_PATHS] [-C PATH] [--default PATH] [--kernel-commandline KERNEL_COMMANDLINE] [--hostname HOSTNAME] [{build,clean,help,summary,shell,boot,qemu}] ...

Build Legacy-Free OS Images

{build,clean,help,summary,shell,boot,qemu}
Operation to execute
The command line to use for 'shell', 'boot', 'qemu'
Show this help
show program's version number and exit

Distribution to install
Distribution release to install
Distribution mirror to use
Repositories to use

Output Format
Output image path
Output root directory
Remove existing image file before operation
Make image bootable on EFI (only raw_gpt, raw_btrfs, raw_squashfs)
Sign the resulting kernel/initrd image for UEFI SecureBoot
UEFI SecureBoot private key in PEM format
UEFI SecureBoot certificate in X509 format
Make root volume read-only (only raw_gpt, raw_btrfs, subvolume, implied on raw_squashs)
Encrypt everything except: ESP ("all") or ESP and root ("data")
Add integrity partition (implies --read-only)
Enable compression in file system (only raw_btrfs, subvolume)
Compress resulting image with xz (only raw_gpt, raw_btrfs, raw_squashfs, implied on tar)
Make use of and generate intermediary cache images

Add an additional package to the OS image
Install documentation (only Fedora, CentOS and Mageia)
Do not run tests as part of build script, if supported
Package cache path
Copy an extra tree on top of image
Use a skeleton tree to bootstrap the image before installing anything
Build script to run inside image
Path for sources to build
Path to use as persistent build directory
Additional packages needed for build script
Post installation script to run inside image
Ignore any files that git itself ignores (default: guess)
Whether to include untracked files (default: others)
Run build and postinst scripts with network access (instead of private network)
Add in .spawn settings file

Set size of root partition (only raw_gpt, raw_btrfs)
Set size of EFI system partition (only raw_gpt, raw_btrfs, raw_squashfs)
Set size of swap partition (only raw_gpt, raw_btrfs, raw_squashfs)
Set size of /home partition (only raw_gpt, raw_squashfs)
Set size of /srv partition (only raw_gpt, raw_squashfs)

Write SHA256SUMS file
Write and sign SHA256SUMS file
GPG key to use for signing
Write block map file (.bmap) for bmaptool usage (only raw_gpt, raw_btrfs)
Set the root password

List of colon-separated paths to look for programs before looking in PATH

Change to specified directory before doing anything
Read configuration data from file
Set the kernel command line (only bootable images)
Set hostname
April 2018 mkosi 4