SDB:KIWI Cookbook Get Juiced
Get Juiced - our first recipe
Ups - what? Which Juice?
Juice is the pronunciation for JeOS, which stands for “Just Enough Operating System.” Wikipedia
The term JeOS refers to a customized operating system that precisely fits the needs of a particular application. This means a JeOS system includes only those pieces of an operating system required to support a particular application, resulting in a small system.
The benefits of using a JeOS based system compared to a general purpose OS are a smaller system footprint, improved efficiency and speed. Further, security is generally improved as well, the reduced number of software components in the system provide a smaller footprint for security vulnerabilities. These benefits make JeOS a perfect base for building appliances.
The kiwi-templates package provides example descriptions based on JeOS. The templates can be listed with the --list command line option.
This will result in a list similar to the one shown below:
suse-11.1-JeOS -> Version: 1.11.1 done suse-SLE10-JeOS -> Version: 1.10.1 done suse-SLE11-JeOS -> Version: 1.11.1 done
Using the --build option as discussed previously it is possible to create an image from a template as follows:
kiwi --build <templatename> --destdir <DestinationPath>
Changing the image type
By default the templates build a small text based VMware image. The created image supports file editing functionality and installation of additional packages using zypper. Therefore, this JeOS based system can easily be transformed into a full system using the predefined online repository. For this recipe we will use the openSUSE 11.1 template.
Rather than building the default VMware image lets build a LiveCD image. Therefore, we need to instruct Kiwi to create the LiveCD image using the command line option --type. This will override the default behavior. The iso value is accepted for the --type command line option to create a LiveCD image. Combining this with the usage described above results in the following command line form:
kiwi --build <templatename> --destdir <DestinationPath> --type iso
With this we can create the image as follows:
Depending on your bandwidth this may take a while. Feel free to use a local repository as described in Repository Options in the Start Cooking recipe.
Congratulations! That's it - you have just created your first image with kiwi
You are now of course burning to know whether or not this actually worked and produced a usable system. You can test the iso image
using a full virtual system such as vmware or qemu. Another option for testing is to burn the .iso file to a CD or DVD and boot from it.
If we choose to use qemu to test the created image the following command line will do the trick.
The Login Details for the system are
- User: root
- pwd : linux
Here the complete list of the possible types to specify the output image to use:
- ISO image - for Live CD/DVD Systems
- USB image - for Live-Stick Systems
- VMX image - for full virtualisation Systems
- PXE image - for Thin Clients
- OEM image - for Preloaded Systems
- XEN image - for Paravirtual Systems
- EC2 image - Amazon Elastic Compute Cloud Systems
- Depending on the version of the template package you are using you may end up with a German keyboard map so be aware of what you type
- For your reference, here is a picture of the German layout
- You can change the keyboard map after you login as follows (using US map as example).