| 1 |
.. _image-description-elements: |
| 2 |
|
| 3 |
Schema Reference |
| 4 |
================ |
| 5 |
|
| 6 |
.. note:: |
| 7 |
|
| 8 |
This document is the exhaustive reference for the {kiwi} image description |
| 9 |
schema in :file:`kiwi/schema/kiwi.rnc` for version |version|. |
| 10 |
|
| 11 |
.. contents:: Schema sections |
| 12 |
:local: |
| 13 |
:depth: 2 |
| 14 |
|
| 15 |
The sections are documented in the same order as they appear below the |
| 16 |
:ref:`sec.image` root element. Use :doc:`/image_description` for the guided |
| 17 |
introduction and this page when you need the complete list of valid elements |
| 18 |
and attributes. |
| 19 |
|
| 20 |
|
| 21 |
.. _sec.image: |
| 22 |
|
| 23 |
<image> |
| 24 |
------- |
| 25 |
|
| 26 |
The top level of any {kiwi} image description. |
| 27 |
|
| 28 |
.. code:: xml |
| 29 |
|
| 30 |
<image schemaversion="{schema_version}" name="{exc_image_base_name}"> |
| 31 |
<!-- descendants --> |
| 32 |
</image> |
| 33 |
|
| 34 |
The image definition starts with an image tag and requires the schema |
| 35 |
format at version {schema_version}. The attribute name specifies the name |
| 36 |
of the image, which is also used for the filenames created by KIWI. Because |
| 37 |
we don’t want spaces in filenames, the name attribute must not have any |
| 38 |
spaces in its name. |
| 39 |
|
| 40 |
The following optional attributes can be inserted in the image tag: |
| 41 |
|
| 42 |
displayname |
| 43 |
Allows setting up the boot menu title for the selected boot loader. So |
| 44 |
you can have *suse-SLED-foo* as the image name but a different name |
| 45 |
as the boot display name. Spaces are not allowed in the display name |
| 46 |
because it causes problems for some boot loaders, and kiwi did not |
| 47 |
take the effort to separate the ones that can display them correctly |
| 48 |
from the ones that can't. |
| 49 |
|
| 50 |
id |
| 51 |
sets an identification number that appears as file ``/etc/ImageID`` |
| 52 |
within the image. |
| 53 |
|
| 54 |
.. _sec.include: |
| 55 |
|
| 56 |
<include> |
| 57 |
--------- |
| 58 |
|
| 59 |
Optional include of XML file content from a file. |
| 60 |
|
| 61 |
.. code:: xml |
| 62 |
|
| 63 |
<image schemaversion="{schema_version}" name="{exc_image_base_name}"> |
| 64 |
<include from="file://description.xml"/> |
| 65 |
</image> |
| 66 |
|
| 67 |
with file :file:`description.xml` as follows: |
| 68 |
|
| 69 |
.. code:: xml |
| 70 |
|
| 71 |
<image> |
| 72 |
<description type="system"> |
| 73 |
<author>name</author> |
| 74 |
<contact>contact</contact> |
| 75 |
<specification>text</specification> |
| 76 |
</description> |
| 77 |
</image> |
| 78 |
|
| 79 |
This will replace the `include` statement with the contents |
| 80 |
of :file:`description.xml`. The validation of the result happens |
| 81 |
after the inclusion of all `include` references. The value for |
| 82 |
the `from` attribute is interpreted as a URI. As of now, only |
| 83 |
local URI types are supported, as well as the `this://` resource |
| 84 |
locator, which translates into the path to the KIWI image |
| 85 |
description. |
| 86 |
|
| 87 |
.. note:: |
| 88 |
|
| 89 |
The include information must be embedded into an `<image>` |
| 90 |
root node. Only the inner elements of the root node will |
| 91 |
be included. The processing of XML data via XSLT always |
| 92 |
requires a root node, which is the reason why this is |
| 93 |
required to be specified for include files as well. |
| 94 |
|
| 95 |
.. note:: |
| 96 |
|
| 97 |
Nesting of include statements in other include files is |
| 98 |
not supported. This will lead to unresolved include |
| 99 |
statements in the final document and will cause the |
| 100 |
runtime checker to complain about it. |
| 101 |
|
| 102 |
.. note:: |
| 103 |
|
| 104 |
The include is implemented via an XSLT stylesheet and therefore |
| 105 |
expects an XML document. Other markup formats are not supported |
| 106 |
as an include reference. |
| 107 |
|
| 108 |
.. _sec.description: |
| 109 |
|
| 110 |
<description> |
| 111 |
------------- |
| 112 |
|
| 113 |
Provide an image identity. |
| 114 |
|
| 115 |
.. code:: xml |
| 116 |
|
| 117 |
<description type="system"> |
| 118 |
<author>name</author> |
| 119 |
<contact>contact</contact> |
| 120 |
<specification>text</specification> |
| 121 |
</description> |
| 122 |
|
| 123 |
The mandatory description section contains information about the creator |
| 124 |
of this image description. The attribute `type` could be either of the |
| 125 |
value `system`, which indicates this is a system image description, or a value |
| 126 |
`boot` for custom kiwi boot image descriptions. |
| 127 |
|
| 128 |
The following optional subsections can be inserted below the description tag: |
| 129 |
|
| 130 |
license |
| 131 |
Specifies the license name that applies to this image description. |
| 132 |
|
| 133 |
.. _sec.certificates: |
| 134 |
|
| 135 |
<certificates> |
| 136 |
-------------- |
| 137 |
|
| 138 |
Add a cert-file to the directory storing additional local CA certificates. |
| 139 |
The import will occur immediately after the bootstrap process, where |
| 140 |
the required CA update tooling is expected to be installed. This |
| 141 |
setting is useful for situations where certificates are not packaged, |
| 142 |
or the certificates are required during the build process, e.g., due |
| 143 |
to proxy servers in the build environment that need certificates |
| 144 |
in chroot. The required `target_distribution` attribute must be set |
| 145 |
to allow kiwi a correct matching for the CA store path and the update |
| 146 |
tool with regard to the image's target distribution. The following |
| 147 |
settings apply: |
| 148 |
|
| 149 |
+--------------+-------------------------------------------+------------------------+ |
| 150 |
| Distributor | CA Store | Update Tool | |
| 151 |
+==============+===========================================+========================+ |
| 152 |
| SUSE | /etc/pki/trust/anchors | update-ca-certificates | |
| 153 |
+--------------+-------------------------------------------+------------------------+ |
| 154 |
| Red Hat | /etc/pki/ca-trust/source/anchors | update-ca-trust | |
| 155 |
+--------------+-------------------------------------------+------------------------+ |
| 156 |
| Debian Based | /usr/local/share/ca-certificates | update-ca-certificates | |
| 157 |
+--------------+-------------------------------------------+------------------------+ |
| 158 |
| Arch Linux | /etc/ca-certificates/trust-source/anchors | update-ca-trust | |
| 159 |
+--------------+-------------------------------------------+------------------------+ |
| 160 |
|
| 161 |
.. code:: xml |
| 162 |
|
| 163 |
<certificates target_distribution="suse|redhat|debian|archlinux"> |
| 164 |
<certificate name="/some/ca/filename1"/> |
| 165 |
<certificate name="/some/ca/filename2"/> |
| 166 |
</certificates> |
| 167 |
|
| 168 |
.. _sec.preferences: |
| 169 |
|
| 170 |
<preferences> |
| 171 |
------------- |
| 172 |
|
| 173 |
Set up image type and layout. |
| 174 |
|
| 175 |
.. code:: xml |
| 176 |
|
| 177 |
<preferences arch="arch"> |
| 178 |
<version>1.2.3</version> |
| 179 |
<packagemanager>zypper</packagemanager> |
| 180 |
<type image="tbz"/> |
| 181 |
</preferences> |
| 182 |
|
| 183 |
The mandatory preferences section contains information about the |
| 184 |
supported image type(s), the used package manager, the version of this |
| 185 |
image, and further optional elements. The preferences section can |
| 186 |
be configured to apply only for a certain architecture. In this |
| 187 |
case, specify the `arch` attribute with a value as it is reported |
| 188 |
by :command:`uname -m`. |
| 189 |
|
| 190 |
<preferences><version> |
| 191 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 192 |
The mandatory image version must be a three-part version number of the |
| 193 |
format: **Major**.\ **Minor**.\ **Release**. In case of changes to |
| 194 |
the image description, the following rules should apply: |
| 195 |
|
| 196 |
* For smaller image modifications that do not add or remove any new |
| 197 |
packages, only the release number is incremented. The XML description |
| 198 |
file(``config.xml``) remains unchanged. |
| 199 |
|
| 200 |
* For image changes that involve the addition or removal of packages, |
| 201 |
the minor number is incremented, and the release number is reset. |
| 202 |
|
| 203 |
* For image changes that change the behavior or geometry of the |
| 204 |
image file, the major number is incremented. |
| 205 |
|
| 206 |
<preferences><packagemanager> |
| 207 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 208 |
The mandatory `packagemanager` element specifies which package manager |
| 209 |
should be used to handle software packages. The `packagemanager` setup |
| 210 |
is connected to the distribution used to build the image. The following |
| 211 |
table shows which package manager is connected to which distributor: |
| 212 |
|
| 213 |
+--------------+-----------------+ |
| 214 |
| Distributor | Package Manager | |
| 215 |
+==============+=================+ |
| 216 |
| SUSE | zypper | |
| 217 |
+--------------+-----------------+ |
| 218 |
| Red Hat | dnf4 / dnf5 / | |
| 219 |
| | microdnf | |
| 220 |
+--------------+-----------------+ |
| 221 |
| Debian Based | apt | |
| 222 |
+--------------+-----------------+ |
| 223 |
| Arch Linux | pacman | |
| 224 |
+--------------+-----------------+ |
| 225 |
| Alpine Linux | apk | |
| 226 |
+--------------+-----------------+ |
| 227 |
|
| 228 |
In general, the specification of one preferences section is sufficient. |
| 229 |
However, it’s possible to specify multiple preferences sections and |
| 230 |
distinguish between the sections via the `profiles` attribute. |
| 231 |
|
| 232 |
In combination with the above, the preferences element supports the |
| 233 |
following optional elements: |
| 234 |
|
| 235 |
<preferences><rpm-locale-filtering> |
| 236 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 237 |
locale-filtering can be set to "true" or "false". If set to "true", it |
| 238 |
sets the `install_lang` macro for RPM-based installations to the RPM- |
| 239 |
configured locale list. This results in language-specific files |
| 240 |
being filtered out by `rpm` if they don't match the configured list. |
| 241 |
|
| 242 |
.. code:: xml |
| 243 |
|
| 244 |
<preferences> |
| 245 |
<rpm-locale-filtering>true</rpm-locale-filtering> |
| 246 |
</preferences> |
| 247 |
|
| 248 |
.. note:: |
| 249 |
|
| 250 |
It depends on the individual package design if the `install_lang` |
| 251 |
macro contents apply to the package or not. |
| 252 |
|
| 253 |
<preferences><rpm-check-signatures> |
| 254 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 255 |
Specifies whether package signatures should be checked or not. |
| 256 |
|
| 257 |
.. code:: xml |
| 258 |
|
| 259 |
<preferences> |
| 260 |
<rpm-check-signatures>true</rpm-check-signatures> |
| 261 |
</preferences> |
| 262 |
|
| 263 |
<preferences><rpm-excludedocs> |
| 264 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 265 |
Specifies whether files marked as documentation should be skipped |
| 266 |
during installation. |
| 267 |
|
| 268 |
.. code:: xml |
| 269 |
|
| 270 |
<preferences> |
| 271 |
<rpm-excludedocs>true</rpm-excludedocs> |
| 272 |
</preferences> |
| 273 |
|
| 274 |
<preferences><keytable> |
| 275 |
~~~~~~~~~~~~~~~~~~~~~~~ |
| 276 |
Specifies the name of the console keymap to use. The value |
| 277 |
corresponds to a map file in `/usr/share/kbd/keymaps/xkb`. |
| 278 |
|
| 279 |
.. code:: xml |
| 280 |
|
| 281 |
<preferences> |
| 282 |
<keytable>us</keytable> |
| 283 |
</preferences> |
| 284 |
|
| 285 |
<preferences><timezone> |
| 286 |
~~~~~~~~~~~~~~~~~~~~~~~ |
| 287 |
Specifies the time zone. Available time zones are located in the |
| 288 |
`/usr/share/zoneinfo` directory. Specify the attribute value |
| 289 |
relative to `/usr/share/zoneinfo`. For example, specify |
| 290 |
`Europe/Berlin` for `/usr/share/zoneinfo/Europe/Berlin`. |
| 291 |
|
| 292 |
.. code:: xml |
| 293 |
|
| 294 |
<preferences> |
| 295 |
<timezone>Europe/Berlin</timezone> |
| 296 |
</preferences> |
| 297 |
|
| 298 |
<preferences><locale> |
| 299 |
~~~~~~~~~~~~~~~~~~~~~ |
| 300 |
Specifies the name of the UTF-8 locale to use, which defines the |
| 301 |
contents of the `RC_LANG` system environment variable used in the |
| 302 |
image and to run the custom scripts specified as part of the |
| 303 |
{kiwi} image description. Please note, only UTF-8 locales are |
| 304 |
supported here, which also means that the encoding must *not* be part |
| 305 |
of the locale information. This means you need to specify the |
| 306 |
locale using the 4-digit name, like the following example: `en_US` or |
| 307 |
`en_US,de_DE`. |
| 308 |
|
| 309 |
.. code:: xml |
| 310 |
|
| 311 |
<preferences> |
| 312 |
<locale>en_US</locale> |
| 313 |
</preferences> |
| 314 |
|
| 315 |
<preferences><bootsplash-theme> |
| 316 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 317 |
Specifies the name of the plymouth bootsplash theme to use. |
| 318 |
|
| 319 |
.. code:: xml |
| 320 |
|
| 321 |
<preferences> |
| 322 |
<bootsplash-theme>bgrt</bootsplash-theme> |
| 323 |
</preferences> |
| 324 |
|
| 325 |
<preferences><bootloader-theme> |
| 326 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 327 |
Specifies the name of the bootloader theme to use if that used |
| 328 |
bootloader has theme support. |
| 329 |
|
| 330 |
.. code:: xml |
| 331 |
|
| 332 |
<preferences> |
| 333 |
<bootloader-theme>openSUSE</bootloader-theme> |
| 334 |
</preferences> |
| 335 |
|
| 336 |
|
| 337 |
Along with the version and the packagemanager, at least one image type |
| 338 |
element must be specified to indicate which image type should be built. |
| 339 |
|
| 340 |
<preferences><release-version> |
| 341 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 342 |
Specifies the distribution's global release version as consumed |
| 343 |
by package managers. Currently, the release version is not set or |
| 344 |
set to `0` for package managers that require a value to operate. |
| 345 |
With the optional `release-version` section, users have an |
| 346 |
opportunity to specify a custom value which is passed along the package |
| 347 |
manager to define the distribution release. |
| 348 |
|
| 349 |
.. note:: |
| 350 |
|
| 351 |
The release version information is currently |
| 352 |
used in dnf/dnf5 and microdnf package managers only. It might |
| 353 |
happen that it gets applied to the other package manager |
| 354 |
backends as well. This will happen on demand, though. |
| 355 |
|
| 356 |
<preferences><showlicense> |
| 357 |
~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 358 |
Specifies the name of a license to be displayed in a dialog window at |
| 359 |
boot time. The element may be provided multiple times to show more than one |
| 360 |
license. |
| 361 |
|
| 362 |
.. code:: xml |
| 363 |
|
| 364 |
<preferences> |
| 365 |
<showlicense>license_name</showlicense> |
| 366 |
</preferences> |
| 367 |
|
| 368 |
<preferences><type> |
| 369 |
~~~~~~~~~~~~~~~~~~~ |
| 370 |
At least one type element must be configured. It is possible to |
| 371 |
specify multiple type elements in a preferences block. To set a given |
| 372 |
type description as the default image, use the boolean attribute `primary` |
| 373 |
and set its value to `true`: |
| 374 |
|
| 375 |
.. code:: xml |
| 376 |
|
| 377 |
<preferences> |
| 378 |
<type image="typename" primary="true"/> |
| 379 |
</preferences> |
| 380 |
|
| 381 |
The image type to be created is determined by the value of the image |
| 382 |
attribute. The following list describes the supported types and |
| 383 |
possible values of the image attribute: |
| 384 |
|
| 385 |
image="tbz" |
| 386 |
A simple tar archive image. The `tbz` type packs the contents of |
| 387 |
the image root tree into an xz-compressed tarball. |
| 388 |
|
| 389 |
image="btrfs|ext2|ext3|ext4|squashfs|erofs|xfs" |
| 390 |
A filesystem image. The image root tree data is packed into a |
| 391 |
filesystem image of the given type. An image of that type can |
| 392 |
be loop-mounted and accessed according to the capabilities of |
| 393 |
the selected filesystem. |
| 394 |
|
| 395 |
image="iso" |
| 396 |
An ISO image that can be dumped on a CD/DVD or USB stick |
| 397 |
and boots from this media without interfering with other |
| 398 |
system storage components. A useful pocket system for testing, |
| 399 |
demo, and debugging purposes. |
| 400 |
|
| 401 |
image="oem" |
| 402 |
An image representing an expandable system disk. This means after |
| 403 |
deployment, the system can resize itself to the new disk geometry. |
| 404 |
The resize operation is configurable as part of the image description, |
| 405 |
and an installation image for CD/DVD, USB stick, and network deployment |
| 406 |
can be created in addition. For use in cloud frameworks like |
| 407 |
Amazon EC2, Google Compute Engine, or Microsoft Azure, this disk |
| 408 |
type also supports the common virtual disk formats. |
| 409 |
|
| 410 |
image="docker" |
| 411 |
An archive image suitable for the Docker container engine. |
| 412 |
The image can be loaded via the `docker load` command and |
| 413 |
works within the scope of the container engine. |
| 414 |
|
| 415 |
image="oci" |
| 416 |
An archive image that builds a container matching the OCI |
| 417 |
(Open Container Interface) standard. The container should be |
| 418 |
able to run with any OCI-compliant container engine. |
| 419 |
|
| 420 |
image="appx" |
| 421 |
An archive image suitable for the Windows Subsystem for Linux |
| 422 |
container engine. The image can be loaded from a Windows System |
| 423 |
that has support for WSL activated. |
| 424 |
|
| 425 |
image="wsl" |
| 426 |
An archive image suitable for the Windows Subsystem for Linux |
| 427 |
container engine >= v2.4.4. The image represents a gzip-compressed |
| 428 |
tar file as described in |
| 429 |
https://learn.microsoft.com/en-us/windows/wsl/build-custom-distro |
| 430 |
and can be loaded from a Windows System |
| 431 |
that has support for WSL in that version activated. |
| 432 |
|
| 433 |
image="kis" |
| 434 |
An optional root filesystem image associated with a kernel and initrd. |
| 435 |
The use case for this component image type is highly customizable. |
| 436 |
Many different deployment strategies are possible. |
| 437 |
|
| 438 |
image="pxe" |
| 439 |
The legacy network boot image type, superseded by `kis`. It builds the |
| 440 |
same kernel, initrd and root filesystem components but defaults to the |
| 441 |
{kiwi} initrd system rather than dracut. |
| 442 |
|
| 443 |
image="cpio" |
| 444 |
A cpio archive of the image root tree, as used for an initrd. |
| 445 |
|
| 446 |
image="enclave" |
| 447 |
An AWS Nitro Enclave image. Requires |
| 448 |
`enclave_format="aws-nitro"`. See :ref:`eif`. |
| 449 |
|
| 450 |
The complete set of accepted values is `btrfs`, `cpio`, `docker`, `enclave`, |
| 451 |
`erofs`, `ext2`, `ext3`, `ext4`, `iso`, `kis`, `oci`, `oem`, `pxe`, `squashfs`, |
| 452 |
`tbz`, `wsl`, `xfs` and `appx`. |
| 453 |
|
| 454 |
|
| 455 |
For completion of a type description, there could be several other |
| 456 |
optional attributes and child elements. The `type` element supports a |
| 457 |
plethora of optional attributes; some of these are only relevant for |
| 458 |
certain build types and will be covered in extra chapters that describe |
| 459 |
the individual image types in more detail. Certain attributes are, however, |
| 460 |
useful for nearly all build types and will be covered next: |
| 461 |
|
| 462 |
bootpartition="true|false": |
| 463 |
A boolean parameter notifying {kiwi} whether an extra boot |
| 464 |
partition should be used or not (the default depends on the current |
| 465 |
layout). This will override {kiwi}'s default layout. |
| 466 |
Only available for the `oem` type. |
| 467 |
|
| 468 |
|
| 469 |
bootpartsize="nonNegativeInteger": |
| 470 |
For images with a separate boot partition, this attribute |
| 471 |
specifies the size in MB. If not set, the boot partition |
| 472 |
size is set to 300 MB. Only available for the `oem` type. |
| 473 |
|
| 474 |
eficsm="true|false": |
| 475 |
For images with an EFI layout, specify if the legacy |
| 476 |
CSM (BIOS) mode should be supported or not. By default, |
| 477 |
CSM mode is enabled. |
| 478 |
Only available for the `oem` and `iso` types. |
| 479 |
|
| 480 |
|
| 481 |
efipartsize="nonNegativeInteger": |
| 482 |
For images with an EFI fat partition, this attribute |
| 483 |
specifies the size in MB. If not set, the EFI partition |
| 484 |
size is set to 20 MB. |
| 485 |
Only available for the `oem` type. |
| 486 |
|
| 487 |
|
| 488 |
efifatimagesize="nonNegativeInteger": |
| 489 |
For ISO images (live and install), the EFI boot requires |
| 490 |
an embedded FAT image. This attribute specifies the size |
| 491 |
in MB. If not set, the FAT image size is set to 20 MB. |
| 492 |
Only available for the `oem` and `iso` types. |
| 493 |
|
| 494 |
|
| 495 |
efiparttable="msdos|gpt": |
| 496 |
For images with an EFI firmware, specifies the partition |
| 497 |
table type to use. If not set, it defaults to the GPT partition |
| 498 |
table type for disk images and MBR (msdos) for ISO images. |
| 499 |
Only available for the `oem` and `iso` types. |
| 500 |
|
| 501 |
|
| 502 |
dosparttable_extended_layout="true|false": |
| 503 |
For OEM disk images, specifies to make use of logical partitions |
| 504 |
inside of an extended one. If set to true and if the msdos table type |
| 505 |
is active, this will cause the fourth partition to be an |
| 506 |
extended partition, and all following partitions will be |
| 507 |
placed as logical partitions inside of that extended |
| 508 |
partition. This setting is useful if more than 4 primary |
| 509 |
partitions need to be created in an msdos table. |
| 510 |
Only available for the `oem` type. |
| 511 |
|
| 512 |
|
| 513 |
btrfs_quota_groups="true|false": |
| 514 |
A boolean parameter to activate filesystem quotas if |
| 515 |
the filesystem is `btrfs`. By default, quotas are inactive. |
| 516 |
Only available for the `oem` type. |
| 517 |
|
| 518 |
|
| 519 |
btrfs_set_default_volume="true|false": |
| 520 |
For OEM disk images using the btrfs filesystem, this requests to |
| 521 |
set a default volume for the rootfs, which is used when the |
| 522 |
filesystem gets mounted. In case a `true` value is provided or |
| 523 |
the attribute is not specified at all, kiwi will make a volume |
| 524 |
the default volume. This can be either `/` or the configured |
| 525 |
root subvolume or the configured root snapshot. Consequently, the |
| 526 |
entry created for the rootfs in the `/etc/fstab` file will not |
| 527 |
contain any specific volume definition. In case a `false` value |
| 528 |
is provided, kiwi will not set any default volume, which also |
| 529 |
means that the entry for the rootfs in the `/etc/fstab` file |
| 530 |
requires a volume definition which is placed by kiwi as a |
| 531 |
`subvol=` parameter in the respective fstab field entry. In |
| 532 |
addition, the parameter `rootflags=subvol=` is added to the |
| 533 |
kernel commandline such that early initrd code has a chance |
| 534 |
to know about the rootfs volume. |
| 535 |
|
| 536 |
btrfs_root_is_subvolume="true|false": |
| 537 |
Tell kiwi to create a root volume to host (/) inside. |
| 538 |
The name of this subvolume is, by default, set to: `@`. |
| 539 |
The name of the subvolume can be changed via a volume entry |
| 540 |
of the form: |
| 541 |
|
| 542 |
.. code:: xml |
| 543 |
|
| 544 |
<systemdisk> |
| 545 |
<volume name="@root=TOPLEVEL_NAME"/> |
| 546 |
</systemdisk> |
| 547 |
|
| 548 |
By default, the creation of a top-level volume is set to `true`. |
| 549 |
Only available for the `oem` type. |
| 550 |
|
| 551 |
|
| 552 |
btrfs_root_is_snapper_snapshot="true|false": |
| 553 |
A boolean parameter that tells {kiwi} to install |
| 554 |
the system into a btrfs snapshot. The snapshot layout is compatible |
| 555 |
with the snapper management toolkit and follows a concept by SUSE. |
| 556 |
By default, snapshots are turned off. |
| 557 |
Only available for the `oem` type. |
| 558 |
|
| 559 |
|
| 560 |
btrfs_root_is_readonly_snapshot="true|false": |
| 561 |
A boolean parameter notifying {kiwi} that |
| 562 |
the btrfs root filesystem snapshot has to be made read-only. If this option |
| 563 |
is set to true, the root filesystem snapshot will be turned into |
| 564 |
read-only mode once all data has been placed in it. The option is only |
| 565 |
effective if `btrfs_root_is_snapper_snapshot` is also set to true. By default, the |
| 566 |
root filesystem snapshot is writable. |
| 567 |
Only available for the `oem` type. |
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
compressed="true|false": |
| 572 |
Specifies whether the image output file should be |
| 573 |
compressed or not. Only available for the `pxe` and `kis` types, where |
| 574 |
compression also applies to the tar archive that contains the build |
| 575 |
results. |
| 576 |
|
| 577 |
archive="true|false": |
| 578 |
Specifies whether the image output file should be an archive or not. |
| 579 |
This option is only available for the `kis` type. When set to `true`, |
| 580 |
all image build results will be placed into an archive file. When set |
| 581 |
to `false`, the build results will stay as individual files in the |
| 582 |
build directory. The default is `true`. |
| 583 |
|
| 584 |
editbootconfig="file_path": |
| 585 |
Specifies the path to a script that is called right |
| 586 |
before the bootloader is installed. The script runs relative to the |
| 587 |
directory that contains the image structure. |
| 588 |
Only available for the `oem` and `iso` types. |
| 589 |
|
| 590 |
|
| 591 |
editbootinstall="file_path": |
| 592 |
Specifies the path to a script that is called right |
| 593 |
after the bootloader is installed. The script runs relative to the |
| 594 |
directory that contains the image structure. |
| 595 |
Only available for the `oem` type. |
| 596 |
|
| 597 |
|
| 598 |
filesystem="btrfs|ext2|ext3|ext4|squashfs|erofs|xfs": |
| 599 |
The root filesystem. Available for the `oem`, `pxe`, `kis` and `iso` types, |
| 600 |
and **required** for the `oem` type. |
| 601 |
|
| 602 |
firmware="efi|uefi|bios|ec2|ofw|opal|custom": |
| 603 |
Specifies the boot firmware of the appliance. This attribute is |
| 604 |
used to differentiate the image according to the firmware which |
| 605 |
boots up the system. It mostly impacts the disk layout and the |
| 606 |
partition table type. By default, `bios` is used on x86, |
| 607 |
`ofw` on PowerPC, and `efi` on ARM, RISC-V and LoongArch. |
| 608 |
Only available for the `oem`, `pxe` and `iso` types. |
| 609 |
|
| 610 |
* `efi` |
| 611 |
Standard EFI layout. |
| 612 |
|
| 613 |
* `uefi` |
| 614 |
Standard EFI layout for secure boot. |
| 615 |
|
| 616 |
* `bios` |
| 617 |
Standard BIOS layout for x86. |
| 618 |
|
| 619 |
* `ec2` |
| 620 |
Standard BIOS layout for x86 using Xen grub modules for old- |
| 621 |
style Xen boot in Amazon EC2. |
| 622 |
|
| 623 |
* `ofw` |
| 624 |
Standard PPC layout. |
| 625 |
|
| 626 |
* `opal` |
| 627 |
Standard openPOWER PPC64 layout. kexec-based boot process. |
| 628 |
|
| 629 |
* `custom` |
| 630 |
The firmware setup is entirely provided by custom scripts and {kiwi} takes |
| 631 |
no further action. |
| 632 |
|
| 633 |
force_mbr="true|false": |
| 634 |
A boolean parameter to force the usage of an MBR partition |
| 635 |
table even if the system would default to GPT. This is occasionally |
| 636 |
required on ARM systems that use an EFI partition layout but must |
| 637 |
not be stored in a GPT. Note that forcing an MBR partition table incurs |
| 638 |
limitations with respect to the number of available partitions and their |
| 639 |
sizes. Only available for the `oem` type. |
| 640 |
|
| 641 |
fsmountoptions="option_string": |
| 642 |
Specifies the filesystem mount options that are passed |
| 643 |
via the `-o` flag to :command:`mount` and are included in |
| 644 |
:file:`/etc/fstab`. |
| 645 |
|
| 646 |
fscreateoptions="option_string": |
| 647 |
Specifies the filesystem options used to create the |
| 648 |
filesystem. In {kiwi}, the filesystem utility to create a filesystem is |
| 649 |
called without any custom options. The default options are filesystem- |
| 650 |
specific and are provided along with the package that provides the |
| 651 |
filesystem utility. For the Linux `ext[234]` filesystem, the default |
| 652 |
options can be found in the :file:`/etc/mke2fs.conf` file. Other |
| 653 |
filesystems provide this differently and document information |
| 654 |
about options and their defaults in the respective manual page, e.g., |
| 655 |
:command:`man mke2fs`. With the `fscreateoptions` attribute, it's possible |
| 656 |
to directly influence how the filesystem will be created. The options |
| 657 |
provided as a string are passed to the command that creates the |
| 658 |
filesystem without any further validation by {kiwi}. For example, to turn |
| 659 |
off the journal on the creation of an ext4 filesystem, the following option |
| 660 |
would be required: |
| 661 |
|
| 662 |
.. code:: xml |
| 663 |
|
| 664 |
<preferences> |
| 665 |
<type fscreateoptions="-O ^has_journal"/> |
| 666 |
</preferences> |
| 667 |
|
| 668 |
kernelcmdline="string": |
| 669 |
Additional kernel parameters passed to the kernel by the |
| 670 |
bootloader. |
| 671 |
Only available for the `oem`, `iso`, `pxe`, `kis` and `enclave` types. |
| 672 |
|
| 673 |
|
| 674 |
root_clone="number" |
| 675 |
For OEM disk images, this attribute allows you to create `number` |
| 676 |
clone(s) of the root partition, with `number` >= 1. A clone partition |
| 677 |
is content-wise an exact byte-for-byte copy of the origin root partition. |
| 678 |
However, to avoid conflicts at boot time, the UUID of any |
| 679 |
cloned partition will be made unique. In the sequence of partitions, |
| 680 |
the clone(s) will always be created first, followed by the |
| 681 |
partition considered the origin. The origin partition is the |
| 682 |
one that will be referenced and used by the system. |
| 683 |
Also, see :ref:`clone_partitions`. |
| 684 |
Only available for the `oem` type. |
| 685 |
|
| 686 |
|
| 687 |
boot_clone="number" |
| 688 |
Same as `root_clone` but applied to the boot partition if present. |
| 689 |
Only available for the `oem` type. |
| 690 |
|
| 691 |
|
| 692 |
luks="passphrase|file:///path/to/keyfile|random": |
| 693 |
Supplying a value will trigger the encryption of the partition |
| 694 |
serving the root filesystem using the LUKS extension. The supplied |
| 695 |
value represents either the passphrase string or the location of |
| 696 |
a key file if specified as a `file://...` resource or the reserved |
| 697 |
name `random`. When using a passphrase, the system will interactively |
| 698 |
ask for that passphrase on first boot unless it is set empty. |
| 699 |
In case of an empty passphrase, the system cannot be considered secure. |
| 700 |
When using a key file, the information from the file is read and |
| 701 |
used as a passphrase. The given key file is **not automatically** |
| 702 |
placed into the system or added to `/etc/crypttab`, which means |
| 703 |
the passphrase in the key file is, by default, requested from an |
| 704 |
interactive dialog at boot time. When using the reserved word |
| 705 |
`random`, kiwi will create a key file with a random passphrase |
| 706 |
and place this information into `/etc/crypttab`. This allows |
| 707 |
the system to boot without user interaction but also requires |
| 708 |
the initrd to be protected in some way because it will contain |
| 709 |
the key file. The use of `random` is therefore only secure if |
| 710 |
the image adds additional security that encrypts the initrd, |
| 711 |
as is, e.g., done in the IBM secure execution process. |
| 712 |
If the encryption of the system is combined with the attribute |
| 713 |
`bootpartition="false"`, it's important to understand that this |
| 714 |
will place `/boot` into the encrypted area of the system and |
| 715 |
leave reading boot data from it as a responsibility to the |
| 716 |
bootloader. Not every bootloader can cope with that, and those |
| 717 |
that can, e.g., grub, will then open an interactive dialog at |
| 718 |
the bootloader level asking for the credentials to decrypt the |
| 719 |
root filesystem. |
| 720 |
Only available for the `oem`, `iso`, `pxe` and `kis` types. |
| 721 |
|
| 722 |
|
| 723 |
luks_version="luks|luks1|luks2": |
| 724 |
Specify which `LUKS` version should be used. If not set, and by |
| 725 |
default, `luks` is used. The interpretation of the default depends |
| 726 |
on the distribution and could result in either 'luks1' or 'luks2'. |
| 727 |
The specification of the `LUKS` version allows using a different |
| 728 |
set of `luksformat` options. To investigate the differences between |
| 729 |
the two, please consult the `cryptsetup` manual page. |
| 730 |
Only available for the `oem`, `iso`, `pxe` and `kis` types. |
| 731 |
|
| 732 |
|
| 733 |
target_blocksize="number": |
| 734 |
Specifies the image blocksize in bytes, which has to |
| 735 |
match the logical blocksize of the target storage device. By default, 512 |
| 736 |
bytes is used, which works on many disks. You can obtain the blocksize |
| 737 |
from the `SSZ` column in the output of the following command: |
| 738 |
|
| 739 |
.. code:: shell-session |
| 740 |
|
| 741 |
blockdev --report $DEVICE |
| 742 |
|
| 743 |
Only available for the `oem` and `kis` types. |
| 744 |
|
| 745 |
|
| 746 |
target_removable="true|false": |
| 747 |
Indicate if the target disk for OEM images is deployed |
| 748 |
to a removable device, e.g., a USB stick or not. This only |
| 749 |
affects the EFI setup if requested, and in the end, avoids |
| 750 |
the creation of a custom boot menu entry in the firmware |
| 751 |
of the target machine. By default, the target disk is |
| 752 |
expected to be non-removable. |
| 753 |
Only available for the `oem` type. |
| 754 |
|
| 755 |
|
| 756 |
selinux_policy="targeted|mls|minimum": |
| 757 |
The `selinux_policy` attribute sets the SELinux policy to use. |
| 758 |
The `targeted` policy is the default policy. Only change this option |
| 759 |
if you want to use the `mls` or `minimum` policy. |
| 760 |
|
| 761 |
spare_part="number": |
| 762 |
Request a spare partition right before the root partition |
| 763 |
of the requested size. The attribute takes a size value |
| 764 |
and allows a unit in MB or GB, e.g., 200M. If no unit is given, |
| 765 |
the value is considered to be mbytes. A spare partition |
| 766 |
can only be configured for the disk image type oem. |
| 767 |
|
| 768 |
spare_part_mountpoint="dir_path": |
| 769 |
Specify a mount point for the spare partition in the system. |
| 770 |
Can only be configured for the disk image type oem. |
| 771 |
|
| 772 |
spare_part_fs="btrfs|ext2|ext3|ext4|xfs": |
| 773 |
Specify a filesystem for the spare partition in the system. |
| 774 |
Can only be configured for the disk image type oem. |
| 775 |
|
| 776 |
spare_part_fs_attributes="attribute_list": |
| 777 |
Specify filesystem attributes for the spare partition. |
| 778 |
Attributes can be specified as a comma-separated list. |
| 779 |
Currently, the attributes `no-copy-on-write` and `synchronous-updates` |
| 780 |
are available. Can only be configured for the disk image |
| 781 |
type oem. |
| 782 |
|
| 783 |
spare_part_is_last="true|false": |
| 784 |
Specify if the spare partition should be the last one in |
| 785 |
the partition table. It can only be configured for the `oem` |
| 786 |
type with oem-resize switched off. By default, the root |
| 787 |
partition is the last one, and the spare partition lives |
| 788 |
before it. With this attribute, that setup can be toggled. |
| 789 |
However, if the root partition is no longer the last one, |
| 790 |
the OEM repart/resize code can no longer work because |
| 791 |
the spare part would block it. Because of that, moving |
| 792 |
the spare part at the end of the disk is only applied |
| 793 |
if oem-resize is switched off. There is a runtime |
| 794 |
check in the {kiwi} code to check this condition. |
| 795 |
|
| 796 |
devicepersistency="by-uuid|by-label|by-partuuid": |
| 797 |
Specifies which method to use for persistent device names. |
| 798 |
This will affect all files written by kiwi that include |
| 799 |
device references, for example, `/etc/fstab` or the `root=` |
| 800 |
parameter in the kernel command line. By default, by-uuid |
| 801 |
is used. |
| 802 |
|
| 803 |
.. note:: devicepersistency and its impact to install images |
| 804 |
|
| 805 |
Please note that specifying `devicepersistency` also affects an |
| 806 |
eventually generated install image. This means that the installation |
| 807 |
media created from the image description will also use the specified |
| 808 |
device persistency method. It is possible that the selected method |
| 809 |
does not provide device representations for the disk devices found |
| 810 |
by the installation process. In this case the fallback to the raw |
| 811 |
unix device node e.g., `/dev/sda` will be used. If the installation |
| 812 |
media is created to allow user interaction and there are more than |
| 813 |
one disk device found during installation, the user will be prompted |
| 814 |
with a list of disk device names to select from. If the list shows |
| 815 |
the raw unix device nodes, it might be difficult for the user to |
| 816 |
select the correct disk. In this case, it is recommended to explicitly |
| 817 |
set the persistency method to use for the installation media via |
| 818 |
the `rd.kiwi.install.devicepersistency` kernel command line parameter. |
| 819 |
The parameter can also be set as a fixed value in the `kernelcmdline` |
| 820 |
attribute of the image description. Available persistency methods |
| 821 |
useful for disk device mappings are: `by-id` and `by-path`. |
| 822 |
|
| 823 |
squashfscompression="uncompressed|gzip|lzo|lz4|xz|zstd": |
| 824 |
Specifies the compression type for mksquashfs. |
| 825 |
Only available for the `oem`, `pxe`, `kis`, `iso` and `squashfs` types. |
| 826 |
|
| 827 |
|
| 828 |
erofscompression="text" |
| 829 |
Specifies the compression type and level for erofs. |
| 830 |
The attribute is a free-form text because erofs allows parameters |
| 831 |
for the different compression types. Please consult the erofs |
| 832 |
man page for details on how to specify a value for the `-z` option |
| 833 |
on `mkfs.erofs` and pass a proper value as `erofscompression`. |
| 834 |
Only available for the `oem`, `pxe`, `kis`, `iso` and `erofs` types. |
| 835 |
|
| 836 |
|
| 837 |
standalone_integrity="true|false": |
| 838 |
For the `oem` type only, specifies to create a standalone |
| 839 |
`dm_integrity` layer on top of the root filesystem. |
| 840 |
|
| 841 |
integrity_legacy_hmac="true|false": |
| 842 |
For the `oem` type only and in combination with the `standalone_integrity` |
| 843 |
attribute, this allows the use of old, flawed HMAC calculations (does not protect the superblock). |
| 844 |
|
| 845 |
.. warning:: |
| 846 |
|
| 847 |
Do not use this attribute unless compatibility with |
| 848 |
a specific old kernel is required! |
| 849 |
|
| 850 |
integrity_keyfile="filepath": |
| 851 |
For the `oem` type only, and in combination with the `standalone_integrity` |
| 852 |
attribute, this protects access to the integrity map using the given keyfile. |
| 853 |
|
| 854 |
integrity_metadata_key_description="string": |
| 855 |
For the `oem` type only, and in combination with |
| 856 |
the `embed_integrity_metadata` attribute, specifies a custom |
| 857 |
description of an integrity key as it is expected to be present |
| 858 |
in the kernel keyring. The information is placed in the integrity |
| 859 |
metadata block. If not specified, kiwi creates a key argument |
| 860 |
string instead, which is based on the given `integrity_keyfile` |
| 861 |
filename. The format of this key argument is: |
| 862 |
|
| 863 |
.. code:: bash |
| 864 |
|
| 865 |
:BASENAME_OF_integrity_keyfile_WITHOUT_FILE_EXTENSION |
| 866 |
|
| 867 |
embed_integrity_metadata="true|false": |
| 868 |
For the `oem` type only, and in combination with the |
| 869 |
`standalone_integrity` attribute, specifies to write a binary |
| 870 |
block at the end of the partition serving the root filesystem, |
| 871 |
containing information to create the `dm_integrity` device map |
| 872 |
in the following format: |
| 873 |
|
| 874 |
.. code:: bash |
| 875 |
|
| 876 |
|header|0xFF|dm_integrity_meta|0xFF|0x0| |
| 877 |
|
| 878 |
header: |
| 879 |
Is a string of the following information separated by spaces: |
| 880 |
|
| 881 |
* **version**: currently set to `1` |
| 882 |
* **fstype**: name of the `filesystem` attribute |
| 883 |
* **access**: either `ro` or `rw`, depending on the filesystem capabilities |
| 884 |
* `integrity`: fixed identifier value |
| 885 |
|
| 886 |
dm_integrity_meta: |
| 887 |
Is a string of the following information separated by spaces: |
| 888 |
|
| 889 |
* **provided_data_sectors**: number of data sectors |
| 890 |
* **sector_size**: sector size in bytes; defaults to 512 |
| 891 |
* **parameter_count**: |
| 892 |
number of parameters needed to construct the integrity device map. |
| 893 |
After the `parameter_count`, a list of space-separated parameters |
| 894 |
follows, and the `parameter_count` specifies the quantity of these |
| 895 |
parameters. |
| 896 |
* **parameters**: |
| 897 |
The first element of the parameter list contains information about |
| 898 |
the used hash algorithm, which is not part of the superblock and |
| 899 |
is provided according to the parameters passed along when {kiwi} |
| 900 |
calls `integritysetup`. As of now, this defaults to: |
| 901 |
|
| 902 |
- internal_hash:sha256 |
| 903 |
|
| 904 |
All subsequent parameters are taken from the `flags` field of the |
| 905 |
dm-integrity superblock. see the dm-integrity documentation on the |
| 906 |
web for possible flag values. |
| 907 |
|
| 908 |
verity_blocks="number|all": |
| 909 |
For the `oem` and `iso` types only, specifies to create a dm-verity hash |
| 910 |
from the number of given blocks (or all) placed at the end of the |
| 911 |
root filesystem. For later verification of the device, |
| 912 |
the credentials information produced by `veritysetup` from the |
| 913 |
cryptsetup tools are needed. This data as of now is only printed |
| 914 |
as debugging information to the build log file. A concept to |
| 915 |
persistently store the verification metadata as part of the |
| 916 |
partition(s) will be a next step. |
| 917 |
|
| 918 |
embed_verity_metadata="true|false": |
| 919 |
For the `oem` type only, and in combination with the `verity_blocks` |
| 920 |
attribute, specifies to write a binary block at the end of the |
| 921 |
partition serving the root filesystem, containing information |
| 922 |
for `dm_verity` verification in the following format: |
| 923 |
|
| 924 |
.. code:: bash |
| 925 |
|
| 926 |
|header|0xFF|dm_verity_credentials|0xFF|0x0| |
| 927 |
|
| 928 |
header: |
| 929 |
Is a string of the following information separated by spaces: |
| 930 |
|
| 931 |
* **version**: currently set to `1` |
| 932 |
* **fstype**: name of `filesystem` attribute |
| 933 |
* **access**: either `ro` or `rw` depending on the filesystem capabilities |
| 934 |
* `verity`: fixed identifier value |
| 935 |
|
| 936 |
dm_verity_credentials: |
| 937 |
Is a string of the following information separated by spaces: |
| 938 |
|
| 939 |
* **hash_type**: hash type name as returned by `veritysetup` |
| 940 |
* **data_blksize**: data blocksize as returned by `veritysetup` |
| 941 |
* **hash_blksize**: hash blocksize as returned by `veritysetup` |
| 942 |
* **data_blocks**: number of data blocks as returned by `veritysetup` |
| 943 |
* **hash_start_block**: |
| 944 |
hash start block as required by the kernel to construct the device map |
| 945 |
* **algorithm**: hash algorithm as returned by `veritysetup` |
| 946 |
* **root_hash**: root hash as returned by `veritysetup` |
| 947 |
* **salt**: salt hash as returned by `veritysetup` |
| 948 |
|
| 949 |
.. note:: dm-verity Runtime Options |
| 950 |
|
| 951 |
Additional veritysetup options can be provided at boot time using the kernel |
| 952 |
parameter `rd.kiwi.verity_options=option1,option2`. This allows runtime |
| 953 |
customization. |
| 954 |
|
| 955 |
KIWI automatically provides `hash-offset` and `hash-block-size` parameters |
| 956 |
based on the image configuration. These should not be specified manually |
| 957 |
via `rd.kiwi.verity_options=`. |
| 958 |
|
| 959 |
**Common Options:** |
| 960 |
|
| 961 |
* `panic-on-corruption`: System panics on corruption detection. |
| 962 |
* `restart-on-corruption`: System restarts on corruption (often default). |
| 963 |
* `ignore-corruption`: Ignore corruption (debugging only). |
| 964 |
* `ignore-zero-blocks`: Skip verification of zero blocks. |
| 965 |
* `check-at-most-once`: Verify each block only once. |
| 966 |
|
| 967 |
For complete options, see `veritysetup(8) <https://man7.org/linux/man-pages/man8/veritysetup.8.html>`_. |
| 968 |
|
| 969 |
overlayroot="true|false": |
| 970 |
For the `oem` type only, specifies to use an `overlayfs`-based root |
| 971 |
filesystem consisting of a squashfs-compressed read-only root |
| 972 |
filesystem combined with an optional write partition or tmpfs. |
| 973 |
The optional kernel boot parameter `rd.root.overlay.temporary` can |
| 974 |
be used to point the write area into a `tmpfs` instead of |
| 975 |
a persistent write partition. In this mode, all written data is |
| 976 |
temporary until the system is rebooted. The kernel boot parameter |
| 977 |
`rd.root.overlay.size` can be used to configure the size for the |
| 978 |
`tmpfs` that is used for the `overlayfs` mount process if |
| 979 |
`rd.root.overlay.temporary` is requested. That size configures the |
| 980 |
amount of space available for writing new data during the runtime |
| 981 |
of the system. The default value is set to `50%`, which means one |
| 982 |
half of the available RAM space can be used for writing new data. |
| 983 |
By default, the persistent write partition is used. The size of that |
| 984 |
partition can be influenced via the optional `<size>` element in |
| 985 |
the `<type>` section or via the optional `<oem-resize>` element in |
| 986 |
the `<oemconfig>` section of the XML description. Setting a fixed |
| 987 |
`<size>` value will set the size of the image disk to that |
| 988 |
value and results in an image file of that size. The available |
| 989 |
space for the write partition is that size, reduced by the |
| 990 |
size the squashfs read-only system needs. If the `<oem-resize>` |
| 991 |
element is set to `true`, an eventually given `<size>` element |
| 992 |
will not have any effect because the write partition will be |
| 993 |
resized on first boot to the available disk space. |
| 994 |
To disable the use of any overlay, the kernel boot parameter |
| 995 |
`rd.root.overlay.readonly` can be used. It takes precedence |
| 996 |
over all other overlay kernel parameters because it leads to the |
| 997 |
deactivation of any overlayfs-based action and just boots up with |
| 998 |
the squashfs root filesystem. In fact, this mode is the same |
| 999 |
as not installing the `kiwi-overlay` dracut module. |
| 1000 |
|
| 1001 |
overlayroot_readonly_filesystem="squashfs|erofs": |
| 1002 |
For the `oem` type only, specifies the filesystem type to use |
| 1003 |
as a read-only filesystem in an `overlayroot` setup. By default, |
| 1004 |
`squashfs` is used. |
| 1005 |
|
| 1006 |
overlayroot_readonly_createoptions="string": |
| 1007 |
For the `oem` type only, specifies additional creation options |
| 1008 |
passed to the tool that builds the read-only filesystem of an |
| 1009 |
`overlayroot` setup (`mkfs.erofs` or `mksquashfs`). The value is a |
| 1010 |
whitespace separated list of options, analogous to `fscreateoptions` |
| 1011 |
for the read-write root filesystem. A typical use is to select a |
| 1012 |
larger EROFS physical cluster for a better compression ratio, for |
| 1013 |
example `overlayroot_readonly_createoptions="-C 1048576"`. |
| 1014 |
|
| 1015 |
overlayroot_write_partition="true|false": |
| 1016 |
For the `oem` type only, this allows you to specify if the extra read-write |
| 1017 |
partition in an `overlayroot` setup should be created or not. |
| 1018 |
By default, the partition is created, and the kiwi-overlay dracut |
| 1019 |
module also expects it to be present. However, the overlayroot |
| 1020 |
feature can also be used without dracut (`initrd_system="none"`), |
| 1021 |
and under certain circumstances, it is handy to configure whether the |
| 1022 |
partition table should contain the read-write partition or not. |
| 1023 |
|
| 1024 |
overlayroot_readonly_partsize="mbsize": |
| 1025 |
Specifies the size in MB of the partition that stores the |
| 1026 |
squashfs-compressed read-only root filesystem in an |
| 1027 |
overlayroot setup. If not specified, kiwi calculates |
| 1028 |
the needed size by a preliminary creation of the |
| 1029 |
squashfs compressed file. However, this is only accurate |
| 1030 |
if no changes to the root filesystem data happen |
| 1031 |
after this calculation, which cannot be guaranteed as |
| 1032 |
there is at least one optional script hook that is |
| 1033 |
allowed and applied after the calculation. In addition, the |
| 1034 |
pre-calculation requires some time in the build process. |
| 1035 |
If the value can be provided beforehand, this also speeds |
| 1036 |
up the build process significantly. |
| 1037 |
Only available for the `oem` type. |
| 1038 |
|
| 1039 |
|
| 1040 |
bootfilesystem="btrfs|ext2|ext3|ext4|xfs|fat32|fat16": |
| 1041 |
If an extra boot partition is required, this attribute |
| 1042 |
specifies which filesystem should be used for it. The |
| 1043 |
type of the selected bootloader might overwrite this |
| 1044 |
setting if there is no alternative possible, though. |
| 1045 |
Only available for the `oem` type. |
| 1046 |
|
| 1047 |
|
| 1048 |
flags="overlay|dmsquash": |
| 1049 |
For the ISO image type, this specifies the live ISO technology and |
| 1050 |
dracut module to use. If set to `overlay`, the kiwi-live dracut |
| 1051 |
module will be used to support a live ISO system based on |
| 1052 |
squashfs+overlayfs. If set to `dmsquash`, the dracut standard |
| 1053 |
dmsquash-live module will be used to support a live ISO |
| 1054 |
system based on the capabilities of the upstream dracut |
| 1055 |
module. |
| 1056 |
|
| 1057 |
format="format_name": |
| 1058 |
For disk image type `oem`, this specifies the format of the virtual disk |
| 1059 |
so that it can run on the desired target virtualization platform. The |
| 1060 |
supported formats_name's are: |
| 1061 |
|
| 1062 |
* `gce`: Google Compute Engine image format. |
| 1063 |
* `ova`: Open Virtualization Format Archive. |
| 1064 |
* `qcow2`: QEMU Copy-On-Write version 2. |
| 1065 |
* `vagrant`: Vagrant box format (tar.gz). |
| 1066 |
* `vmdk`: VMware Virtual Machine Disk. |
| 1067 |
* `vdi`: VirtualBox Disk Image. |
| 1068 |
* `vhd`: Microsoft Virtual Hard Disk. |
| 1069 |
* `vhdx`: Microsoft Virtual Hard Disk version 2. |
| 1070 |
* `vhd-fixed`: Microsoft Virtual Hard Disk with fixed size. |
| 1071 |
* `oci:image_format`: OCI image archive (oci format). |
| 1072 |
* `docker:image_format`: OCI image archive (docker format). |
| 1073 |
|
| 1074 |
The `(oci|docker):image_format` format is a special case that stores the |
| 1075 |
disk image inside of an OCI-compliant container. The disk image is |
| 1076 |
stored in the specified `image_format` in the `disk/` directory |
| 1077 |
of the container. The disk format can be one of the above formats |
| 1078 |
or just `raw` if the disk should be stored as a raw disk inside |
| 1079 |
of the container. Custom naming conventions for the disk image |
| 1080 |
can be applied by using the `bundle_format` attribute. |
| 1081 |
The `derived_from` attribute can be used to specify the source |
| 1082 |
container. The resulting container image will be built by adding |
| 1083 |
the disk image as a new layer on top of the specified reference container. |
| 1084 |
If there is no `derived_from` attribute, the container image will be built |
| 1085 |
from scratch using an empty root directory. This format is particularly |
| 1086 |
useful for building an image which bundles the actual disk image |
| 1087 |
and its runtime requirements into one artifact. |
| 1088 |
|
| 1089 |
formatoptions="string": |
| 1090 |
Specifies additional format options passed on to `qemu-img`. |
| 1091 |
`formatoptions` is a comma-separated list of format-specific |
| 1092 |
options in a `name=value` format, as `qemu-img` expects it. |
| 1093 |
kiwi will take the information and pass it as a parameter to |
| 1094 |
the `-o` option in the `qemu-img` call. |
| 1095 |
Only available for the `oem` type. |
| 1096 |
|
| 1097 |
|
| 1098 |
gpt_hybrid_mbr="true|false": |
| 1099 |
For disk types, create a hybrid GPT/MBR partition table with an |
| 1100 |
'accurate' MBR table that will have no 'bootable' flagged partition. |
| 1101 |
For ISO types, create a hybrid GPT/MBR partition table where the |
| 1102 |
MBR partition table contains a whole-disk 'protective' partition |
| 1103 |
and a second bootable-flagged partition (intended to make the image |
| 1104 |
bootable in both UEFI and BIOS modes on as much hardware as possible). |
| 1105 |
In both cases, it only has an effect if the EFI partition table |
| 1106 |
type is GPT. |
| 1107 |
Only available for the `oem` and `iso` types. |
| 1108 |
|
| 1109 |
|
| 1110 |
hybridpersistent="true|false": |
| 1111 |
For the live ISO type, this triggers the creation of a partition for |
| 1112 |
a COW file to keep data persistent over a reboot. |
| 1113 |
Only available for the `iso` and `pxe` types. |
| 1114 |
|
| 1115 |
|
| 1116 |
hybridpersistent_filesystem="ext4|xfs": |
| 1117 |
For the live ISO type, set the filesystem to use for persistent |
| 1118 |
writing if a hybrid image is used as a disk on, e.g., a USB Stick. |
| 1119 |
By default, the ext4 filesystem is used. |
| 1120 |
Only available for the `iso` and `pxe` types. |
| 1121 |
|
| 1122 |
|
| 1123 |
initrd_system="kiwi|dracut|none": |
| 1124 |
Specify which initrd builder to use; the default is set to `dracut`. |
| 1125 |
If set to `none`, the image is built without an initrd. Depending |
| 1126 |
on the image type, this can lead to a non-bootable system, as it's |
| 1127 |
now a kernel responsibility if the given root device can be |
| 1128 |
mounted or not. |
| 1129 |
Only available for the `oem`, `pxe` and `kis` types. |
| 1130 |
|
| 1131 |
|
| 1132 |
metadata_path="dir_path": |
| 1133 |
Specifies a path to additional metadata required for the selected |
| 1134 |
image type or its tools used to create that image type. |
| 1135 |
|
| 1136 |
.. note:: |
| 1137 |
|
| 1138 |
Currently, this is only effective for the `appx` container image type, |
| 1139 |
where it is **mandatory**. |
| 1140 |
|
| 1141 |
installboot="failsafe-install|harddisk|install": |
| 1142 |
Specifies the bootloader's default boot entry for the initial |
| 1143 |
boot of a {kiwi} install image. |
| 1144 |
|
| 1145 |
.. note:: |
| 1146 |
|
| 1147 |
This value is only evaluated for grub. |
| 1148 |
|
| 1149 |
install_continue_on_timeout="true|false": |
| 1150 |
Specifies the boot timeout handling for the {kiwi} |
| 1151 |
install image. If set to "true", the configured timeout |
| 1152 |
or its default value applies. If set to "false", no |
| 1153 |
timeout applies in the boot menu of the install image. |
| 1154 |
|
| 1155 |
installprovidefailsafe="true|false": |
| 1156 |
Specifies if the bootloader menu should provide a |
| 1157 |
failsafe entry with special kernel parameters or not. |
| 1158 |
Only available for the `oem` type. |
| 1159 |
|
| 1160 |
|
| 1161 |
installiso="true|false" |
| 1162 |
Specifies if an install ISO image should be created. |
| 1163 |
This attribute is only available for the `oem` type. |
| 1164 |
The generated ISO image is a hybrid ISO that can be |
| 1165 |
used as a disk on, e.g., a USB stick or as an ISO. |
| 1166 |
|
| 1167 |
installstick="true|false": |
| 1168 |
Specifies if an install stick image should be created. |
| 1169 |
Only available for the `oem` type. |
| 1170 |
|
| 1171 |
installpxe="true|false": |
| 1172 |
Specifies if a tarball that contains all data for a PXE network |
| 1173 |
installation should be created. This attribute is only available |
| 1174 |
for the `oem` type. |
| 1175 |
|
| 1176 |
mediacheck="true|false": |
| 1177 |
For ISO images, specifies whether the bootloader menu should provide a |
| 1178 |
mediacheck entry to verify ISO integrity or not. It is disabled by default |
| 1179 |
and only available for the x86 arch family. |
| 1180 |
|
| 1181 |
mdraid="mirroring|striping": |
| 1182 |
Set up software RAID in degraded mode with one disk. |
| 1183 |
Thus, only mirroring and striping are possible. |
| 1184 |
Only available for the `oem` type. |
| 1185 |
|
| 1186 |
|
| 1187 |
primary="true|false": |
| 1188 |
Specifies this type to be the primary type. If no type option |
| 1189 |
is given on the commandline, {kiwi} will build this type. |
| 1190 |
|
| 1191 |
ramonly="true|false": |
| 1192 |
For all images that are configured to use the overlay filesystem, |
| 1193 |
this setting forces any COW(Copy-On-Write) action to happen in RAM. |
| 1194 |
Only available for the `oem` type. |
| 1195 |
|
| 1196 |
|
| 1197 |
rootfs_label="string": |
| 1198 |
A label name to set for the root filesystem. By default, `ROOT` is used. |
| 1199 |
Only available for the `oem`, `pxe`, `kis` and `docker` types. |
| 1200 |
|
| 1201 |
|
| 1202 |
volid="string": |
| 1203 |
For the `iso` and `oem` install ISO only, this specifies the |
| 1204 |
volume ID (volume name or label) to be written into the master block. |
| 1205 |
Can be at most 32 characters. |
| 1206 |
|
| 1207 |
application_id="string": |
| 1208 |
For the ISO/(oem install ISO) type only, specifies the Application |
| 1209 |
ID to be written into the master block. There is space for |
| 1210 |
128 characters. |
| 1211 |
|
| 1212 |
vhdfixedtag="GUID_string": |
| 1213 |
For the VHD disk format, this specifies the GUID. |
| 1214 |
Only available for the `oem` type. |
| 1215 |
|
| 1216 |
|
| 1217 |
derived_from="string": |
| 1218 |
For container images, specifies the image URI of the container image. |
| 1219 |
The image created by {kiwi} will use the specified container as the |
| 1220 |
base root to work on. |
| 1221 |
Only available for the `docker`, `oci` and `oem` types. On the `oem` type it |
| 1222 |
may only be combined with a container output format, that is |
| 1223 |
`format="oci:..."` or `format="docker:..."`. |
| 1224 |
|
| 1225 |
|
| 1226 |
delta_root="true|false": |
| 1227 |
For container images and in combination with the `derived_from` |
| 1228 |
attribute. If `delta_root` is set to `true`, {kiwi-ng} creates |
| 1229 |
a container image that only contains the differences compared |
| 1230 |
to the given `derived_from` container. Such a container is, on |
| 1231 |
its own, no longer functional and requires a tool that is able |
| 1232 |
to provision a container instance from the `derived_from` |
| 1233 |
container combined with the `delta_root` application container. |
| 1234 |
Such a tool exists with the |
| 1235 |
`oci-pilot <https://github.com/Elektrobit/oci-pilot>`_ |
| 1236 |
project and allows you to manage applications as containers |
| 1237 |
that feel like native applications on the host system. |
| 1238 |
Only available for the `docker` and `oci` types. |
| 1239 |
|
| 1240 |
|
| 1241 |
ensure_empty_tmpdirs="true|false": |
| 1242 |
For OCI container images, this specifies whether to ensure the `/run` and `/tmp` |
| 1243 |
directories are empty in the container image created by Kiwi. |
| 1244 |
The default is true. |
| 1245 |
Only available for the `docker` and `oci` types. |
| 1246 |
|
| 1247 |
|
| 1248 |
publisher="string": |
| 1249 |
For ISO images, this specifies the publisher name of the ISO. |
| 1250 |
Only available for the `iso` type. |
| 1251 |
|
| 1252 |
|
| 1253 |
eficsmpart_id="number": |
| 1254 |
For OEM images, this specifies the partition number for the EFI CSM |
| 1255 |
(legacy BIOS) partition. For details about the evaluation and impact |
| 1256 |
of custom partition ids, please see: :ref:`custom_partitions`. |
| 1257 |
|
| 1258 |
efipart_id="number": |
| 1259 |
For OEM images, specifies the partition number for the EFI partition. |
| 1260 |
For details about the evaluation and impact of custom partition ids, |
| 1261 |
please see: :ref:`custom_partitions`. |
| 1262 |
|
| 1263 |
rootpart_id="number": |
| 1264 |
For OEM images, this specifies the partition number for the ROOT partition. |
| 1265 |
For details about the evaluation and impact of custom partition ids, |
| 1266 |
please see: :ref:`custom_partitions`. |
| 1267 |
|
| 1268 |
bootpart_id="number": |
| 1269 |
For OEM images, specifies the partition number for the BOOT partition. |
| 1270 |
For details about the evaluation and impact of custom partition ids, |
| 1271 |
please see: :ref:`custom_partitions`. |
| 1272 |
|
| 1273 |
boot="path": |
| 1274 |
Path to a {kiwi} boot image description used to build the initrd. |
| 1275 |
Requires `initrd_system="kiwi"`. A relative path is looked up below |
| 1276 |
:file:`/usr/share/kiwi/custom_boot`. Only available for the `oem` and |
| 1277 |
`pxe` types. |
| 1278 |
|
| 1279 |
bootkernel="name": |
| 1280 |
Name of the kernel profile of the boot image description to use. |
| 1281 |
Passed on as `add-profile` when the boot image is built. |
| 1282 |
|
| 1283 |
bootprofile="name": |
| 1284 |
Name of the profile of the boot image description to use. Passed on as |
| 1285 |
`add-profile` when the boot image is built. Only available for the |
| 1286 |
`oem`, `iso`, `pxe` and `cpio` types. |
| 1287 |
|
| 1288 |
bundle_format="string": |
| 1289 |
Base name pattern used for all target image files by |
| 1290 |
:command:`kiwi-ng result bundle`. See |
| 1291 |
:ref:`image_types` for the list of supported placeholders. |
| 1292 |
|
| 1293 |
disk_start_sector="number": |
| 1294 |
First usable sector of the partition table. The minimum, and the |
| 1295 |
default, is 2048. Only available for the `oem` type. |
| 1296 |
|
| 1297 |
enclave_format="aws-nitro": |
| 1298 |
Target format of the enclave image. `aws-nitro` is currently the only |
| 1299 |
supported value. Only available for the `enclave` type. |
| 1300 |
|
| 1301 |
gcelicense="string": |
| 1302 |
License tag to embed into an image built with `format="gce"`. |
| 1303 |
Only available for the `oem` type. |
| 1304 |
|
| 1305 |
luksOS="sle12": |
| 1306 |
Passes a predefined set of cipher, keysize and hash format options to |
| 1307 |
the :command:`cryptsetup` call, producing a format compatible with the |
| 1308 |
named distribution. Only available for the `oem`, `iso`, `pxe` and |
| 1309 |
`kis` types. |
| 1310 |
|
| 1311 |
luks_pbkdf="pbkdf2|argon2i|argon2id": |
| 1312 |
Key derivation function used by LUKS to derive the encryption key from |
| 1313 |
the password. Only available for the `oem`, `iso`, `pxe` and `kis` |
| 1314 |
types. |
| 1315 |
|
| 1316 |
luks_randomize="true|false": |
| 1317 |
By default all blocks of a LUKS volume are filled with pseudo-random |
| 1318 |
data. Set this to `false` to reduce the image size when shipping an |
| 1319 |
image with a well-known key that is re-encrypted at deployment time. |
| 1320 |
Only available for the `oem`, `iso`, `pxe` and `kis` types. |
| 1321 |
|
| 1322 |
provide_system_files="true|false": |
| 1323 |
Emit a metadata file listing the system files of the image, for later |
| 1324 |
consumption by a derived build. Only available for the `docker` and |
| 1325 |
`oci` types. Use a `<packages type="systemfiles">` section to filter |
| 1326 |
the generated list. |
| 1327 |
|
| 1328 |
require_system_files="true|false": |
| 1329 |
Consume the system file metadata provided by a base image. Only |
| 1330 |
available for the `docker` and `oci` types. |
| 1331 |
|
| 1332 |
wwid_wait_timeout="number": |
| 1333 |
Seconds to wait for a device WWID to appear. Defaults to 3. |
| 1334 |
Only available for the `oem` type. |
| 1335 |
|
| 1336 |
xen_server="true|false": |
| 1337 |
Marks the image as a Xen dom0 (server) rather than a Xen guest. |
| 1338 |
Only available for the `oem` type. See also |
| 1339 |
`check_xen_uniquely_setup_as_server_or_guest`. |
| 1340 |
|
| 1341 |
The following sections show the supported child elements of the `type` |
| 1342 |
element, including references to their usage in a detailed type setup: |
| 1343 |
|
| 1344 |
.. _preferences-type-luksformat: |
| 1345 |
|
| 1346 |
<preferences><type><luksformat> |
| 1347 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1348 |
The `luksformat` element is used to specify additional luks options |
| 1349 |
passed on to the `cryptsetup luksFormat` call. The element requires |
| 1350 |
the attribute `luks` to be set in the `<type>` section referring to |
| 1351 |
`luksformat`. Several custom settings related to the LUKS and LUKS2 |
| 1352 |
format features can be set up. For example, the setup of |
| 1353 |
the `dm_integrity` feature: |
| 1354 |
|
| 1355 |
.. code:: xml |
| 1356 |
|
| 1357 |
<luksformat> |
| 1358 |
<option name="--cipher" value="aes-gcm-random"/> |
| 1359 |
<option name="--integrity" value="aead"/> |
| 1360 |
</luksformat> |
| 1361 |
|
| 1362 |
.. _preferences-type-bootloader: |
| 1363 |
|
| 1364 |
<preferences><type><bootloader> |
| 1365 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1366 |
The `bootloader` element is used to select the bootloader. At the moment, |
| 1367 |
`grub2`, `systemd_boot`, and the combination of zipl |
| 1368 |
plus userspace grub2, `grub2_s390x_emu`, are supported. The special |
| 1369 |
`custom` entry allows you to skip the bootloader configuration and installation |
| 1370 |
and leaves this up to the user, which can be done by using |
| 1371 |
the `editbootinstall` and `editbootconfig` custom scripts. |
| 1372 |
|
| 1373 |
.. note:: |
| 1374 |
|
| 1375 |
Bootloaders provide a very different set of features and only |
| 1376 |
work within their individual implementation priorities. {kiwi} |
| 1377 |
provides an API for bootloaders, but not all API methods can be |
| 1378 |
implemented for all bootloaders due to the fact that some |
| 1379 |
features only exist in one but not in another bootloader. If |
| 1380 |
a bootloader setting is used that is not understood by the |
| 1381 |
selected bootloader, the image build process will fail with |
| 1382 |
an exception message. |
| 1383 |
|
| 1384 |
name="grub2|grub2_s390x_emu|systemd_boot|custom|zipl": |
| 1385 |
Specifies the bootloader to use for this image. |
| 1386 |
|
| 1387 |
.. note:: systemd_boot ESP size |
| 1388 |
|
| 1389 |
The implementation to support systemd-boot reads all |
| 1390 |
data from the ESP (EFI Standard Partition). This also |
| 1391 |
includes the kernel and initrd, which requires the size |
| 1392 |
of the ESP to be configured appropriately. By default, |
| 1393 |
{kiwi} configures the ESP with 20MB. For systemd_boot, |
| 1394 |
this is usually too small and can be changed with the |
| 1395 |
`efipartsize` attribute. Reading boot-relevant files |
| 1396 |
from another filesystem requires providing alternative |
| 1397 |
EFI filesystem drivers, e.g., efifs, and also needs |
| 1398 |
adaptations on the setup of `bootctl`. |
| 1399 |
|
| 1400 |
.. note:: systemd_boot and shim |
| 1401 |
|
| 1402 |
At the moment, the EFI image provided along with systemd-boot |
| 1403 |
is not compatible with the shim-signed loader provided in an |
| 1404 |
extra effort by the distributions. |
| 1405 |
|
| 1406 |
In addition to the mandatory name attribute, the following optional |
| 1407 |
attributes are supported: |
| 1408 |
|
| 1409 |
bls="true|false": |
| 1410 |
Specifies whether to use Bootloader Spec-style configuration if |
| 1411 |
`grub` in the image supports it. It is a no-op if the `blscfg` |
| 1412 |
module is not available. This option is only available for `grub` |
| 1413 |
and defaults to true if not set. |
| 1414 |
|
| 1415 |
output_console="none|console|gfxterm|serial|vga_text|mda_text|morse|spkmodem": |
| 1416 |
Specifies the bootloader output console. The attribute is available for the |
| 1417 |
`grub` bootloader type. Multiple console types can be provided, separated |
| 1418 |
by a space. |
| 1419 |
|
| 1420 |
input_console="none|console|serial|at_keyboard|usb_keyboard": |
| 1421 |
Specifies the bootloader input console. The attribute is available for the |
| 1422 |
`grub` bootloader type. Multiple console types can be provided, separated |
| 1423 |
by a space. If no `input_console` is provided, the value for the |
| 1424 |
`output_console` is used if specified. |
| 1425 |
|
| 1426 |
grub_template="filename": |
| 1427 |
Specifies a custom grub bootloader template file that will be used |
| 1428 |
instead of the one provided with Kiwi. A static bootloader template to |
| 1429 |
create the grub config file is only used in Kiwi if the native method |
| 1430 |
via the grub `mkconfig` toolchain does not work properly. As of today, |
| 1431 |
this is only the case for live and install ISO images. Thus, this |
| 1432 |
setting only affects the oem and iso image types. |
| 1433 |
|
| 1434 |
The template file should contain a `Template string |
| 1435 |
<https://docs.python.org/3.4/library/string.html#template-strings>`_ |
| 1436 |
and can use the following variables: |
| 1437 |
|
| 1438 |
+-----------------------+----------------------------------------------+ |
| 1439 |
| Variable | Description | |
| 1440 |
+=======================+==============================================+ |
| 1441 |
| search_params | parameters needed for grub's `search` | |
| 1442 |
| | command to locate the root volume | |
| 1443 |
+-----------------------+----------------------------------------------+ |
| 1444 |
| default_boot | number of the default menu item to boot | |
| 1445 |
+-----------------------+----------------------------------------------+ |
| 1446 |
| kernel_file | the name of the kernel file | |
| 1447 |
+-----------------------+----------------------------------------------+ |
| 1448 |
| initrd_file | the name of the initial ramdisk file | |
| 1449 |
+-----------------------+----------------------------------------------+ |
| 1450 |
| boot_options | kernel command-line options for booting | |
| 1451 |
| | normally | |
| 1452 |
+-----------------------+----------------------------------------------+ |
| 1453 |
| failsafe_boot_options | kernel command-line options for booting in | |
| 1454 |
| | failsafe mode | |
| 1455 |
+-----------------------+----------------------------------------------+ |
| 1456 |
| gfxmode | the resolution to use for the bootloader; | |
| 1457 |
| | passed to grub's `gfxmode` command | |
| 1458 |
+-----------------------+----------------------------------------------+ |
| 1459 |
| theme | the name of a graphical theme to use | |
| 1460 |
+-----------------------+----------------------------------------------+ |
| 1461 |
| boot_timeout | the boot menu timeout, set by the `timeout` | |
| 1462 |
| | attribute | |
| 1463 |
+-----------------------+----------------------------------------------+ |
| 1464 |
| boot_timeout_style | the boot timeout style, set by the | |
| 1465 |
| | `timeout_style` attribute | |
| 1466 |
+-----------------------+----------------------------------------------+ |
| 1467 |
| serial_line_setup | directives used to initialize the serial | |
| 1468 |
| | port, set by the `serial_line` attribute | |
| 1469 |
+-----------------------+----------------------------------------------+ |
| 1470 |
| title | a title for the image: this will be the | |
| 1471 |
| | `<image>` tag's `displayname` attribute or | |
| 1472 |
| | its `name` attribute if `displayname` is not | |
| 1473 |
| | set; see: :ref:`sec.image` | |
| 1474 |
+-----------------------+----------------------------------------------+ |
| 1475 |
| bootpath | the bootloader lookup path | |
| 1476 |
+-----------------------+----------------------------------------------+ |
| 1477 |
| boot_directory_name | the name of the grub directory | |
| 1478 |
+-----------------------+----------------------------------------------+ |
| 1479 |
| efi_image_name | architecture-specific EFI boot binary name | |
| 1480 |
+-----------------------+----------------------------------------------+ |
| 1481 |
| terminal_setup | the bootloader console mode, set by the | |
| 1482 |
| | `console` attribute | |
| 1483 |
+-----------------------+----------------------------------------------+ |
| 1484 |
|
| 1485 |
serial_line="string": |
| 1486 |
Specifies the bootloader serial line setup. The setup is effective if |
| 1487 |
the bootloader console is set to use the serial line. The attribute is |
| 1488 |
available for the grub bootloader only. |
| 1489 |
|
| 1490 |
video_mode="string": |
| 1491 |
Specifies the video mode to use for the bootloader. The attribute is |
| 1492 |
available for the grub bootloader only and is passed to grub's `gfxmode` |
| 1493 |
command. For details on the supported video modes, please see the grub |
| 1494 |
manual at https://www.gnu.org/software/grub/manual/grub/html_node/gfxmode.html. |
| 1495 |
|
| 1496 |
timeout="number": |
| 1497 |
Specifies the boot timeout in seconds prior to launching the default |
| 1498 |
boot option. By default, the timeout is set to 10 seconds. It makes |
| 1499 |
sense to set this value to `0` for images intended to be started |
| 1500 |
non-interactively (e.g., virtual machines). |
| 1501 |
|
| 1502 |
timeout_style="countdown|hidden|menu": |
| 1503 |
Specifies the boot timeout style to control the way in which the timeout |
| 1504 |
interacts with displaying the menu. If set, the display of the |
| 1505 |
bootloader menu is delayed after the timeout has expired. In countdown mode, |
| 1506 |
an indication of the remaining time is displayed. The attribute is |
| 1507 |
available for the grub loader only. |
| 1508 |
|
| 1509 |
targettype="CDL|FBA|SCSI|GPT": |
| 1510 |
Specifies the device type of the disk zipl should boot. |
| 1511 |
On zFCP and/or KVM devices, use `SCSI` or `GPT`; on DASD devices, |
| 1512 |
use `CDL`; on emulated DASD devices, use `FBA`. |
| 1513 |
The attribute is available for the `grub2_s390x_emu` and `zipl` |
| 1514 |
loaders only. |
| 1515 |
|
| 1516 |
<preferences><type><bootloader><securelinux> |
| 1517 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1518 |
Used to specify data required to set up secure Linux execution. Secure |
| 1519 |
Linux execution reads the kernel, initrd, and boot parameters from an |
| 1520 |
encrypted data blob and couples the image to the machine it gets |
| 1521 |
executed on. Typically, the private key is protected in hardware on |
| 1522 |
the machine itself. {kiwi} supports secure execution for the IBM secure |
| 1523 |
Linux target on the s390 platform, along with the bootloaders |
| 1524 |
`zipl` and `grub2_s390x_emu`. |
| 1525 |
|
| 1526 |
.. code:: xml |
| 1527 |
|
| 1528 |
<securelinux hkd_ca_cert="some-ca.crt" hkd_sign_cert="some-signing.crt"> |
| 1529 |
<hkd_cert name="some1-host.crt"/> |
| 1530 |
<hkd_cert name="some2-host.crt"/> |
| 1531 |
<hkd_revocation_list name="some1-revocation.crl"/> |
| 1532 |
<hkd_revocation_list name="some2-revocation.crl"/> |
| 1533 |
</securelinux> |
| 1534 |
|
| 1535 |
The `securelinux` element itself can be specified multiple times, for example to |
| 1536 |
couple one image to several machines that use different signing certificates. |
| 1537 |
|
| 1538 |
hkd_ca_cert: |
| 1539 |
Mandatory attribute providing the `Common Authority` certificate (signed by |
| 1540 |
the root CA) that is used to establish a chain of trust for the verification |
| 1541 |
of the `Host Key Document`. |
| 1542 |
|
| 1543 |
hkd_sign_cert: |
| 1544 |
Mandatory attribute providing the `Signing` certificate that is used to |
| 1545 |
establish a chain of trust for the verification of the `Host Key Document`. |
| 1546 |
|
| 1547 |
hkd_cert: |
| 1548 |
Child element, required at least once. The file specified in the `name` |
| 1549 |
attribute defines the `Host Key Document` and tightly couples the image to the |
| 1550 |
host matching the document. Can be specified multiple times. |
| 1551 |
|
| 1552 |
hkd_revocation_list: |
| 1553 |
Optional child element, providing in its `name` attribute the revocation list |
| 1554 |
to check on the use of expired certificates in the chain of trust. Can be |
| 1555 |
specified multiple times. |
| 1556 |
|
| 1557 |
<preferences><type><bootloader><bootloadersettings> |
| 1558 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1559 |
Used to specify custom arguments for the tools called to set up |
| 1560 |
the bootloader: |
| 1561 |
* secure boot via `<shimoption>`, e.g., `shiminstall` |
| 1562 |
* installation of the bootloader via `<installoption>`, e.g., `grub-install` |
| 1563 |
* configuration of the bootloader via `<configoption>`, e.g., `grub-mkconfig` |
| 1564 |
* setup of bootloader environment variables via `<environment>`, e.g., `grub2-editenv` |
| 1565 |
|
| 1566 |
.. code:: xml |
| 1567 |
|
| 1568 |
<bootloadersettings> |
| 1569 |
<shimoption name="--suse-enable-tpm"/> |
| 1570 |
<shimoption name="--bootloader-id" value="some-id"/> |
| 1571 |
<installoption name="--suse-enable-tpm"/> |
| 1572 |
<configoption name="--debug"/> |
| 1573 |
<environment> |
| 1574 |
<env name="menu_auto_hide" value="1"/> |
| 1575 |
</environment> |
| 1576 |
</bootloadersettings> |
| 1577 |
|
| 1578 |
.. note:: |
| 1579 |
|
| 1580 |
{kiwi-ng} does not judge the given parameters, and if the provided |
| 1581 |
data is effectively used depends on the individual bootloader |
| 1582 |
implementation. |
| 1583 |
|
| 1584 |
<preferences><type><containerconfig> |
| 1585 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1586 |
Used to describe the container configuration metadata in docker or wsl |
| 1587 |
image types. For details, see: :ref:`building_container_build` and: |
| 1588 |
:ref:`building_wsl_build`. |
| 1589 |
|
| 1590 |
<preferences><type><vagrantconfig> |
| 1591 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1592 |
Used to describe vagrant configuration metadata in a disk image |
| 1593 |
that is being used as a vagrant box. For details, see: :ref:`setup_vagrant`. |
| 1594 |
|
| 1595 |
<preferences><type><systemdisk> |
| 1596 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1597 |
Used to describe the volumes of the disk area, which |
| 1598 |
contains the root filesystem. Volumes are either a feature |
| 1599 |
of the used filesystem, or LVM is used for this purpose. |
| 1600 |
For details, see: :ref:`custom_volumes`. |
| 1601 |
|
| 1602 |
.. note:: |
| 1603 |
|
| 1604 |
When both `<partitions>` and `<systemdisk>` are used, `<partitions>` |
| 1605 |
are evaluated first, and mount points defined in `<partitions>` cannot |
| 1606 |
be redefined as `<systemdisk>` volumes. The two types define a |
| 1607 |
complete disk setup, so there cannot be any overlapping volumes |
| 1608 |
or mount points. As a result, whatever is written in `<partitions>` |
| 1609 |
cannot be expressed in the same way in `<volumes>`. |
| 1610 |
|
| 1611 |
<preferences><type><partitions> |
| 1612 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1613 |
Used to describe the geometry of the disk on the level of the |
| 1614 |
partition table. For details, see: :ref:`custom_partitions`. |
| 1615 |
|
| 1616 |
<preferences><type><oemconfig> |
| 1617 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1618 |
Used to customize the deployment process in an OEM disk image. |
| 1619 |
For details, see: :ref:`oem_customize`. |
| 1620 |
|
| 1621 |
<preferences><type><size> |
| 1622 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1623 |
Used to customize the size of the resulting disk image in an |
| 1624 |
OEM image. For details, see: :ref:`disk-the-size-element`. |
| 1625 |
|
| 1626 |
<preferences><type><machine> |
| 1627 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1628 |
Used to customize the virtual machine configuration, which describes |
| 1629 |
the components of an emulated hardware. |
| 1630 |
For details, see: :ref:`disk-the-machine-element`. |
| 1631 |
|
| 1632 |
<preferences><type><installmedia> |
| 1633 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1634 |
Used to customize the installation media images created for OEM images |
| 1635 |
deployment. |
| 1636 |
For details, see: :ref:`installmedia_customize`. |
| 1637 |
|
| 1638 |
<preferences><type><initrd> |
| 1639 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 1640 |
Used to specify custom arguments for the initrd tooling, e.g., dracut. |
| 1641 |
|
| 1642 |
.. code:: xml |
| 1643 |
|
| 1644 |
<initrd action="setup"> |
| 1645 |
<dracut uefi="true"/> |
| 1646 |
</initrd> |
| 1647 |
<initrd action="add|omit"> |
| 1648 |
<dracut module="some_a"/> |
| 1649 |
<dracut module="some_b"/> |
| 1650 |
<dracut driver="driver_name"/> |
| 1651 |
</initrd> |
| 1652 |
|
| 1653 |
dracut.uefi.true: |
| 1654 |
As part of the `setup` action, this enables creating a UKI EFI binary. |
| 1655 |
|
| 1656 |
dracut.module.NAME: |
| 1657 |
As part of the `add` or `omit` action, this adds or omits the given |
| 1658 |
module name. The element can be specified multiple times. |
| 1659 |
|
| 1660 |
dracut.driver.NAME: |
| 1661 |
As part of the `add` or `omit` action, this adds or omits the given |
| 1662 |
kernel driver. The element can be specified multiple times and |
| 1663 |
accepts kernel driver names without the `.ko` extension. |
| 1664 |
|
| 1665 |
.. _sec.registry: |
| 1666 |
|
| 1667 |
<containers> |
| 1668 |
------------ |
| 1669 |
|
| 1670 |
Set up containers to fetch from a registry assigned to one |
| 1671 |
of the supported container backends. |
| 1672 |
|
| 1673 |
.. code:: xml |
| 1674 |
|
| 1675 |
<containers source="registry.opensuse.org" backend="podman"> |
| 1676 |
<container name="some"/> |
| 1677 |
</containers> |
| 1678 |
|
| 1679 |
<containers source="registry.opensuse.org" backend="container-snap"> |
| 1680 |
<container name="opensuse/bootable" tag="slowroll"/> |
| 1681 |
</containers> |
| 1682 |
|
| 1683 |
The optional containers element specifies the location of one or |
| 1684 |
more containers on a registry `source` server. {kiwi} will take |
| 1685 |
this information and fetch the containers as OCI archives to |
| 1686 |
the image. On first boot, these container archives will be loaded |
| 1687 |
into the local container backend store for the selected |
| 1688 |
backend, and the archive files will be deleted. |
| 1689 |
|
| 1690 |
Supported `backend` values are `docker`, `podman`, and |
| 1691 |
`container-snap`. The `backend` attribute is mandatory and specifies |
| 1692 |
for which container backend the image should be available in the |
| 1693 |
system. The `containers` element has the following optional |
| 1694 |
attributes: |
| 1695 |
|
| 1696 |
arch="arch" |
| 1697 |
The containers section can be configured to apply only for a certain |
| 1698 |
architecture. In this case, specify the `arch` attribute with a |
| 1699 |
value as it is reported by :command:`uname -m`. |
| 1700 |
|
| 1701 |
profiles="name[,name]" |
| 1702 |
A list of profiles to which this containers selection applies |
| 1703 |
(see :ref:`image-profiles`). |
| 1704 |
|
| 1705 |
<containers><container> |
| 1706 |
----------------------- |
| 1707 |
|
| 1708 |
Details about the container. |
| 1709 |
|
| 1710 |
.. code:: xml |
| 1711 |
|
| 1712 |
<containers source="registry.opensuse.org" backend="podman"> |
| 1713 |
<container name="some"/> |
| 1714 |
</containers> |
| 1715 |
|
| 1716 |
The `name` attributes are mandatory and specify |
| 1717 |
the name of the container as it exists in the registry. |
| 1718 |
The `container` element has the following optional attributes: |
| 1719 |
|
| 1720 |
path="some/path" |
| 1721 |
The path to the container in the registry. If not specified, |
| 1722 |
the value defaults to `/`. |
| 1723 |
|
| 1724 |
fetch_only="true|false" |
| 1725 |
If set to `true`, kiwi will only fetch the container but will not |
| 1726 |
set up the systemd unit for loading the container into |
| 1727 |
the local registry. In this mode, the container archive file stays |
| 1728 |
in the system and can be handled in a custom way. By default, |
| 1729 |
`fetch_only` is set to `false`. |
| 1730 |
|
| 1731 |
tag="tagname" |
| 1732 |
Specifies the container tag to fetch. If not set, the tag name |
| 1733 |
defaults to `latest`. |
| 1734 |
|
| 1735 |
arch="arch" |
| 1736 |
The container section can be configured to apply only for a certain |
| 1737 |
architecture. In this case, specify the `arch` attribute with a |
| 1738 |
value as it is reported by :command:`uname -m`. |
| 1739 |
|
| 1740 |
.. _sec.repository: |
| 1741 |
|
| 1742 |
<repository> |
| 1743 |
------------- |
| 1744 |
|
| 1745 |
Set up software sources for the image. |
| 1746 |
|
| 1747 |
.. code:: xml |
| 1748 |
|
| 1749 |
<repository arch="arch"> |
| 1750 |
<source path="uri"/> |
| 1751 |
</repository> |
| 1752 |
|
| 1753 |
The repository element specifies the location and type of a |
| 1754 |
repository to be used by the package manager as a package installation |
| 1755 |
source. It is optional and may be provided multiple times, but at least one |
| 1756 |
repository is required for {kiwi} to be able to install software. |
| 1757 |
{kiwi} supports apk, apt, dnf4, dnf5, microdnf, pacman, and zypper as |
| 1758 |
package managers, specified via the packagemanager element. |
| 1759 |
The repository element has the following optional attributes: |
| 1760 |
|
| 1761 |
alias="name" |
| 1762 |
Specifies an alternative name for the configured repository. If the |
| 1763 |
attribute is not specified, {kiwi} will generate a random alias name |
| 1764 |
for the repository. The specified name must match the pattern: |
| 1765 |
`[a-zA-Z0-9_\-\.]+`. |
| 1766 |
|
| 1767 |
type="apk|apt-deb|apt-rpm|deb-dir|mirrors|rpm-md" |
| 1768 |
Specifies the repository metadata format. If not set, {kiwi} derives a |
| 1769 |
suitable default from the configured package manager. |
| 1770 |
|
| 1771 |
arch="arch_name[,arch_name]" |
| 1772 |
Use this repository only when building on one of the listed host |
| 1773 |
architectures. |
| 1774 |
|
| 1775 |
profiles="profile_a,profile_b" |
| 1776 |
Use this repository only when one of the listed build profiles is active. |
| 1777 |
|
| 1778 |
architectures="arch_name[,arch_name]" |
| 1779 |
Used for `apt-deb` repositories only. Declares which architectures this |
| 1780 |
repository provides packages for. |
| 1781 |
|
| 1782 |
components="name" |
| 1783 |
Used for Debian (apt) based repositories only. Specifies the |
| 1784 |
component name that should be used from the repository. By default, |
| 1785 |
the `main` component is used. |
| 1786 |
|
| 1787 |
distribution="name" |
| 1788 |
Used for Debian (apt) based repositories only. Specifies the |
| 1789 |
distribution name used in the repository data structure. |
| 1790 |
|
| 1791 |
imageonly="true|false" |
| 1792 |
Specifies whether or not this repository should be configured in |
| 1793 |
the resulting image without using it at build time. By default, |
| 1794 |
the value is set to false. This attribute is mutually exclusive with |
| 1795 |
`imageinclude`. |
| 1796 |
|
| 1797 |
repository_gpgcheck="true|false" |
| 1798 |
Specifies whether or not this specific repository values the result |
| 1799 |
of the repository signature validation. If not set, the default is |
| 1800 |
`false`. If set, the relevant key information needs to be provided |
| 1801 |
on the {kiwi} commandline using the `--signing-key` option or via |
| 1802 |
the `<signing>` element as part of the `<repository><source>` |
| 1803 |
setting in the image description. Some distributions provides the |
| 1804 |
signing keys as part of the `distribution-gpg-keys` package. In that case, |
| 1805 |
the keys can be included in the image by specifying a repository like |
| 1806 |
the following: |
| 1807 |
|
| 1808 |
.. code:: xml |
| 1809 |
|
| 1810 |
<repository type="rpm-md" alias="baseos" sourcetype="metalink"> |
| 1811 |
<source path="https://mirrors.fedoraproject.org/metalink?repo=eln-baseos-1&arch=$basearch"> |
| 1812 |
<signing key="file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-rawhide-primary"/> |
| 1813 |
</source> |
| 1814 |
</repository> |
| 1815 |
|
| 1816 |
Debian based distributions, on the other hand, usually provide the keys |
| 1817 |
at https://ftp-master.debian.org/keys.html. Fetch the relevant key for |
| 1818 |
the image target distribution from there and use them in the same way as |
| 1819 |
described above. |
| 1820 |
|
| 1821 |
package_gpgcheck="true|false" |
| 1822 |
Specify whether or not this specific repository values the result |
| 1823 |
of the package signature validation for each package taken from |
| 1824 |
this repository. If not set, the default value is `false`. |
| 1825 |
If set, the same key information requirements as for the |
| 1826 |
`repository_gpgcheck` attribute apply. |
| 1827 |
|
| 1828 |
customize="/path/to/custom_script" |
| 1829 |
A custom script hook that is invoked with the repo file as a parameter |
| 1830 |
for each file created by {kiwi}. |
| 1831 |
|
| 1832 |
.. note:: |
| 1833 |
|
| 1834 |
If the script is provided as a relative path, it will |
| 1835 |
be searched in the image description directory. |
| 1836 |
|
| 1837 |
imageinclude="true|false" |
| 1838 |
Specifies whether the given repository should be configured as a |
| 1839 |
repository in the image or not. The default behavior is that |
| 1840 |
repositories used to build an image are not configured as a |
| 1841 |
repository inside the image. This feature allows you to change the |
| 1842 |
behavior by setting the value to true. |
| 1843 |
|
| 1844 |
.. note:: Scope of repository uri's |
| 1845 |
|
| 1846 |
The repository is configured in the image according to the source |
| 1847 |
path as specified with the `path` attribute of the source element. |
| 1848 |
Therefore, if the path is not a fully qualified URL, you may need |
| 1849 |
to adjust the repository file in the image to accommodate the |
| 1850 |
expected location. It is recommended that you use the alias |
| 1851 |
attribute in combination with the `imageinclude` attribute to |
| 1852 |
avoid having unpredictable random names assigned to the |
| 1853 |
repository you wish to include in the image. |
| 1854 |
|
| 1855 |
password="string" |
| 1856 |
Specifies a password for the given repository. The password attribute |
| 1857 |
must be used in combination with the username attribute. Dependent on |
| 1858 |
the repository location, this information may not be used. |
| 1859 |
|
| 1860 |
username="name" |
| 1861 |
Specifies a user name for the given repository. The username |
| 1862 |
attribute must be used in combination with the password attribute. |
| 1863 |
Dependent on the repository location, this information may not be |
| 1864 |
used. |
| 1865 |
|
| 1866 |
priority="number" |
| 1867 |
Specifies the repository priority for this given repository. Priority |
| 1868 |
values are treated differently by different package managers. |
| 1869 |
Repository priorities allow the package management system to |
| 1870 |
disambiguate packages that may be contained in more than one of the |
| 1871 |
configured repositories. The zypper package manager, for example, |
| 1872 |
prefers packages from a repository with a *lower* priority over |
| 1873 |
packages from a repository with higher priority values. |
| 1874 |
If the attribute is not set, {kiwi} writes no priority into the generated |
| 1875 |
repository configuration, so the package manager's own default applies. |
| 1876 |
For other package managers, please refer to the individual documentation |
| 1877 |
about repository priorities. |
| 1878 |
|
| 1879 |
sourcetype="baseurl|metalink|mirrorlist" |
| 1880 |
Specifies the source type of the repository path. Depending on whether the |
| 1881 |
source path is a simple URL or a pointer to a metadata file or mirror |
| 1882 |
list, the configured package manager needs to be set up appropriately. |
| 1883 |
By default, the source is expected to be a simple repository baseurl. |
| 1884 |
|
| 1885 |
<repository><source> |
| 1886 |
~~~~~~~~~~~~~~~~~~~~ |
| 1887 |
The location of a repository is specified by the path attribute of the |
| 1888 |
mandatory source child element: |
| 1889 |
|
| 1890 |
.. code:: xml |
| 1891 |
|
| 1892 |
<repository alias="kiwi"> |
| 1893 |
<source path="{exc_kiwi_repo}"/> |
| 1894 |
</repository> |
| 1895 |
|
| 1896 |
The location specification may include |
| 1897 |
the `%arch` macro, which will expand to the architecture of the image |
| 1898 |
building host. The value for the path attribute may begin with any of |
| 1899 |
the following location indicators: |
| 1900 |
|
| 1901 |
* ``file:///local/path/to/file`` |
| 1902 |
An absolute path to a file accessible through the local filesystem. |
| 1903 |
|
| 1904 |
* ``ftp://<ftp://>`` |
| 1905 |
A ftp-protocol-based network location. |
| 1906 |
|
| 1907 |
* ``http://<http://>`` |
| 1908 |
A http-protocol-based network location. |
| 1909 |
|
| 1910 |
* ``https://<https://>`` |
| 1911 |
A https-protocol-based network location. |
| 1912 |
|
| 1913 |
.. note:: https repositories |
| 1914 |
|
| 1915 |
When specifying a https location for a repository, it is generally |
| 1916 |
necessary to include the openssl certificates and a cracklib word |
| 1917 |
dictionary as package entries in the bootstrap section of the |
| 1918 |
image configuration. The names of the packages to include are |
| 1919 |
individual to the used distribution. On SUSE systems, as one example, |
| 1920 |
this would be `openssl-certs` and `cracklib-dict-full`. |
| 1921 |
|
| 1922 |
* ``obs://Open:Build:Service:Project:Name`` |
| 1923 |
A reference to a project in the Open Build Service (OBS). {kiwi} |
| 1924 |
translates the given project path into a remote URL at which |
| 1925 |
the given project hosts the packages. |
| 1926 |
|
| 1927 |
* ``obsrepositories:/`` |
| 1928 |
A placeholder for the Open Build Service (OBS) to indicate that all |
| 1929 |
repositories are taken from the project configuration in OBS. |
| 1930 |
|
| 1931 |
A repository `<source>` element can optionally contain one or more |
| 1932 |
signing keys for the packages from this repository, as shown in the |
| 1933 |
following example: |
| 1934 |
|
| 1935 |
.. code:: xml |
| 1936 |
|
| 1937 |
<repository alias="kiwi"> |
| 1938 |
<source path="{exc_kiwi_repo}"> |
| 1939 |
<signing key="file:///path/to/sign_key_a"/> |
| 1940 |
<signing key="file:///path/to/sign_key_b"/> |
| 1941 |
</source> |
| 1942 |
</repository> |
| 1943 |
|
| 1944 |
All signing keys from all repositories will be collected and |
| 1945 |
incorporated into the keyring as used by the selected package |
| 1946 |
manager. |
| 1947 |
|
| 1948 |
.. _sec.packages: |
| 1949 |
|
| 1950 |
<packages> |
| 1951 |
----------- |
| 1952 |
|
| 1953 |
Set up software components to be installed in the image. |
| 1954 |
|
| 1955 |
.. code:: xml |
| 1956 |
|
| 1957 |
<packages type="type"/> |
| 1958 |
|
| 1959 |
The packages element specifies the setup of a packages group for the given |
| 1960 |
type. It is optional and may be provided multiple times, but in practice at |
| 1961 |
least a `bootstrap` group is required to produce a usable appliance. The value |
| 1962 |
of the type attribute specifies at which state in the build process the packages |
| 1963 |
group is handled. |
| 1964 |
The attribute accepts the following set of values: |
| 1965 |
|
| 1966 |
type="bootstrap" |
| 1967 |
Bootstrap packages, a list of packages to be installed first into |
| 1968 |
a new (empty) root tree. The packages list the required components |
| 1969 |
to support a chroot environment from which further software |
| 1970 |
components can be installed. |
| 1971 |
|
| 1972 |
type="image" |
| 1973 |
Image packages, a list of packages to be installed as part of a chroot |
| 1974 |
operation inside the new root tree. |
| 1975 |
|
| 1976 |
type="uninstall|delete" |
| 1977 |
Packages to be uninstalled or deleted. For further details, |
| 1978 |
see :ref:`uninstall-system-packages`. |
| 1979 |
|
| 1980 |
type="docker|iso|kis|oci|oem|pxe" |
| 1981 |
Packages to be installed only when the named image type is being built. |
| 1982 |
For example, with `type="iso"` the packages in this group are installed |
| 1983 |
only if the ISO image type is built. Note that these six are the only |
| 1984 |
image type names accepted here. Other `<type image="...">` values such as |
| 1985 |
`appx`, `wsl`, `enclave`, `tbz`, `cpio` and the plain filesystem types have |
| 1986 |
no corresponding packages group, use `type="image"` for those. |
| 1987 |
|
| 1988 |
type="systemfiles" |
| 1989 |
Used together with the `provide_system_files` and `require_system_files` |
| 1990 |
type attributes. The group typically holds `<ignore>` entries naming |
| 1991 |
packages to filter out of the generated system file list. |
| 1992 |
|
| 1993 |
|
| 1994 |
In addition to `type`, the `packages` element accepts the following optional |
| 1995 |
attributes: |
| 1996 |
|
| 1997 |
profiles="profile_a,profile_b" |
| 1998 |
Use this packages group only when one of the listed build profiles is active. |
| 1999 |
|
| 2000 |
patternType="onlyRequired|plusRecommended" |
| 2001 |
Controls how `namedCollection` entries are resolved. |
| 2002 |
|
| 2003 |
bootstrap_package="package_name" |
| 2004 |
For use with the `apt` package manager only, and only on a |
| 2005 |
`type="bootstrap"` group. Specifies the name of a bootstrap package that |
| 2006 |
provides a bootstrap tarball in |
| 2007 |
:file:`/var/lib/bootstrap/PACKAGE_NAME.ARCH.tar.xz`. The tarball is |
| 2008 |
unpacked and used as the bootstrap rootfs to begin with, providing an |
| 2009 |
alternative bootstrap method. For further details, see |
| 2010 |
:ref:`debianbootstrap_alternative`. |
| 2011 |
|
| 2012 |
The packages element may contain any number of the following child elements, |
| 2013 |
which provide specific configuration information for the specified packages |
| 2014 |
group: |
| 2015 |
|
| 2016 |
<packages><package> |
| 2017 |
~~~~~~~~~~~~~~~~~~~ |
| 2018 |
.. code:: xml |
| 2019 |
|
| 2020 |
<packages type="image"/> |
| 2021 |
<package name="name" arch="arch"/> |
| 2022 |
</packages> |
| 2023 |
|
| 2024 |
The package element installs the given package name. The optional |
| 2025 |
`arch` attribute can be used to limit the installation of the package |
| 2026 |
to the host architecture from which {kiwi} is called. The `arch` |
| 2027 |
attribute is also available in all of the following elements. |
| 2028 |
|
| 2029 |
Two further optional attributes control the {kiwi} initrd: |
| 2030 |
|
| 2031 |
bootinclude="true|false" |
| 2032 |
Additionally install this package into the {kiwi} initrd. |
| 2033 |
|
| 2034 |
bootdelete="true|false" |
| 2035 |
Remove this package from the {kiwi} initrd again. Only evaluated in |
| 2036 |
combination with `bootinclude`. |
| 2037 |
|
| 2038 |
<packages><namedCollection> |
| 2039 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 2040 |
.. code:: xml |
| 2041 |
|
| 2042 |
<packages type="image" patternType="onlyRequired"> |
| 2043 |
<namedCollection name="base"/> |
| 2044 |
</packages> |
| 2045 |
|
| 2046 |
The `namedCollection` element is used to install a number of packages |
| 2047 |
grouped together under a name. This is a feature of the individual |
| 2048 |
distribution and is used in the implementation of the {kiwi} package |
| 2049 |
manager backend. At the moment, collections are only supported for |
| 2050 |
SUSE- and Red Hat-based distributions. The optional `patternType` attribute |
| 2051 |
is used to control the behavior of the dependency resolution of |
| 2052 |
the package collection. `onlyRequired` installs only the collection |
| 2053 |
and its required packages. `plusRecommended` installs the collection, |
| 2054 |
any of its required packages, and any recommended packages. |
| 2055 |
|
| 2056 |
.. note:: Collections on SUSE |
| 2057 |
|
| 2058 |
On SUSE-based distributions, collections are called `patterns` and are |
| 2059 |
just simple packages. To get the names of the patterns such that |
| 2060 |
they can be used in a namedCollection type, use the following command: |
| 2061 |
`$ zypper patterns`. If for some reason the collection name cannot |
| 2062 |
be used, it is also possible to add the name of the package that |
| 2063 |
provides the collection as part of a `package` element. To get the |
| 2064 |
names of the pattern packages, type the following command: |
| 2065 |
`$ zypper search patterns`. By convention, all packages that start |
| 2066 |
with the name "patterns-" represent a pattern package. |
| 2067 |
|
| 2068 |
.. note:: Collections on Red Hat |
| 2069 |
|
| 2070 |
On Red Hat-based distributions, collections are called `groups` and are |
| 2071 |
extra metadata. To get the names of these groups, type the following |
| 2072 |
command: `$ dnf group list -v`. Please note that since {kiwi} v9.23.39, |
| 2073 |
group IDs are allowed only, e.g.: |
| 2074 |
`<namedCollection name="minimal-environment"/>`. |
| 2075 |
|
| 2076 |
<packages><collectionModule> |
| 2077 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 2078 |
.. code:: xml |
| 2079 |
|
| 2080 |
<packages type="bootstrap"> |
| 2081 |
<collectionModule name="module" stream="stream" enable="true|false"/> |
| 2082 |
</packages> |
| 2083 |
|
| 2084 |
In CentOS Stream >= 8 and Red Hat Enterprise Linux >= 8, there are |
| 2085 |
Application Streams that are offered in the form of modules |
| 2086 |
(using Fedora Modularity technology). To build images that use |
| 2087 |
this content, {kiwi} offers to enable/disable modules when using |
| 2088 |
the `dnf` or `microdnf` package manager backend. Modules are set up |
| 2089 |
prior to the bootstrap phase, and their setup persists as part of the |
| 2090 |
image. |
| 2091 |
|
| 2092 |
There are the following constraints when adding `collectionModule` |
| 2093 |
elements: |
| 2094 |
|
| 2095 |
* `collectionModule` elements can only be specified as part of the |
| 2096 |
`<packages type="bootstrap">` section. This is because the setup of |
| 2097 |
modules must be done once and as early as possible in the process |
| 2098 |
of installing the image root tree. |
| 2099 |
|
| 2100 |
* Disabling a module can only be done as a whole, and therefore, the |
| 2101 |
`stream` attribute is not allowed for disabling modules. For |
| 2102 |
enabling modules, the `stream` attribute is optional. |
| 2103 |
|
| 2104 |
* The `enable` attribute is mandatory because it should be an explicit |
| 2105 |
setting if a module is effectively used or not. |
| 2106 |
|
| 2107 |
<packages><file> |
| 2108 |
~~~~~~~~~~~~~~~~~~~ |
| 2109 |
.. code:: xml |
| 2110 |
|
| 2111 |
<packages type="image"/> |
| 2112 |
<file name="name"/> |
| 2113 |
</packages> |
| 2114 |
|
| 2115 |
The `file` element takes the `name` attribute and looks up the |
| 2116 |
given name as a file on the system. If specified as a relative path, {kiwi} |
| 2117 |
looks up the name in the image description directory. The file |
| 2118 |
is installed using the `rsync` program. The file element has the |
| 2119 |
following optional attributes: |
| 2120 |
|
| 2121 |
owner="user:group" |
| 2122 |
The `owner` attribute can be specified to make the file |
| 2123 |
belong to the specified owner and group. The ownership of |
| 2124 |
the original file is meaningless in this case. The provided |
| 2125 |
value is passed along to the `chown` program. |
| 2126 |
|
| 2127 |
permissions="perms" |
| 2128 |
The `permissions` attribute can be specified to store the file |
| 2129 |
with the provided permission. The permission bits of the original |
| 2130 |
file are meaningless in this case. The provided value is passed |
| 2131 |
along to the `chmod` program. |
| 2132 |
|
| 2133 |
target="some/path" |
| 2134 |
The `target` attribute can be used to specify a target path to |
| 2135 |
install the file to the specified directory and name. Eventually, |
| 2136 |
missing parent directories will be created. |
| 2137 |
|
| 2138 |
<packages><archive> |
| 2139 |
~~~~~~~~~~~~~~~~~~~ |
| 2140 |
.. code:: xml |
| 2141 |
|
| 2142 |
<packages type="image"/> |
| 2143 |
<archive name="name" target_dir="some/path"/> |
| 2144 |
</packages> |
| 2145 |
|
| 2146 |
The `archive` element takes the `name` attribute and looks up the |
| 2147 |
given name as a file on the system. If specified as a relative path, {kiwi} |
| 2148 |
looks up the name in the image description directory. The archive |
| 2149 |
is installed using the `tar` program. Thus, the file name is |
| 2150 |
expected to be a tar archive. The compression of the archive is |
| 2151 |
detected automatically by the tar program. The optional `target_dir` |
| 2152 |
attribute can be used to specify a target directory to unpack the |
| 2153 |
archive inside the image root tree. The optional `bootinclude` attribute |
| 2154 |
additionally unpacks the archive into the {kiwi} initrd. |
| 2155 |
|
| 2156 |
<packages><ignore> |
| 2157 |
~~~~~~~~~~~~~~~~~~ |
| 2158 |
.. code:: xml |
| 2159 |
|
| 2160 |
<packages type="image"/> |
| 2161 |
<ignore name="name"/> |
| 2162 |
</packages> |
| 2163 |
|
| 2164 |
The `ignore` element instructs the used package manager to ignore the |
| 2165 |
given package name at installation time. Please note whether or not |
| 2166 |
the package can be ignored is up to the package manager. Packages |
| 2167 |
that are hard-required by other packages in the install procedure |
| 2168 |
cannot be ignored, and the package manager will simply ignore the |
| 2169 |
request. |
| 2170 |
|
| 2171 |
<packages><product> |
| 2172 |
~~~~~~~~~~~~~~~~~~~ |
| 2173 |
.. code:: xml |
| 2174 |
|
| 2175 |
<packages type="image"> |
| 2176 |
<product name="name"/> |
| 2177 |
</packages> |
| 2178 |
|
| 2179 |
The `product` element instructs the used package manager to install |
| 2180 |
the given product. What the installation of a product means is up to |
| 2181 |
the package manager and is also distribution-specific. This feature |
| 2182 |
currently only works on SUSE-based distributions. |
| 2183 |
|
| 2184 |
.. _sec.users: |
| 2185 |
|
| 2186 |
<users> |
| 2187 |
-------- |
| 2188 |
|
| 2189 |
Set up image users. |
| 2190 |
|
| 2191 |
.. code:: xml |
| 2192 |
|
| 2193 |
<users arch="arch"> |
| 2194 |
<user |
| 2195 |
name="user" |
| 2196 |
groups="group_list" |
| 2197 |
home="dir" |
| 2198 |
id="number" |
| 2199 |
password="text" |
| 2200 |
pwdformat="encrypted|plain" |
| 2201 |
realname="name" |
| 2202 |
shell="path" |
| 2203 |
/> |
| 2204 |
</users> |
| 2205 |
|
| 2206 |
The optional `users` element contains the user setup {kiwi} should create |
| 2207 |
in the system. The optional `arch` attribute can be used to limit the |
| 2208 |
user's setup to the host architecture from which {kiwi} is called. |
| 2209 |
At least one user child element must be specified as part of the `users` |
| 2210 |
element. Multiple user elements may be specified. |
| 2211 |
|
| 2212 |
Each `user` element represents a specific user that is added or |
| 2213 |
modified. The following attributes are mandatory: |
| 2214 |
|
| 2215 |
name="name": |
| 2216 |
the UNIX username. |
| 2217 |
|
| 2218 |
password="string" |
| 2219 |
The password for this user account. It can be provided either |
| 2220 |
in cleartext form or encrypted. An encrypted password can be created |
| 2221 |
using `openssl` as follows: |
| 2222 |
|
| 2223 |
.. code:: |
| 2224 |
|
| 2225 |
$ openssl passwd -1 -salt xyz PASSWORD |
| 2226 |
|
| 2227 |
It is also possible to specify the password as a non-encrypted string |
| 2228 |
by using the `pwdformat` attribute and setting its value to `plain`. |
| 2229 |
{kiwi} will then encrypt the password prior to the user being added |
| 2230 |
to the system. |
| 2231 |
|
| 2232 |
.. warning:: plain text passwords |
| 2233 |
|
| 2234 |
We do not recommend plain passwords, as they will be readable in |
| 2235 |
the image configuration in plain text. |
| 2236 |
|
| 2237 |
All specified users and groups will be created if they do not already |
| 2238 |
exist. The defined users will be part of the group(s) specified |
| 2239 |
with the `groups` attribute or belong to the default group as configured |
| 2240 |
in the system. If specified, the first entry in the groups list is used |
| 2241 |
as the login group. |
| 2242 |
|
| 2243 |
Additionally, the following optional attributes can be specified: |
| 2244 |
|
| 2245 |
home="path": |
| 2246 |
The path to the user's home directory. |
| 2247 |
|
| 2248 |
groups="group_a,group_b,group_c:id": |
| 2249 |
A comma-separated list of UNIX groups. The first element of the |
| 2250 |
list is used as the user's primary group. The remaining elements are |
| 2251 |
appended to the user's supplementary groups. When no groups are assigned, |
| 2252 |
then the system's default primary group will be used. If a group should |
| 2253 |
be of a specific group ID, it can be appended to the name, separated by |
| 2254 |
a colon. |
| 2255 |
|
| 2256 |
.. note:: |
| 2257 |
|
| 2258 |
Group IDs can only be set for groups that do not yet exist at |
| 2259 |
the time when {kiwi} creates them. A check is made if the desired |
| 2260 |
group is already present, and if it exists, the user will become a |
| 2261 |
member of that group, but any given group ID from the {kiwi} |
| 2262 |
configuration will **not** be taken into account. Usually, all |
| 2263 |
standard system groups are affected by this behavior because they |
| 2264 |
are provided by the OS itself. Thus, it's by intention not possible |
| 2265 |
to overwrite the group ID of an existing group. |
| 2266 |
|
| 2267 |
id="number": |
| 2268 |
The numeric user ID of this account. |
| 2269 |
|
| 2270 |
pwdformat="plain|encrypted": |
| 2271 |
The format in which `password` is provided. The default, if not |
| 2272 |
specified, is `encrypted`. |
| 2273 |
|
| 2274 |
realname="string": |
| 2275 |
The full name of the user, stored in the GECOS field. |
| 2276 |
|
| 2277 |
shell="path": |
| 2278 |
The login shell for this account. |
| 2279 |
|
| 2280 |
The `users` element itself accepts the optional `arch` and `profiles` |
| 2281 |
attributes to restrict a whole group of accounts to a given host |
| 2282 |
architecture or set of build profiles. |
| 2283 |
|
| 2284 |
.. _sec.drivers: |
| 2285 |
|
| 2286 |
<drivers> |
| 2287 |
--------- |
| 2288 |
|
| 2289 |
.. code:: xml |
| 2290 |
|
| 2291 |
<drivers> |
| 2292 |
<file name="crypto/*"/> |
| 2293 |
</drivers> |
| 2294 |
|
| 2295 |
Lists kernel driver modules to include in the {kiwi} initrd. Each `file` |
| 2296 |
child element takes a `name` attribute holding a path relative to the |
| 2297 |
kernel module directory (shell globs are supported). The `drivers` element |
| 2298 |
accepts the optional `profiles` attribute and may be provided multiple times. |
| 2299 |
|
| 2300 |
.. _sec.strip: |
| 2301 |
|
| 2302 |
<strip> |
| 2303 |
------- |
| 2304 |
|
| 2305 |
.. code:: xml |
| 2306 |
|
| 2307 |
<strip type="delete"> |
| 2308 |
<file name="/usr/share/doc"/> |
| 2309 |
</strip> |
| 2310 |
|
| 2311 |
Lists files to remove from, or to keep in, the image root tree. The |
| 2312 |
mandatory `type` attribute selects the meaning of the `file` children: |
| 2313 |
|
| 2314 |
type="delete" |
| 2315 |
A list of custom files and directories to delete. |
| 2316 |
|
| 2317 |
type="tools" |
| 2318 |
A list of file names in the Linux `bin` and `sbin` directories to keep; |
| 2319 |
everything else is removed. |
| 2320 |
|
| 2321 |
type="libs" |
| 2322 |
A list of file names in the Linux library directories to keep; |
| 2323 |
everything else is removed. |
| 2324 |
|
| 2325 |
The element accepts the optional `profiles` attribute and may be supplied |
| 2326 |
multiple times. |
| 2327 |
|
| 2328 |
.. _sec.extension: |
| 2329 |
|
| 2330 |
<extension> |
| 2331 |
----------- |
| 2332 |
|
| 2333 |
An optional container for namespaced XML belonging to a {kiwi} plugin. Each |
| 2334 |
XML namespace may appear at most once, and its content is validated against |
| 2335 |
an external RELAX NG schema resolved through the XML catalog. See |
| 2336 |
:doc:`../contributing/schema_extensions` for how to register and consume one. |
| 2337 |
|
| 2338 |
.. _sec.profiles: |
| 2339 |
|
| 2340 |
<profiles> |
| 2341 |
----------- |
| 2342 |
|
| 2343 |
Manage image namespace(s). |
| 2344 |
|
| 2345 |
.. code:: xml |
| 2346 |
|
| 2347 |
<profiles> |
| 2348 |
<profile name="profile_name" description="text" arch="arch_name"/> |
| 2349 |
</profiles> |
| 2350 |
|
| 2351 |
The optional profiles section lets you maintain one image description |
| 2352 |
while allowing for variation of other sections that are included. A |
| 2353 |
separate profile element must be specified for each variation. The |
| 2354 |
profile child element specifies an alias name used to mark sections as |
| 2355 |
belonging to a profile, and a short description explaining what this profile |
| 2356 |
does. Both `name` and `description` are **mandatory**. Two further attributes |
| 2357 |
are optional: |
| 2358 |
|
| 2359 |
import="true|false" |
| 2360 |
Select this profile automatically when no profile was given on the |
| 2361 |
command line. If any profile is passed via `--profile`, `import` is |
| 2362 |
ignored entirely and only the profiles named on the command line plus |
| 2363 |
their transitive `requires` are used. |
| 2364 |
|
| 2365 |
arch="arch_name" |
| 2366 |
Limit this profile to the listed host architectures. |
| 2367 |
|
| 2368 |
A profile can require other profiles, and the required profiles will |
| 2369 |
be evaluated in the order of their declaration. The optional arch |
| 2370 |
attribute can be used to limit the profile and required profiles |
| 2371 |
it to a certain architecture. For example: |
| 2372 |
|
| 2373 |
.. code:: xml |
| 2374 |
|
| 2375 |
<profile name="A" description="Some A" arch="x86_64,s390x"> |
| 2376 |
<requires profile="B"/> |
| 2377 |
<requires profile="C" arch="s390x"/> |
| 2378 |
</profile> |
| 2379 |
|
| 2380 |
For example, to mark a set of packages as belonging to a profile, simply |
| 2381 |
annotate them with the profiles attribute, as shown below: |
| 2382 |
|
| 2383 |
.. code:: xml |
| 2384 |
|
| 2385 |
<packages type="image" profiles="profile_name"> |
| 2386 |
<package name="name"/> |
| 2387 |
</packages> |
| 2388 |
|
| 2389 |
It is also possible to mark sections as belonging to multiple profiles |
| 2390 |
by separating the names in the profiles attribute with a comma: |
| 2391 |
|
| 2392 |
.. code:: xml |
| 2393 |
|
| 2394 |
<packages type="image" profiles="profile_A,profile_B"> |
| 2395 |
<package name="name"/> |
| 2396 |
</packages> |
| 2397 |
|
| 2398 |
If a section tag does not have a profiles attribute, it is globally |
| 2399 |
present in the configuration. If global sections and profiled sections |
| 2400 |
contains the same sub-sections, the profiled sections will overwrite |
| 2401 |
the global sections in the order of the provided profiles. For a better |
| 2402 |
overview of the result configuration when profiles are used we |
| 2403 |
recommend to put data that applies in any case to non profiled (global) |
| 2404 |
sections and only extend those global sections with profiled data. |
| 2405 |
For example: |
| 2406 |
|
| 2407 |
.. code:: xml |
| 2408 |
|
| 2409 |
<preferences> |
| 2410 |
<version>1.2.3</version> |
| 2411 |
<packagemanager>zypper</packagemanager> |
| 2412 |
</preferences> |
| 2413 |
|
| 2414 |
<preferences profiles="oem_qcow_format"> |
| 2415 |
<type image="oem" filesystem="ext4" format="qcow2"/> |
| 2416 |
</preferences> |
| 2417 |
|
| 2418 |
<preferences profiles="oem_vmdk_format"> |
| 2419 |
<type image="oem" filesystem="ext4" format="vmdk"/> |
| 2420 |
</preferences> |
| 2421 |
|
| 2422 |
The above example configures two version of the same oem type. |
| 2423 |
One builds a disk in qcow2 format the other builds a disk in |
| 2424 |
vmdk format. The global preferences section without a profile |
| 2425 |
assigned will be used in any case and defines those preferences |
| 2426 |
settings that are common to any build process. A user can |
| 2427 |
select both profiles at a time but that will result in building |
| 2428 |
the disk format that is specified last because one is overwriting |
| 2429 |
the other. |
| 2430 |
|
| 2431 |
Use of one or more profile(s) during image generation is triggered |
| 2432 |
by the use of the ``--profile`` command line argument. multiple profiles |
| 2433 |
can be selected by passing this option multiple times. |