scr builds images using the Image Description Tree and the AdminServer.conf file. The Image Description Tree and AdminServer.conf file contain files and directories that define the structure, scripts, configuration files, and other components required to build client images for Point of Service systems.
The following sections review the image components required to build images with scr:
scr builds images using a specific file system directory structure known as the Image Description Tree. The Image Description Tree provides the structure, scripts, configuration files, and other components required to build client images for Point of Service systems. These components are stored under /opt/SLES/POS/system/image_name-version/.
Table 8-2 summarizes the Image Description Tree components required to build images with scr.
Table 8-2 Required components of an Image Description Tree
Component |
Description |
---|---|
/opt/SLES/POS/system/image_name-version/IMAGE |
An unformatted file that contains a brief description of the image and its function. |
/opt/SLES/POS/system/image_name-version/VERSION |
A file that contains the version number of the Image Description Tree, such as 1.1.2. If you want to change the version number of your Image Description Tree, you must edit the VERSION and the name of the Image Description Tree directory. If you only modify the version included in the directory, the scr tool does not list the correct version number. scr replaces the version specified in the VERSION file with the version specified on the command line when you clone the Image Description Tree. |
/opt/SLES/POS/system/image_name-version/files/ |
A subdirectory that contains special files, directories, and scripts, This function of this directory is to ensure that the RPM is used as the package manager before any packages are installed in the image. The entire directory is copied to the root of the image tree using cp -a. This directory cannot contain any libraries or binary files. Any binaries and libraries required before the first RPM call must be extracted from the corresponding packages in advance. |
/opt/SLES/POS/system/image_name-version/files-user/ |
A subdirectory that contains special files, directories, and scripts for adapting the image environment after the installation of all the image packages. |
/opt/SLES/POS/system/image_name-version/package/ |
A subdirectory where ImageBuilder searches for RPM packages. The directory is automatically initialized depending on the entries in the ImageBuilder configuration file, /etc/opt/SLES/POS/AdminServer.conf. For more information, see Section 8.2.2, AdminServer.conf. If there is no package directory, ImageBuilder creates a link to the global package directory (/opt/SLES/POS/pac/) and the links designated in the AdminServer.conf file. |
/opt/SLES/POS/system/image_name-version/script/ |
A subdirectory that contains Bash scripts that are called after a package is installed, primarily to remove the parts of a package that are not needed for the Point of Service system. IMPORTANT:For these scripts to run, the script name must match the name of the RPM (without the version). |
/opt/SLES/POS/system/image_name-version/config |
A configuration file that indicates the image size, type, and base name. The structure of the file corresponds to the format Key: Value. The configuration file defines the following keys:
|
/opt/SLES/POS/system/image_name-version/config (continued) |
In addition to the keys described above, it is also possible to specify script variables in the Key:Value format. All values entered in the configuration file are stored in the .profile file before executing the scripts in the script directory. Using the following command, the .profile file is created at the root of the installed image so it can be sourced from any script: test -f /.profile \&\& . /.profile The parameters of the configuration file are then available as variables in the script and can be processed appropriately. With the test -f /.profile \&\& . /.profile command, the following script variables may also be stored in the configuration file:
A representation of the configuration file for the disknetboot-2.0.21 image description is shown below: name:initrd-disknetboot size:15M type:ext2 netdrivers:pcnet32.o,mii.o,natsemi.o,tulip/tulip.o |
/opt/SLES/POS/system.image_name-version/config.cleanup |
An optional configuration script for the image. This script is called at the end of the installation and after all the installation scripts have run. It is designed to clean up the image system. The target programs and files are those needed only while the installation scripts are running. |
/opt/SLES/POS/system.image_name-version/config.system |
An optional configuration script for the image. This script is called at the end of the installation but before the installation scripts have run. It is designed to configure the image system, such as the activation or deactivation of certain services (insserv). The call is not made until after the switch to the image has been made with chroot. IMPORTANT:This file provides the scripts required to install the image. In most instances, we recommend that you do not modify this file. |
/opt/SLES/POS/system/image_name-version/setup |
A configuration file that indicates which packages make up the image and which RPM options must be used to install them. Each package can also be accompanied by a specific version of the package. The structure of the file is as follows: package_basename : RPM_option : package_version Multiple RPM options are separated from each other by commas. If an executable shell script with the same name as the package base name is present in the script directory, it is executed after the installation of all the packages. For an example of a sample setup file, see Section C.1, Sample setup File. |
/opt/SLES/POS/system/image_name-version/setup.user |
An optional configuration file that can be present in addition to setup. The file has the same format as the setup file, but a path to the package can be indicated after the package version. The structure of the file is as follows: Package Basename : RPM Option : Package Version : Path For an example of a sample setup.user file, see Section C.2, Sample setup.user File. |
/opt/SLES/POS/system/image_name-version/setup.txt |
An optional information file for the LDAP system. This file contains information regarding which configuration files are required by the image and whether they are hardware or system--dependent. The structure of the file is as follows: flag : configuration_file_name The configuration_file_name includes the full file path. The following values can be set for the flag value:
|
When scr generates an image, it searches the paths listed in the AdminServer.conf file to find the RPM packages required to create the image. This ASCII, line-based file is located at etc/opt/SLES/POS/. It provides the paths to the distribution directories where you have copied the Novell Linux Point of Service CDs.
The AdminServer.conf file also references the maintenance directory. The maintenance directory is essentially an “override” directory. RPMs located in this directory take precedence over RPMs located in the distribution directories. You can add any RPM to this directory that you want scr to use in lieu of the default RPMs in the distribution directories. By default, the maintenance directory contains the glibc and devs RPMs. For a detailed breakdown of the maintenance directory structure, see Section B.1, Administration Server Directory Structure.
Information is organized in simple key=value format where the value after the key indicates the path to an Novell Linux Point of Service CD. For example, the following is the AdminServer.conf file for an NLD distribution:
SLESCD0=/opt/SLES/POS/maintenance/nld SLESCD1=/opt/SLES/POS/dist/NLD9/SP1/CD1 SLESCD2=/opt/SLES/POS/dist/NLD9/SP1/CD2 SLESCD3=/opt/SLES/POS/dist/NLD9/FCS/CD1 SLESCD4=/opt/SLES/POS/dist/NLD9/FCS/CD2 SLESCD5=/opt/SLES/POS/dist/NLD9/FCS/CD3 SLESCD6=/opt/SLES/POS/dist/NLPOS9/FCS/CD4
The AdminServer.conf file for a SLES distribution appears as follows:
SLESCD0=/opt/SLES/POS/maintenance/sles SLESCD1=/opt/SLES/POS/dist/NLPOS9/FCS/CD1 SLESCD2=/opt/SLES/POS/dist/NLPOS9/FCS/CD2 SLESCD3=/opt/SLES/POS/dist/NLPOS9/FCS/CD4 SLESCD4=/opt/SLES/POS/dist/SLES9/FCS/CD1 SLESCD5=/opt/SLES/POS/dist/SLES9/FCS/CD2 SLESCD6=/opt/SLES/POS/dist/SLES9/FCS/CD3
The order in which the CDs are listed is important because when scr generates the image, it searches each CD in the designated order for RPMs listed in the setup file. For example, given the preceding AdminServer.conf file, ImageBuilder searches for RPM packages beginning with /opt/SLES/POS/maintenance/nld and ending with /opt/SLES/POS/dist/NLPOS9/FCS/CD4. Note that the maintenance directory is listed first so scr uses any RPM it finds in this directory before it searches the distribution directories.
The POSCDTool is used to generate the AdminServer.conf file. For more information on this process, see Section 7.3.4, Generating AdminServer.conf or Distribution.xml.
NOTE:If you receive a newer SLES9 Service Pack CD, run the poscdtool utility to regenerate the AdminServer.conf file.