ister.py image builder

The ister.py tool is a template-based installer used by Clear Linux* OS to produce images for each release. The same ister tool is available for use in Clear Linux OS to create custom images based on an upstream image.

Description

Clear Linux OS is a rolling release and produces an average of 10 releases per week using the ister tool. With each release, we produce multiple image types for different environments and use cases such as installers, Hyper-V, KVM, or VMWare.

Each image has a JSON configuration file that is used by ister to generate the image. These JSON configuration files describe the image type, partitions, version, and bundles that will be preinstalled by default with the image. For each image type we produce, the corresponding JSON configuration file for the image also is published.

The mixer tool also uses ister to build images for your custom mix. Like upstream images, a JSON configuration file is defined for the image, which ister uses to generate the image. Refer to the mixer guide for instructions on using ister to build an image for a custom mix.

Examples

Recreate an upstream image

The published configuration files for upstream images may be used to recreate an image. Here are some examples:

  • Use an older version of Clear Linux OS and the image is no longer available (only after March 2017).
  • Customize the partitions of an image.
  • Customize the bundles preinstalled in an image.
  • Run your own post installation script.

Follow these steps to recreate an upstream image based on the image’s JSON configuration file:

  1. Install the os-installer bundle. Refer to swupd for more information on installing bundles.

  2. Download the ister.py tool and grant it sudo privileges.

  3. Download the JSON configuration file for the desired image (located in config/image/):

    For a previous release, navigate to Previous releases, select the version you want, and find the JSON configuration file under /clear/config/image. For example: https://cdn.download.clearlinux.org/releases/15700/clear/config/image/

  4. Download the “PostNonChroot” script (if applicable).

    The JSON configuration file for the image may have an accompanying “PostNonChroot” script that is executed at the end of the image creation process. If it does, download the script and make it executable.

  5. Edit the JSON configuration file as needed.

  6. If your configuration file has an accompanying “PostNonChroot” script, change the default path of the script to match your path.

  7. Generate the new image with the following command:

    sudo ister.py -t [JSON configuration]