OpenSolaris Distribution Constructor Guide
Previous Next

Editing the Manifest Files

The SUNWdistro-const package that you installed on your system includes default manifest files. These XML manifest files provide the distribution constructor with the blueprints that specify the contents and parameters of the image that you plan to build.

The default manifest files included in the SUNWdistro-const package are:

  • Manifest for x86 ISO image – Located at /usr/share/distro_const/slim_cd/all_lang_slim_cd_x86.xml, this manifest is used to create an ISO image comparable to the OpenSolaris 2009.06 Live CD. To view the contents of the x86 Slim CD manifest, see Chapter 4, Appendix: Sample Manifest File.

  • Manifest for SPARC AI ISO image – Located at /usr/share/distro_const/auto_install/ai_sparc_image.xml, this manifest is used to create a SPARC AI ISO image for automated installations of the OpenSolaris OS to SPARC clients.

  • Manifest for x86 AI ISO image – Located at /usr/share/distro_const/auto_install/ai_x86_image.xml, this manifest is used to create an x86 AI ISO image for automated installations of the OpenSolaris OS to x86 clients.

You do not need to modify the default manifest files. However, you can edit them if you wish. The following table summaries some of the key sections in the manifest file and provides further instructions about how you can customize these sections.


Note - When using the distribution constructor, you can only create SPARC images on a SPARC system. And, you can only create x86 images on an x86 system.


Table 3-1 Primary Manifest Sections

Section XML Tags

Description of Required Manual Edits

<distribution name="OpenSolaris">

This section provides a default name for the distribution.

You can leave the default name or type a unique name for your distribution.

<checkpoint_enable>

The default setting in this section enables checkpointing when you create the image. You can use checkpointing to pause while building an image for testing purposes. Checkpointing is described later in this topic.

<pkg_repo_default_authority>

This section specifies the location of the IPS repository. The constructor accesses the repository and retrieves packages for the image when the image is being built. The default repository location is http://pkg.opensolaris.org/release.

If you do not want to use the opensolaris.org repository, modify this location to point to the repository of your choice. To view a list of some of the alternate repositories, see OpenSolaris Repositories.

<packages>

This section lists the packages to be included in the image.

If you have packages that you want to add to the image, list your packages in this field, one package per line.

<bootroot_contents>

This section lists the default files and directories that will be included in the boot root for the image that is built. Files or directories that need to be excluded from the image are specified with the base_exclude tag.


Caution - It is recommended that you not edit the boot root contents with the following exception. Modifying the boot root contents might cause the system to fail to boot.


The root archive for x86 images differs from the root archive for SPARC images. The whole root archive, or bootroot, for x86 images is a UFS filesystem, compressed by using lzma. The SPARC platform does not support the compression of the whole root archive in this way. Instead, SPARC root archives use DCFS, which compress each file individually. These individually compressed files might require specific handling in the manifest.

During boot time, some of the files in the root archive need to be modified. But, compressed files cannot be modified. Therefore, for SPARC images, you need to specify in the manifest which files should not be compressed. In the finalizer section of the manifest, find the reference to the boot_archive.py script. By default, this script specifies that all the files and directories in the /boot/solaris/filelist.ramdisk file, and all the files and subdirectories under the usr/kernel directory, are uncompressed. You must specify any additional files that need to be in uncompressed state in the bootroot by setting the fiocompress=false option in the manifest for those files.

<build_area>

This section specifies the area where the image will be created.

You must check that the package image area specified is valid for your system and revise as needed.

If you want to use checkpointing, you must specify a ZFS dataset, or a mount point that correlates to a ZFS dataset, as your build area. If the ZFS dataset does not exist, it will be created. The zpool that you specify, however, must already exist.

If you do not want to use checkpointing, you can use either a regular mount point or a ZFS or UFS file system.


Note - After an image has been created, the build area for that image has the following structure.

  • <build_area>/build_data/pkg_image – Package image area.

  • <build_area>/build_data/bootroot – Boot root build area.

  • <build_area>/build_data/tmp – Temporary directory used by constructor and finalizer scripts.

  • <build_area>/media – Area where the output images are placed.

  • <build_area>/logs – Area that holds log files which record the steps executed by the application and the output from all commands.

    The “simple” log, named simple-log-YYYY-MM-DD-HH-Mi-SS, contains only errors. The “detail” log, named detail-log-YYYY-MM-DD-HH-Mi-SS, contains informational output and errors. The console echos information in the “simple” log file.


<finalizer>

This section specifies the finalizer scripts that the distribution constructor invokes and the order in which the distribution constructor invokes them.

Default finalizer scripts are provided in the distro_const package and automatically referenced in this section of the manifest file. You do not need to edit this section unless you add new finalizer scripts, or you change the name or the argslist of existing scripts.

<key_value_pairs>

This section specifies additional parameters that are needed by the distribution constructor or by the finalizer scripts. Default parameters are provided.

You do not need to edit the default key-value pairs except to add new ones that will be recognized by new or customized finalizer scripts.

You can either use one of the default manifest files, or you can copy a default manifest and create a custom manifest file with a new file name. You will reference the manifest file by name when you use the distro_const command to create an image.

If the default scripts do not leave the build_area as you need it, you can create your own scripts to make further modifications. If you do create new scripts, you'll need to update the script references in the finalizer section of the manifest file.


Note - Always backup the original manifest file and the default scripts before copying them. Your custom scripts are not supported.


When you have completed any revisions to the manifest file and, optionally, customized the finalizer scripts as described in the next section, you can proceed with running the distro_const utility to create an image.

Previous Next