Debian Codegraph @

doc/source/overview/workflow.rst

raw
1 Basic Workflow
2 ==============
3
4 .. note:: **Abstract**
5
6 The installation of a Linux system generally occurs by booting the target
7 system from an installation source such as an installation CD/DVD, a live
8 CD/DVD, or a network boot environment (PXE). The installation process is
9 often driven by an installer that interacts with the user to collect
10 information about the installation. This information generally includes the
11 *software to be installed*, the *timezone*, system *user* data, and
12 other information. Once all the information is collected, the installer
13 installs the software onto the target system using packages from the
14 available software sources (repositories). After the installation is
15 complete, the system usually reboots and enters a configuration procedure
16 upon startup. The configuration may be fully automatic, or it may include
17 user interaction.
18
19 This description applies for version |version|.
20
21 A system image (usually called an "image") is a *complete installation* of a Linux
22 system within a file. The image represents an operational system and,
23 optionally, contains the "final" configuration.
24
25 The behavior of the image upon deployment varies depending on the image type
26 and the image configuration since {kiwi} allows you to completely customize
27 the initial startup behavior of the image. Among others, this includes
28 images that:
29
30 * can be deployed inside an existing virtual environment without requiring
31 configuration at startup.
32 * automatically configure themselves in a known target environment.
33 * prompt the user for an interactive system configuration.
34
35 The image creation process with {kiwi} is automated and does not require any
36 user interaction. The information required for the image creation process is
37 provided by the primary configuration file named :file:`config.xml`.
38 This file is validated against the schema documented in:
39 :ref:`image-description`.
40
41 In addition, the image can optionally be customized
42 using the :file:`config.sh` and :file:`images.sh` scripts
43 and by using an *overlay tree (directory)* called :file:`root`.
44 See the :ref:`description_components` section for further details.
45
46 .. note:: Previous Knowledge
47
48 This documentation assumes that you are familiar with the general
49 concepts of Linux, including the boot process and distribution concepts
50 such as package management.
51
52 .. _description_components:
53
54 Components of an Image Description
55 ----------------------------------
56
57 A {kiwi} image description can be composed of several parts. The main part is
58 the {kiwi} description file itself (named :file:`config.xml` or an arbitrary
59 name plus the :file:`*.kiwi` extension). The configuration XML is the
60 only required component; others are optional.
61
62 These are the optional components of an image description:
63
64 #. Shell scripts
65
66 There are optional hook scripts to influence the build process
67 at several stages. For details about the different script break
68 points see :ref:`User-Defined Scripts <working-with-kiwi-user-defined-scripts>`
69
70 #. Overlay tree directory
71
72 The *overlay tree* is a folder (called :file:`root`)
73 or a tarball file (called :file:`root.tar.gz`) that contains
74 files and directories that will be copied to the target image build tree
75 during the :ref:`prepare step <prepare-step>`. It is executed
76 after all the packages included in the :file:`config.xml` file
77 have been installed. Any already present file is overwritten.
78
79 #. CD root user data
80
81 For live ISO images and install ISO images, an optional cdroot archive
82 is supported. This is a tar archive matching the name
83 :file:`config-cdroot.tar[.compression_postfix]`. If present, it will
84 be unpacked as user data on the ISO image. This is mostly useful to
85 add, e.g., license files or user documentation on the CD/DVD, which
86 can be read directly without booting from the media.
87
88 #. Archives included in the :file:`config.xml` file.
89
90 The archives that are included in the `<packages>` using the `<archive>`
91 subsection:
92
93 .. code:: xml
94
95 <packages type="image">
96 <archive name="custom-archive.tgz"/>
97 </packages>