re-building the image. If incremental builds are enabled,
specifying this option twice will ensure the intermediary
cache files are removed, too, before the re-build is initiated. If a
- package cache is used (also see the **Files** section below),
+ package cache is used (also see the **FILES** section below),
specifying this option thrice will ensure the package cache is
removed too, before the re-build is initiated. For the `clean`
operation this option has a slightly different effect: by default
`CleanScripts=`, `--clean-script=`
: Takes a comma-separated list of paths to executables that are used as
- the clean scripts for this image. See the **Scripts** section for
+ the clean scripts for this image. See the **SCRIPTS** section for
more information.
### [Content] Section
Use this to insert files and directories into the OS tree before the
package manager installs any packages. If the `mkosi.skeleton/`
directory is found in the local directory it is also used for this
- purpose with the root directory as target (also see the **Files**
+ purpose with the root directory as target (also see the **FILES**
section below).
Note that skeleton trees are cached and any changes to skeleton trees
default configuration files shipped with the distribution. If the
`mkosi.extra/` directory is found in the local directory it is also
used for this purpose with the root directory as target (also see the
- **Files** section below).
+ **FILES** section below).
As with the base tree logic above, instead of a directory, a tar
file may be provided too. `mkosi.extra.tar` will be automatically
`SyncScripts=`, `--sync-script=`
: Takes a comma-separated list of paths to executables that are used as
- the sync scripts for this image. See the **Scripts** section for
+ the sync scripts for this image. See the **SCRIPTS** section for
more information.
`PrepareScripts=`, `--prepare-script=`
: Takes a comma-separated list of paths to executables that are used as
- the prepare scripts for this image. See the **Scripts** section for
+ the prepare scripts for this image. See the **SCRIPTS** section for
more information.
`BuildScripts=`, `--build-script=`
: Takes a comma-separated list of paths to executables that are used as
- the build scripts for this image. See the **Scripts** section for more
+ the build scripts for this image. See the **SCRIPTS** section for more
information.
`PostInstallationScripts=`, `--postinst-script=`
: Takes a comma-separated list of paths to executables that are used as
- the post-installation scripts for this image. See the **Scripts** section
+ the post-installation scripts for this image. See the **SCRIPTS** section
for more information.
`FinalizeScripts=`, `--finalize-script=`
: Takes a comma-separated list of paths to executables that are used as
- the finalize scripts for this image. See the **Scripts** section for more
+ the finalize scripts for this image. See the **SCRIPTS** section for more
information.
`PostOutputScripts=`, `--postoutput-script=`
: Takes a comma-separated list of paths to executables that are used as
- the post output scripts for this image. See the **Scripts** section for more
+ the post output scripts for this image. See the **SCRIPTS** section for more
information.
`Bootable=`, `--bootable=`
`RootPassword=`, `--root-password=`,
: Set the system root password. If this option is not used, but a `mkosi.rootpw` file is found in the local
directory, the password is automatically read from it or if the file is executable it is run as a script
- and stdout is read instead (see the **Scripts** section below). If the password starts with `hashed:`, it is
+ and stdout is read instead (see the **SCRIPTS** section below). If the password starts with `hashed:`, it is
treated as an already hashed root password. The root password is also stored in `/usr/lib/credstore` under
the appropriate systemd credential so that it applies even if only `/usr` is shipped in the image. To create
an unlocked account without any password use `hashed:` without a hash.
path of each pair refers to a directory to copy into the mkosi
sandbox before executing a tool. If the `mkosi.sandbox/` directory
is found in the local directory it is used for this purpose with the
- root directory as target (also see the **Files** section below).
+ root directory as target (also see the **FILES** section below).
**mkosi** will look for the package manager configuration and related
files in the configured sandbox trees. Unless specified otherwise,
**mkosi-chroot** is invoked during execution of the build scripts. If
this option is not specified, but a directory `mkosi.builddir/` exists
in the local directory it is automatically used for this purpose (also
- see the **Files** section below).
+ see the **FILES** section below).
`BuildKey=`, `--build-key=`
: Specifies the subdirectory within the build directory where to store
When this setting is specified for the "main" image, it specifies
which subimages should be built. See the
- **Building multiple images** section for more information.
+ **BUILDING MULTIPLE IMAGES** section for more information.
`MinimumVersion=`, `--minimum-version=`
: The minimum **mkosi** version required to build this configuration. If
`ConfigureScripts=`, `--configure-script=`
: Takes a comma-separated list of paths to executables that are used as
- the configure scripts for this image. See the **Scripts** section for
+ the configure scripts for this image. See the **SCRIPTS** section for
more information.
`PassEnvironment=`, `--pass-environment=`
: Takes a list of environment variable names separated by spaces. When
building multiple images, pass the listed environment variables to
each individual subimage as if they were "universal" settings. See
- the **Building multiple images** section for more information.
+ the **BUILDING MULTIPLE IMAGES** section for more information.
### [UKIProfile] Section
built from a host system with a `RHEL` subscription (established using
e.g. `subscription-manager`).
-# Execution Flow
+# EXECUTION FLOW
Execution flow for `mkosi build`. Default values/calls are shown in parentheses.
When building with `--incremental=yes` **mkosi** creates a cache of the distribution
1. Generate final output format
1. Run post-output scripts (`mkosi.postoutput`)
-# Scripts
+# SCRIPTS
To allow for image customization that cannot be implemented using
**mkosi**'s builtin features, **mkosi** supports running scripts at various
the output, build or cache directories if you need to persist data
between builds.
-# Files
+# FILES
To make it easy to build images for development versions of your
projects, **mkosi** can read configuration data from the local directory,
complete image builds are minimal, as only changed source files need to
be recompiled.
-# Building multiple images
+# BUILDING MULTIPLE IMAGES
If the `mkosi.images/` directory exists, **mkosi** will load individual
subimage configurations from it and build each of them. Image
}
```
-# Frequently Asked Questions (FAQ)
+# FREQUENTLY ASKED QUESTIONS (FAQ)
- Why does `mkosi vm` with KVM not work on Debian/Kali/Ubuntu?