<h1>mkksiso<aclass="headerlink"href="#mkksiso"title="Permalink to this headline">¶</a></h1>
<dlclass="field-list simple">
<dtclass="field-odd">Authors</dt>
<ddclass="field-odd"><p>Brian C. Lane <<aclass="reference external"href="mailto:bcl%40redhat.com">bcl<span>@</span>redhat<span>.</span>com</a>></p>
</dd>
</dl>
<p><codeclass="docutils literal notranslate"><spanclass="pre">mkksiso</span></code> is a tool for creating kickstart boot isos. In it's simplest form
you can add a kickstart to a boot.iso and the kickstart will be executed when
the iso is booted. If the original iso was created with EFI and Mac support the
kickstart boot.iso will include this support as well.</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">mkksiso</span></code> needs to be run as root, it depends on mounting the original iso
and you need to be root to be able to do that.</p>
<h2>Create a kickstart boot.iso or DVD<aclass="headerlink"href="#create-a-kickstart-boot-iso-or-dvd"title="Permalink to this headline">¶</a></h2>
<p>Create a kickstart like you normally would, kickstart documentation can be
<aclass="reference external"href="https://pykickstart.readthedocs.io/en/latest/">found here</a>, including the
<codeclass="docutils literal notranslate"><spanclass="pre">url</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">repo</span></code> commands. If you are creating a DVD and only need the
content on the DVD you can use the <codeclass="docutils literal notranslate"><spanclass="pre">cdrom</span></code> command to install without a
network connection. Then run <codeclass="docutils literal notranslate"><spanclass="pre">mkksiso</span></code> like this:</p>
<p>By default the volume id of the iso is preserved. You can set a custom volid
by passing <codeclass="docutils literal notranslate"><spanclass="pre">-V</span></code> and the string to set. The kernel cmdline will be changes, and the iso will have th custom volume id.
<h2>Adding package repos to a boot.iso<aclass="headerlink"href="#adding-package-repos-to-a-boot-iso"title="Permalink to this headline">¶</a></h2>
<p>You can add repo directories to the iso using <codeclass="docutils literal notranslate"><spanclass="pre">--add</span><spanclass="pre">/PATH/TO/REPO/</span></code>, make
sure it contains the <codeclass="docutils literal notranslate"><spanclass="pre">repodata</span></code> directory by running <codeclass="docutils literal notranslate"><spanclass="pre">createrepo_c</span></code> on it
first. In the kickstart you can refer to the directories (and files) on the iso
using <codeclass="docutils literal notranslate"><spanclass="pre">file:///run/install/repo/DIRECTORY/</span></code>. You can then use these repos in
<h2>Create a liveimg boot.iso<aclass="headerlink"href="#create-a-liveimg-boot-iso"title="Permalink to this headline">¶</a></h2>
<p>You can use the kickstart <aclass="reference external"href="https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#liveimg">liveimg command</a>,
to install a pre-generated disk image or tar to the system the iso is booting
<p>Create a disk image or tar with <codeclass="docutils literal notranslate"><spanclass="pre">osbuild-composer</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">livemedia-creator</span></code>,
kernel and bootloader support. In <codeclass="docutils literal notranslate"><spanclass="pre">osbuild-composer</span></code> use the <codeclass="docutils literal notranslate"><spanclass="pre">tar</span></code> image
type and make sure to include the <codeclass="docutils literal notranslate"><spanclass="pre">kernel</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">grub2</span></code>, and <codeclass="docutils literal notranslate"><spanclass="pre">grub2-tools</span></code>
packages. If you plan to install it to a UEFI machine make sure to include
<codeclass="docutils literal notranslate"><spanclass="pre">grub2-efi</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">efibootmgr</span></code> in the blueprint.</p>
<p>Add the <codeclass="docutils literal notranslate"><spanclass="pre">root.tar.xz</span></code> file to the iso using <codeclass="docutils literal notranslate"><spanclass="pre">--add</span><spanclass="pre">/PATH/TO/ROOT.TAR.XZ</span></code>,
and in the kickstart reference it with the <codeclass="docutils literal notranslate"><spanclass="pre">liveimg</span></code> command like this:</p>
<p>It is also a good idea to use the <codeclass="docutils literal notranslate"><spanclass="pre">--checksum</span></code> argument to <codeclass="docutils literal notranslate"><spanclass="pre">liveimg</span></code> to be
<h2>How it works<aclass="headerlink"href="#how-it-works"title="Permalink to this headline">¶</a></h2>
<p><codeclass="docutils literal notranslate"><spanclass="pre">mkksiso</span></code> first examines the system to make sure the tools it needs are installed,
it will work with <codeclass="docutils literal notranslate"><spanclass="pre">xorrisofs</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">mkisofs</span></code> installed. It mounts the source iso,
and copies the directories that need to be modified to a temporary directory.</p>
<p>It then modifies the boot configuration files to include the <codeclass="docutils literal notranslate"><spanclass="pre">inst.ks</span></code> command,
and checks to see if the original iso supports EFI. If it does it regenerates the
EFI boot images with the new configuration, and then runs the available iso creation
tool to add the new files and directories to the new iso. If the architecture is
<codeclass="docutils literal notranslate"><spanclass="pre">x86_64</span></code> it will also make sure the iso can be booted as an iso or from a USB
stick (hybridiso).</p>
<p>The last step is to update the iso checksums so that booting with test enabled