9.1 xscr Commands

The basic command line that provides all features required to build client and boot images is:

xscr [options]

Table 9-1 summarizes the available xscr command line options. For examples of how these options are applied, see Building Images with xscr.

NOTE:If an option has an abbreviated form, the abbreviation is indicated below the option.

Table 9-1 xscr command options

Option

 

Description

--build -b

 

Used in conjunction with --destdir, this option builds an image.

This process assumes the Image Description Tree has been previously prepared. For more information, see the --prepare option.

Images are created with a time stamp in the filename. Old images are kept on the server.

IMPORTANT:xscr maintains up to five builds of a single image in the same directory. When you generate the sixth build of an image, xscr deletes the oldest image version. (xscr determines the oldest image version by the image date.) If you want to maintain more than five versions of a single image, you must maintain them in separate directories.

For sample usage, see Building the Image.

--config filename

Specifies an admin file to use instead of the default file.

--create image_name-version -c image_name-version

Used in conjunction with --image and --dist nld|sles, this option clones an existing Image Description Tree.

The new Image Description Tree is created at /opt/SLES/POS/system/image_name-version/. The name of the new Image Description Tree must include the image_name and version.

If you want to change the version number of your cloned Image Description Tree, you must edit the Version attribute in the ImageSpecification element within the ImageSpecification.xml file located in the root of the Image Description Tree. The xscr tool does not list the correct version number if you only modify the version included in the directory name.

For sample usage, see Section 9.4.1, Cloning the Image Description Tree.

--create-data-image directory

Used in conjunction with --image and --destdir, this option creates a data-only image.

A data-only image is an ext2 image file containing only a copy of the Image Description Tree starting at the given directory. This kind of image cannot be used as operating system or boot image.

If a diskful system is booting and its IMAGE variable in the config.MAC_address file includes an additional data image that will be downloaded to a /dev/ramx device, the data contents are automatically included into the system. If a data image is downloaded into a partition on the disk, the data is available at the mount point referring to the contents of the PART variable.

An advantage of this feature compared to the normal CONF workflow is that the data image is controlled in the same way as the client image, which means that any changes to the data image are detected automatically and the image is updated if necessary.

Images are created with a time stamp in the filename. Old images are kept on the server.

For sample usage, see Using Data Images to Manage External Configuration Files.

--create-iso name

Used in conjunction with --destdir, this option creates an ISO image from a previously prepared root image tree.

For sample usage, see Section 10.1.5, Creating the CD ISO Image.

--delta

Creates a delta image by comparing two images and stores the compressed delta image and checksum file in the specified destination directory.

For sample usage, see Section 9.6.1, Creating the Delta Image File.

--destdir directory -d directory

Designates the destination directory for the image and the checksum file.

For sample usage, see Section 9.4.4, Building the Image.

--dist nld|sles

Used in conjunction with --create, this option defines what type of image the ImageBuilder tool generates. If the distribution is NLD, ImageBuilder generates the image with NLD RPMs. If the distribution is SLES, ImageBuilder generates the image with SLES RPMs. For more information, see Section 9.4.1, Cloning the Image Description Tree.

NOTE:NLD is the default distribution type. Therefore, if you do not specify the image distribution when cloning the Image Description Tree, xscr defaults to NLD.

In general, most Point of Service images are created using the NLD distribution. The only images that require the SLES distribution are POSBranch images. For more information, see Section 10.2, Building POSBranch Images.

--export-config image_name

Exports the tarball included in the image with the --import-config command. The tarball contains the Image Description Tree and command line used to build the client image.

--feature list -f list

Used in conjunction with --prepare, this option defines features to include in the image after it has been prepared.

You can list one or more of the following features in a comma-separated list:

  • boot_cd:config=CD_setup_directory

    This option creates a CD bootable image. It requires the CD setup directory as a parameter. Use this option when generating the CDBoot image. For sample usage, see Section 10.1.4, Generating the CDBoot Image.

  • serial_console

    This option includes serial console support in the image and generates the corresponding files, inittab and security, and stores them in the files-user tree. For sample usage, see Section 9.4.4, Building the Image.

  • set_serial

    This option Includes a run-level script called setserial in the image. This script enables a service to configure all available serial interfaces for raw access during boot. This is needed for Point of Service systems providing more than the standard /dev/ttyS0 and /dev/ttyS1 serial interfaces.

--gzip -z

 

Used in conjunction with --build, this option compresses the created image file using gzip.

--help -h

 

Lists the xscr command line options and their syntax.

--image image_name-version -i image_name-version

Defines the name of the Image Description Tree you want to prepare, build, or clone.

The name of the Image Description Tree consists of the image name and version number, separated by a dash; for example, browser-2.0.21.

For sample usage, see Section 9.4.4, Building the Image.

--import-config

Adds a tarball to the image that contains the Image Description Tree and command line used to build the client image.

--keep-root

Used in conjunction with --prepare, this option maintains the root image tree.

The root image tree is normally removed after an error or after the image is created using the --build option. This option prevents the root image tree from being deleted.

--keep-rpm

Used in conjunction with --build, this option maintains the RPM database.

The RPM database is normally removed from the image to save space. This option prevents the RPM database from being deleted.

--list

 

Lists the existing images on the server.

--logfile filename

Used in conjunction with --prepare, this option creates a log file of the image build process.

--nostrict

Checks the RPM package signature before installation. This command can be used in conjunction with the --prepare option.

For sample usage, see Section 9.4.4, Building the Image.

--no-stripping filename

Prevents xscr from stripping symbols from executables and libraries in the image.

Executables and libraries are normally stripped out to discard symbols and save space. If symbols are needed, this option can be used.

  • If you specify a filename, only the matching files are not stripped.
  • If you do not specify a filename, nothing is stripped.
  • The --no-stripping --preserve-dates option preserves the date and time stamp while stripping.

NOTE:You can use this command to prevent stripping of symbols in JRE components.

The syntax of filename is based on glob patterns. Each line of the file specifies a glob pattern that can match exactly one file or multiple files.

For example, the following pattern prevents the file /usr/X11R6/bin/XFree86 and all files within the directory /lib from being stripped:

/usr/X11R6/bin/XFree86
/lib/*

NOTE:Glob patterns don’t work recursively.

--prepare -p

Used in conjunction with --image, this option generates only the Image Description Tree; the file system image is not created. The resulting structure, the root image tree, can be manually modified.

The root directory of the image is named root-image_name-version and is located in the current directory.

--setenv env_var=value -s env_var=value

Used in conjunction with the --prepare command, this option sets the environment variable. For example:

xscr --prepare --image image-2.0.3 --setenv SCR_BUILD_DIR=/tmp

NOTE:The value of the SCR_BUILD_DIR environment variable creates an image root tree in the /tmp directory.

--unsetenv env_var=value -u env_var=value

Used in conjunction with --prepare, this option unsets the environment variable. This option takes precedence over the --setenv option.

--update-product-file

Lets you update the product file within a DiskNetboot image without rebuilding the image.

For sample usage, see Section 9.7, Updating the Product File in a Boot Image.

--verify -V

Used in conjunction with --prepare, this option verifies all RPM packages after they are installed. When finished, ImageBuilder displays the verification results.

--version

Returns the ImageBuilder version number.