Bot releases are hidden (Show)
Published by DaanDeMeyer 3 months ago
Published by DaanDeMeyer 3 months ago
Published by DaanDeMeyer 3 months ago
console=ttyS0
(or equivalent forconsole=
v24
onwards.BuildSources=
was dropped. Instead, the packages can be madePackageManagerTrees=
.@
mkosi.images/
. If you were building multiple images withmkosi.images/
, you'll need to adapt your configuration to themkosi-initrd
script that can be usedcentos-stream
or fedora
anymore toMirror=
Mirror=
. If the EPEL repositories are enabled forMirror=
is used, we look for the../fedora
relative to the mirror specified inMirror=
.Format=none
and don't remove--force
is specified). Thismkosi -t none
to rerun the build scripts withoutRuntimeBuildSources=yes
to make the build script outputs availablevirtconsole
to provide the serial console when bootingqemu
.root=PARTUUID
and mount.usr=PARTUUID
on the kernel command lineRepositories=
.aarch64
images is now supportedmkosi dependencies
was beefed up to handle more scenarios properlyRepositories=
match.PackageDirectories=
change.VolatilePackageDirectories=
which can be used to provide localmkosi.pkgmngr
is now used as the default path forPackageManagerTrees=
.$PACKAGEDIR
) is now shared$PACKAGEDIR
become available for installationPublished by bluca 4 months ago
CleanScripts=
to allow running custom cleanup code wheneverConfigureScripts=
to allow dynamically modifying the mkosiKernelModulesExclude=
or KernelModulesInitrdExclude=
are used.ToolsTreeDistribution=
match.vmspawn
verb and replaced it with VirtualMachineMonitor=
.%D
resolves to%P
to the current working%C
to the parent directory of the config file.ForwardJournal=
to have systemd inside a container/VM forwardmkosi qemu
virtual machine is now registered withoci
output format/root/src
insteadBuildSources=
).RuntimeBuildSources=
to mount build and source directoriesmkosi nspawn
or mkosi qemu
.--append
to allow command line settings to be parseddistribution-release
is not installed by default anymore onQemuSmp=
to 0
will now make qemu use all available CPUsmkosi qemu
.ToolsTreeCertificates=
to allow configuring whether to usenever
for CacheOnly=
to specify that repository metadatanone
option for CacheOnly=
to auto
.ProxyExclude=
to configure hostnames for which requests shouldVolatilePackages=
and InitrdVolatilePackages=
to configureIncremental=
.PackageDirectories=
now has an associated default pathmkosi.packages
.reprepro
is now used to generate local apt repositories.ExtraSearchPaths=
and ToolsTree=
are used, mkosi willExtraSearchPaths=
without theExtraSearchPaths=
, the tools tree is used instead.io.mkosi.microcode
and io.mkosi.initrd
subdirectories.Environment=
match setting to check for environment variablesEnvironment=
setting.basesystem
package is now always installed in Fedora andfilesystem
package.qemu
, shell
and boot
verbs do not automatically build the--force
is specified.SplitArtifacts=
is now supported for the portable, sysext andWithDocs=
option was implemented for pacman-based distributions.QemuSwtpm=
can now be used with QemuFirmware=
set to linux
orbios
.UnitProperties=
to allow configure properties on the scopessystemd-nspawn
and systemd-run
.$QEMU_ARCHITECTURE
is now set for configure scripts to easily allowQemuDrives=
. This allows addingmkosi build
.mkosi.images/
are now preferred over the specified--include
now has a shorthand option -I
.WITH_NETWORK
environment variable is now passed to build andcoredumpctl
and journalctl
verbs now operrate on the pathForwardJournal=
if one is set.UnifiedKernelImageFormat=
format setting to allow configuringversionlock
plugin is now enabled by default for dnf with a noopRepositories=
is now implemented for zypper.KernelModulesInclude=
and KernelModulesInitrdInclude=
now take thehost
and default
to include the host's loadedmkosi-initrd
KernelModulesIncludeHost=
and KernelModulesInitrdIncludeHost=
aremkosi dependencies
to output the list of packages required byPublished by bluca 7 months ago
btrfs subvolume delete
root
when running sync/usr
directory as we wouldQemuFirmware=uefi
now boots withoutQemuFirmware=uefi-secure-boot
was introducedQemuFirmware=auto
.QemuFirmwareVariables=custom
andQemuFirmwareVariables=microsoft
to use OVMF/EDK2 variables withUnifiedKernelImages=
to control whether we generate unifiedBootloader=grub
will now generate a grub EFI image and install it.SecureBoot=
is enabled and ShimBootloader=
is not set tosigned
, the grub EFI image will be signed for SecureBoot.ShimBootloader=signed
will now also instruct mkosi to look for and$MKOSI_CONFIG
environment variable.$PROFILE
is now set for all mkosi scripts containing the value ofProfile=
if it is set.Published by bluca 8 months ago
mkosi-initrd
, mkosi-tools
) can now be includedInclude=
(e.g. Include=mkosi-initrd
)mkosi-initrd
configmkosi-initrd
config into/usr/lib/mkosi-initrd
.journalctl
andcoredumpctl
verbs.mkosi ssh
works again when used with ToolsTree=default
.zst
instead of .zstd
for compressed split artifactssystemd-repart
.systemd-repart
uses a persistent temporary directory again forMicrocodeHost=
setting to only include the CPU specificPackageCacheDirectory=
to set the directory for packageCacheDirectory=
is only used for incremental cached images now./var
soBaseTrees=
, disable CleanPackageMetadata=
to make sure the/var
is not cleaned up, otherwise anyCacheOnly=metadata
. Note that in the JSON output, theCacheOnly=
will now be a string instead of a boolean.CompressLevel=
to set the compression level to use.TriggerMatch=
to specify multiple match sections of which onlyjq
, attr
, acl
, git
, sed
, grep
and findutils
tomkosi-install
, mkosi-upgrade
, mkosi-remove
andmkosi-reinstall
scripts which allow writing scripts that areMatch
section values/etc/fstab
and /etc/crypttab
for the image if anyMountPoint=
and EncryptedVolume=
).bash
is now started in the debug shell instead of sh
.noble
.mkosi vmspawn
which boots the image with systemd-vmspawn
.systemd-vmspawn
is experimental and its interface maymkosi vmspawn
is also considered experimental.systemd-vmspawn
version 256
or newer is required.SyncScripts=
which can be used to update various build sourcesDISTRIBUTION=
and RELEASE=
environment variables are now setToolsTreeRepositories=
and ToolsTreePackageManagerTrees=
.RuntimeNetwork=
to configure the networking used when bootingSecureBootKeySource=
and VerityKeySource=
to support signing256
or newer.CleanPackageManagerMetadata=yes
when buildingdirectory
and tar
images.Published by bluca 9 months ago
PackageDirectories=
to allow providing extra packages to beKernelModulesIncludeHost
was including unnecessary--mirror
specification for CentOS (and variants) and Fedora./etc/mtab
compatibility symlink in mkosi'ssystemd-firstboot
./srv
and /mnt
are not mounted read-only anymore during builds.RepositoryKeyCheck=
for apt-based distributions.Published by bluca 9 months ago
BuildSources=
are now mounted when we install packages so localOverlay=
is enabled as thisqemu-system-xxx
binaries are now preferred over the generic qemu
qemu-kvm
binaries.gpg
is allowed to access /run/pscsd/pscsd.comm
on the host if itPublished by bluca 10 months ago
/work/src
anymore. Instead, the default value for BuildSources=
/work/src
. This meansBuildSources=
is explicitly configured.ToolsTree=default
can be used to make sure aEnvironmentFiles=
to read environment variables from/usr
, a few directories in /etc
, /tmp
,/var/tmp
and various directories configured in mkosi settings, allRuntimeScratch=
to automatically mount a directory with extra/etc
/usr
.SELinuxRelabel=
to specify whether to relabel selinux filesmkosi qemu
can now direct kernel boot s390x
and powerpc
images.HostArchitecture=
match to match against the hostmkosi ssh
but instead use a separate key pair which can bemkosi genkey
. Users using mkosi ssh
will have to runmkosi genkey
once to generate the necessary files to keepmkosi ssh
working.--offline=no
anymore when we detect theSubvolumes=
setting is used in a systemd-repart
partitionRepartOffline=
option tosystemd-repart
in offline mode./boot
/efi
. While this will generally not be noticeable, usersCopyFiles=/boot:/
along with the usual CopyFiles=/efi:/
to their/boot
, it becomes possible to use /boot
to populate an XBOOTLDRv20
so CopyFiles=/boot:/
can unconditionally be added toQemuFirmwareVariables=
to allow specifying a custom OVMFMinimumVersion=
to allow specifying the minimum required mkosiShimBootloader=
to support installing shim to the ESP.QemuVsockConnectionId=
to configure how to allocate the vsockQemUVsock=
is enabled.WithDocs=
for apt
.Locale=
.rpm
plugins are now disabled when building images.KernelModulesIncludeHost=
andKernelModulesInitrdIncludeHost=
to only include modules loaded onRemovePackages=
for Arch Linux.useradd
and groupadd
scripts to configure these binaries tohashed:
Autologin=
feature was extended with support for arm64
,s390x
and powerpc
architectures.SecureBootAutoEnroll=
to control automatic enrollment of securebootsystemd-boot
and generated UKIs.ImageVersion=
is no longer automatically appended to the output files,Output=
if not specified and%o
specifier being equivalent to %i
or %i_%v
dependingImageVersion=
is specified.journalctl
and coredumpctl
verbs for running the respective tools on built directory or disk images.burn
verb to write the output image to a block device.esp
output format, which is large similar to the existing uki
output format but wraps it in a disk image with only an ESP.Presets
were renamed to Images
. mkosi.images/
is now used instead of mkosi.presets/
, the Presets=
setting was renamed to Images=
and the Presets
section was merged into the Config
section. The old names can still be used for backwards compatibility.mkosi.profiles/
and one can be selected using the new Profile=
setting.mkosi.local.conf
before any other config files if that exists.--json
option to get the output of mkosi summary
as JSON.-a
for --autologin
..chroot
extension are now executed in the image automatically.rpm
helper script to have rpm
automatically operate on the image when running scripts.mkosi-as-caller
helper script that can be used in scripts to run commands as the user invoking mkosi.mkosi-chroot
will now start a shell if no arguments are specified.WithRecommends=
to configure whether to install recommended packages by default or not where this is supported. It is disabled by default.ToolsTreeMirror=
setting for configuring the mirror to use for the default tools tree.WithDocs=
is now enabled by default.BuildSourcesEphemeral=
to make source directories ephemeral when running scripts. This means any changes made to source directories while running scripts will be undone after the scripts have finished executing.QemuDrives=
to have mkosi create extra qemu drives and pass them to qemu when using the qemu
verb.BuildSources=
match to match against configured build source targets.PackageManagerTrees=
was moved to the Distribution
section.-kernel
or QemuKernel=
.updates-testing
repositories for Fedora.git
can be executed from mkosi scripts without running into permission errors.XDG_CACHE_HOME
, $HOME/.cache
or /var/tmp
depending on the situation.MKOSI_DNF
to override which dnf to use for building images (dnf
or dnf5
).docs/building-rpms-from-source.md
)./etc/resolv.conf
will now only be mounted for scripts when they are run with network access.Published by bluca about 1 year ago
$SCRIPT
was renamed to $CHROOT_SCRIPT
. $SCRIPT
can still be usedRuntimeTrees=
setting to mount directories when booting imagesmkosi boot
, mkosi shell
or mkosi qemu
. The directories areVirtioFS
via virtiofsd
. Note that thismkosi qemu
viaVirtioFS
. When CONFIG_VIRTIOFS
and CONFIG_VIRTIO_PCI
are builtinInclude=
or --include
to include extra configuration filesmkosi
will now exit with an error when no configuration wascustom
custom
as the distribution, the rootfs mustdistribution-gpg-keys
package is installed on the host.RuntimeSize=
to grow the image to a specific size beforemkosi boot
or mkosi qemu
.MKOSI_UID
and MKOSI_GID
when running scripts which areArchitecture=
matchInitrds=
are now used for grub menuentries asImageId=
and ImageVersion=
are now written to os-release asIMAGE_ID
and IMAGE_VERSION
if provided.build
verb to the buildPublished by bluca about 1 year ago
--autologin
was broken when used in combination withPublished by bluca about 1 year ago
ToolsTreePackages=
to add extra packages to the default toolsSystemdVersion=
match to match on the host's systemd versionFormat=
match to match on the configured output formatPresets=
can now be configured in global configuration files to select--help
to show all options againPublished by bluca about 1 year ago
mkosi.version
is now picked up from preset and dropin directories as!
operator for lists. Instead, assign the empty string@
.QemuCdrom=
to attach the image to the virtual machine as aSectorSize=
to set the sector size of the disk images built byBootloader=
option to configure which EFI bootloader touki
option to install just the UKI withoutgrub
to generate grub configuration to chainloadBiosBootloader=
to configure whether grub for BIOS getsQemuFirmware=
to select which qemu firmware to use (OVMF,QemuKernel=
to specify the kernel that should be used with/var/lib/dbus/machine-id
is now removed if it was added by a packageManifestFormat=json
to make sure the manifest is generated.SourceDateEpoch=
to enable more reproducible image builds.Seed=
to set the seed passed to systemd-repart.ToolsTree=
is set to default
, mkosi will now build a defaultToolsTreeDistribution=
and ToolsTreeRelease=
or are determineduki
output format. This is similar to cpio
, except the cpioPublished by DaanDeMeyer about 1 year ago
Migrated to systemd-repart. Many options are dropped in favor of specifying them directly
in repart partition definition files:
CopyFiles=/:/usr
in a usr partition definition)We also remove the WithoutUnifiedKernelImages= switch as building unified
kernel images is trivial and fast these days.
Support for --qemu-boot was dropped
Support for --use-host-repositories was dropped, use --repository-directory instead
RepositoryDirectory
was removed, use PackageManagerTrees=
or SkeletonTrees=
instead.
--repositories
is now only usable on Debian/RPM based distros and can only be used to enable additional
repositories. Specifically, it cannot be used on Arch Linux anymore to add new repositories.
The _epel
distributions were removed. Use --repositories=epel
instead to enable
the EPEL repository.
Removed -stream
from CentOS release specifiers. Instead of specifying 8-stream
,
you know just specify 8
.
Removed default kernel command line arguments rhgb
, selinux=0
and audit=0
.
Dropped --all and --all-directory as this functionality is better implemented by
using a build system.
mkosi now builds images without needing root privileges.
Removed --no-chown
, --idmap
and --nspawn-keep-unit
options as they were made obsolete by moving to
rootless builds.
Removed --source-file-transfer
, --source-file-transfer-final
, --source-resolve-symlinks
and
--source-resolve-symlinks-final
in favor of always mounting the source directory into the build image.
--source-file-transfer-final
might be reimplemented in the future using virtiofsd.
Dropped --include-dir
option. Usage can be replaced by using --incremental
and reading includes from
the cached build image tree.
Removed --machine-id
in favor of shipping images without a machine ID at all.
Removed --skip-final-phase
as we only have a single phase now.
The post install script is only called for the final image now and not for the build image anymore. Use the
prepare script instead.
--ssh-key
, --ssh-agent
, --ssh-port
and --ssh-timeout
options were dropped as the SSH support was
reimplemented using VSock. mkosi ssh
can only be used with images booted with mkosi qemu
. Use
machinectl
to access images booted with mkosi boot
. Use --extra-tree or --credential with the
.ssh.authorized_keys.root
credentials as alternatives for provisioning the public key inside the image.
Only configuration files matching *.conf
are parsed in dropin directories now.
Removed --qemu-headless
, we now start qemu in the terminal by default and configure the serial console at
runtime. Use the new --qemu-gui
option to start qemu in its graphical interface.
Removed --netdev
. Can be replaced by manually installing systemd-networkd, putting a network file in the
image and enabling systemd-networkd.
If mkosi.extra/
or mkosi.skeleton/
exist, they are now always used instead of only when no explicit
extra/skeleton trees are defined.
mkosi doesn't install any default packages anymore aside from packages required by the distro or the base
filesystem layout package if there are no required packages. In practice, this means systemd and other
basic tools have to be installed explicitly from now on.
Removed --base-packages
as it's not needed anymore since we don't install any packages by default anymore
aside from the base filesystem layout package.
Removed --qcow2
option in favor of supporting only raw disk images as the disk image output format.
Removed --bmap
option as it can be trivially added manually by utilizing a finalize script.
The never
value for --with-network
was spun of into its own custom option --cache-only
.
--bootable
now defaults to auto
. When set to auto
, mkosi will generate a bootable image only if all
the necessary packages are installed. Documentation was added in docs/bootable.md on how a bootable image
can be generated on mainstream distros.
The RPM db is no longer rebuilt in bdb format on CentOS Stream 8. To be able to install packages on a
CentOS Stream 8 image with a RPM db in sqlite format, rewrite the db in bdb format using
rpm --rebuilddb --define _db_backend bdb
.
Repositories are now only written to /etc/apt/sources.list if apt is installed in the image.
Removed the dependency on debootstrap
to build Ubuntu or Debian images.
Apt now uses the keyring from the host instead of the keyring from the image. This means
debian-archive-keyring
or ubuntu-archive-keyring
are now required to be installed to build Debian or
Ubuntu images respectively.
--base-image
is split into --base-tree
and --overlay
.
Removed --cache-initrd
, instead, use a prebuilt initrd with Initrds=
to avoid rebuilding the initrd all
the time.
Disk images are now resized to 8G when booted to give some disk space to play around with in the booted
image.
Removed --install-directory=
option. This was originally added for caching the installation results, but
this doesn't work properly as it might result in leftover files in the install directory from a previous
installation, so we have to empty the directory before reusing it, invalidating the caching, so the option
was removed.
Build scripts are now executed on the host. See the SCRIPTS
section
in the manual for more information. Existing build scripts will need
to be updated to make sure they keep working. Specifically, most paths
in scripts will need to be prefixed with $BUILDROOT to have them
operate on the image instead of on the host system. To ensure the host
system cannot be modified when running a script, most host directories
are mounted read-only when running a script to ensure a script cannot
modify the host in any way. Alternatively to making the script run on
the host, the script can also still be executed in the image itself by
putting the following snippet at the top of the script:
if [ "$container" != "mkosi" ]; then
exec mkosi-chroot "$SCRIPT" "$@"
fi
Removed --tar-strip-selinux-context=
option. We now label all files
properly if selinux is enabled and if users don't want the labels,
they can simply exclude them when extracting the archive.
Gentoo is now marked as experimental and unsupported and there's no
guarantee at all that it will work. Issues related to gentoo will
generally not receive attention from core maintainers. All gentoo
specific hacks outside of the gentoo implementation module have been
removed.
A verb documentation
has been added. Calling mkosi with this verb will show
the documentation. This is useful when running mkosi during development to
always have the documentation in the correct version available. By default it
will try several ways to output the documentation, but a specific option can
be chosen with the --doc-format
option. Distro packagers are encouraged to
add a file mkosi.1
into the mkosi/resources
directory of the Python
package, if it is missing, as well es install it in the appropriate search
path for man pages. The man page can be generated from the markdown file
mkosi/resources/mkosi.md
e.g via pandoc -t man -s -o mkosi.1 mkosi.md
.
The man page can be generated from the markdown file via
tools/make-man-page.sh
.
Fixed issue where not all packages and data files where included in
the generated python package.
mkosi doesn't try to unshare the network namespace anymore when it
doesn't have CAP_NET_ADMIN
.
Fixed issue when the workspace was located in /tmp
.
Don't try to run timedatectl
or ssh-add
when they're not installed.
Published by keszybz almost 2 years ago
Support for Clear Linux was dropped. See https://github.com/systemd/mkosi/pull/1037 for more information.
Support for Photon was dropped. See https://github.com/systemd/mkosi/pull/1048 for more information.
The Arch kernel/bootloader pacman hooks were removed. For anyone that still wants to use them, they can be found here.
mkosi now creates distro~release
subdirectories inside the build, cache and output directories for each distro~release
combination that is built. This allows building for multiple distros without throwing away the results of a previous distro build every time.
The preferred names for mkosi configuration files and directories are now mkosi.conf and mkosi.conf.d/ respectively. The old names (mkosi.default and mkosi.default.d) have been removed from the docs but are still supported for backwards compatibility.
plain_squashfs
type images will now also be named with a .raw
suffix.
tar
type images will now respect the --compress
option.
Pacman's SigLevel
option was changed to use the same default value as used on Arch which is SigLevel = Required DatabaseOptional
. If this results in keyring errors, you need to update the keyring by running pacman-key --populate archlinux
.
Support for CentOS 7 was dropped. If you still need to support CentOS 7, we recommend using any mkosi version up to 13.
Support for BIOS/grub was dropped. because EFI hardware is widely available and legacy BIOS systems do not support the feature set to fully verify a boot chain from firmware to userland and it has become bothersome to maintain for little use.
To generate BIOS images you can use any version of mkosi up to mkosi 13 or the new --bios-size
option. This can be used to add a BIOS boot partition of the specified size on which grub
(or any other bootloader) can be installed with the help of mkosi's script support (depending on your needs most likely mkosi.postinst
or mkosi.finalize
). This method can also be used for other EFI bootloaders that mkosi intentionally does not support.
mkosi now unconditionally copies the kernel, initrd and kernel cmdline from the image that were previously only copied out for Qemu boot.
mkosi now runs apt and dpkg on the host. As such, we now require apt and dpkg to be installed on the host along with debootstrap in order to be able to build debian/ubuntu images.
Split dm-verity artifacts default names have been changed to match what systemd
and other tools expect: image.root.raw
, image.root.verity
, image.root.roothash
, image.root.roothash.p7s
(same for usr
variants).
mkosi
will again default to the same OS release as the host system when the host system uses the same distribution as the image that's being built.
By default, mkosi
will now change the owner of newly created directories to SUDO_UID
or PKEXEC_UID
if defined, unless --no-chown
is used.
If systemd-nspawn
v252 or newer is used, bind-mounted directories with systemd-nspawn
will use the new rootidmap
option so files and directories created from within the container will be owned by the actual directory owner on the host.
--network-veth
option has been renamed to --netdev
. The old name made sense with virtual ethernet devices, but when booting images with qemu a TUN/TAP device is used instead.--netdev
(previously --network-veth
) option is used (formerly/etc/systemd/network/80-mkosi-network-veth.network
in the image) now only matches network interfaces using the virtio_net
driver. Please make sure you weren't relying on this file to configure any network interfaces other than the tun/tap virtio-net interface created by mkosi when booting the image in QEMU with the --netdev
option. If you were relying on this config filesystemd-networkd
will keep configuring your interface, e.g. via the mkosi.skeleton
or mkosi.extra
trees or a mkosi.postinst
script.kernel-install
script for building unified kernel images has been removed. From v13 onwards, on systems using kernel-install
, mkosi
won't automatically build new unified kernel images when a kernel is updated or installed. To keep the old behavior, you can install the kernel-install
script manually via a skeleton tree; a copy can be found here.QemuKvm
option configures whether to use KVM when running mkosi qemu
.mkosi
will not default to the same OS release as the host system anymore when the host system uses the same distribution as the image that's being built. Instead, when no release is specified, mkosi will now always default to the default version embedded in mkosi itself.mkosi
will now use the pacman
keyring from the host when building Arch images. This means that users will, on top of installing archlinux-keyring
, also have to run pacman-key --init
and pacman-key --populate archlinux
onarchlinux-keyring
updates by running pacman-key --populate archlinux
and pacman-key --updatedb
.BootProtocols=linux
. When enabled, the kernel image, initrd, and cmdline will be extracted from the image and passed to qemu
by mkosi qemu
to directly boot into the kernel image without a bootloader. This can be used to boot for example s390x images in qemu
.runs-on: ubuntu-22.04
to the job config.C.UTF-8
locale.--repository-directory
option can be used to configure a directory with extra repository files to be used by the package manager when building an image. Note that this option is currently only supported for pacman
anddnf
-based distros.--skeleton-tree
is now supported on Debian-based distros.