LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kiwi-ng

command-line tool for building Linux operating system images

TLDR

Build image from description
$ sudo kiwi-ng system build --description [path] --target-dir [output]
copy
Build a specific profile and image type
$ sudo kiwi-ng --profile [name] --type [iso] system build --description [path] --target-dir [output]
copy
Build with a replacement repository
$ sudo kiwi-ng system build --description [path] --set-repo [repo-url] --target-dir [output]
copy
Build with an extra repository and package
$ sudo kiwi-ng system build --description [path] --add-repo [repo-url],rpm-md --add-package [package] --target-dir [output]
copy
Prepare image root only
$ sudo kiwi-ng system prepare --description [path] --root [rootdir]
copy
Create the image from a prepared root
$ sudo kiwi-ng system create --root [rootdir] --target-dir [output]
copy
List profiles defined in a description
$ kiwi-ng image info --description [path] --list-profiles
copy
List build results of the last build
$ kiwi-ng result list --target-dir [output]
copy

SYNOPSIS

kiwi-ng [global options] image|result|system command [args...]

DESCRIPTION

kiwi-ng is a command-line tool for building Linux operating system images. Supports various output formats including ISOs, virtual machine images, containers, and cloud images. Uses XML-based descriptions to define image configuration.A build runs in two steps: prepare installs packages into a new root tree, and create turns that tree into the output image. system build combines both. Runtime settings are read from /etc/kiwi.yml and ~/.config/kiwi/config.yml.

PARAMETERS

system build

Prepare the root tree and create the image in one step.
system prepare
Prepare the image root filesystem from the description.
system create
Create the output image from a prepared root tree.
system update
Update a previously prepared root tree.
image info
Show information about an image description, such as profiles or the resolved package list.
image resize
Resize a built disk image to a new size.
result list
List the files produced by the last build.
result bundle
Copy build results into a bundle directory with versioned file names.
--description path
Directory containing the kiwi XML description.
--target-dir path
Output directory for images.
--root path
Root tree directory for prepare and create.
--set-repo source[,type,alias,priority,...]
Replace the first repository of the description.
--add-repo source[,type,alias,priority,...]
Add a repository (repeatable).
--add-package name, --delete-package name
Add or remove a package from the image (repeatable).
--ignore-repos
Ignore all repositories from the description.
--clear-cache
Delete the repository cache before installing packages.
--allow-existing-root
Reuse an existing root directory from a previous build.
--profile name
Global option: select a profile from the description (repeatable).
--type type
Global option: select the image build type (e.g. iso, oem, kis).
--target-arch arch
Global option: build for a different architecture than the host.
--debug, --logfile file
Global options: print debug output, or write the log to a file (stdout for standard output).

CAVEATS

Global options such as --profile and --type must appear before the system, image or result command. Building usually requires root privileges and the package manager of the target distribution on the build host (or use system boxbuild to build inside a virtual machine).

HISTORY

KIWI was created at SUSE and is the image builder behind openSUSE and SUSE Linux Enterprise images. The original Perl implementation was rewritten in Python as "KIWI Next Generation", which is why the command is named kiwi-ng. It is developed by the OSInside project.

SEE ALSO

mkosi(1), debootstrap(8), mkisofs(1), docker(1)

RESOURCES

Copied to clipboard
Kai