Build KIS Image (Kernel, Initrd, System)¶
A KIS image is a collection of image components that are not
associated with a dedicated use case. This means from a KIWI NG
perspective we don’t know in which environment these components
are later used. The predecessor of this image type was called
pxe
under the assumption that the components will be used
in a pxe boot environment. However this assumption is not
neccessarily true and the image components are used in a different
way. Because there are so many possible deployment strategies
for a kernel
plus initrd
and optional system root filesystem
,
KIWI NG provides this as generic KIS
type that is generically
usable.
The former pxe
image type will continue to exist but is expected
to be used only in combination with the legacy netboot
infrastructure
as described in Build PXE Root File System Image for the legacy netboot infrastructure.
To add a KIS build to your appliance, create a type
element with
image
set to kis
in your config.xml
as shown below:
<preferences>
<type image="kis"/>
</preferences>
With this image type setup KIWI NG will just build a kernel and initrd not associated to any system root file system. Usually such an image is only useful with some custom dracut extensions as part of the image description.
The following attributes of the type
element are often used when
building KIS images:
filesystem
: Specifies the root filesystem and triggers the build of an additional filesystem image of that filesystem. The generated kernel command line options file (append file) will then also include aroot=
parameter that references this filesystem image UUID. If the information from the append file should be used or not is optional.kernelcmdline
: Specifies kernel command line options that will be part of the generated kernel command line options file (append file). By default the append file contains no information or the reference to the root UUID if thefilesystem
attribute is used.
All other attributes of the type
element that applies to an optional
root filesystem image will be effective in the system image of a KIS
image as well.
With the appropriate settings present in config.xml
KIWI NG can now
build the image:
$ sudo kiwi-ng --type kis system build \
--description kiwi/build-tests/x86/tumbleweed/test-image-pxe \
--set-repo http://download.opensuse.org/tumbleweed/repo/oss \
--target-dir /tmp/myimage
The resulting image components are saved in the folder /tmp/myimage
.
Outside of a deployment infrastructure the example KIS image can be
tested with QEMU as follows:
$ sudo qemu
-kernel /tmp/myimage/*.kernel \
-initrd /tmp/myimage/*.initrd \
-append $(cat /tmp/myimage/*.append) \
-hda /tmp/myimage/kiwi-test-image-pxe.*-1.15.3 \
-serial stdio
Note
For testing the components of a KIS image a deployment infrastructure
and also a deployment process is usually needed. One example of a
deployment infrastructure using PXE is provided by KIWI NG with the
netboot
infrastructure. However that netboot infrastructure is no
longer developed and only kept for compatibiliy reasons. For details
see Build PXE Root File System Image for the legacy netboot infrastructure