NAME¶
mkosi - Create legacy-free OS images
DESCRIPTION¶
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
Commands:¶
- {build,clean,help,summary,shell,boot,qemu}
- Operation to execute
- cmdline
- The command line to use for 'shell', 'boot', 'qemu'
- -h, --help
- Show this help
- --version
- show program's version number and exit
Distribution:¶
- -d {fedora,debian,ubuntu,arch,opensuse,mageia,centos,clear},
--distribution
{fedora,debian,ubuntu,arch,opensuse,mageia,centos,clear}
- Distribution to install
- -r RELEASE, --release RELEASE
- Distribution release to install
- -m MIRROR, --mirror MIRROR
- Distribution mirror to use
- --repositories REPOS
- Repositories to use
Output:¶
- -t {raw_gpt,raw_btrfs,raw_squashfs,directory,subvolume,tar},
--format
{raw_gpt,raw_btrfs,raw_squashfs,directory,subvolume,tar}
- Output Format
- -o PATH, --output PATH
- Output image path
- -O DIR, --output-dir DIR
- Output root directory
- -f, --force
- Remove existing image file before operation
- -b [BOOTABLE], --bootable [BOOTABLE]
- Make image bootable on EFI (only raw_gpt, raw_btrfs, raw_squashfs)
- --secure-boot
- Sign the resulting kernel/initrd image for UEFI SecureBoot
- --secure-boot-key PATH
- UEFI SecureBoot private key in PEM format
- --secure-boot-certificate PATH
- UEFI SecureBoot certificate in X509 format
- --read-only
- Make root volume read-only (only raw_gpt, raw_btrfs, subvolume, implied on
raw_squashs)
- --encrypt {all,data}
- Encrypt everything except: ESP ("all") or ESP and root
("data")
- --verity
- Add integrity partition (implies --read-only)
- --compress
- Enable compression in file system (only raw_btrfs, subvolume)
- --xz
- Compress resulting image with xz (only raw_gpt, raw_btrfs, raw_squashfs,
implied on tar)
- -i, --incremental
- Make use of and generate intermediary cache images
Packages:¶
- -p PACKAGE, --package PACKAGE
- Add an additional package to the OS image
- --with-docs
- Install documentation (only Fedora, CentOS and Mageia)
- -T, --without-tests
- Do not run tests as part of build script, if supported
- --cache PATH
- Package cache path
- --extra-tree PATH
- Copy an extra tree on top of image
- --skeleton-tree PATH
- Use a skeleton tree to bootstrap the image before installing anything
- --build-script PATH
- Build script to run inside image
- --build-sources PATH
- Path for sources to build
- --build-dir PATH
- Path to use as persistent build directory
- --build-package PACKAGE
- Additional packages needed for build script
- --postinst-script PATH
- Post installation script to run inside image
- --use-git-files USE_GIT_FILES
- Ignore any files that git itself ignores (default: guess)
- --git-files {cached,others}
- Whether to include untracked files (default: others)
- --with-network
- Run build and postinst scripts with network access (instead of private
network)
- --settings PATH
- Add in .spawn settings file
Partitions:¶
- --root-size BYTES
- Set size of root partition (only raw_gpt, raw_btrfs)
- --esp-size BYTES
- Set size of EFI system partition (only raw_gpt, raw_btrfs,
raw_squashfs)
- --swap-size BYTES
- Set size of swap partition (only raw_gpt, raw_btrfs, raw_squashfs)
- --home-size BYTES
- Set size of /home partition (only raw_gpt, raw_squashfs)
- --srv-size BYTES
- Set size of /srv partition (only raw_gpt, raw_squashfs)
Validation (only raw_gpt, raw_btrfs, raw_squashfs, tar):¶
- --checksum
- Write SHA256SUMS file
- --sign
- Write and sign SHA256SUMS file
- --key KEY
- GPG key to use for signing
- --bmap
- Write block map file (.bmap) for bmaptool usage (only raw_gpt,
raw_btrfs)
- --password PASSWORD
- Set the root password
Host configuration:¶
- --extra-search-paths EXTRA_SEARCH_PATHS
- List of colon-separated paths to look for programs before looking in
PATH
Additional Configuration:¶
- -C PATH, --directory PATH
- Change to specified directory before doing anything
- --default PATH
- Read configuration data from file
- --kernel-commandline KERNEL_COMMANDLINE
- Set the kernel command line (only bootable images)
- --hostname HOSTNAME
- Set hostname