9.4 Building Images with xscr

After you have installed ImageBuilder and the image templates, copied the image source files to a distribution directory, and defined the image source location files, you can start building Point of Services images.

The process required to build an image with xscr is as follows:

  1. Clone the Image Description Tree.

  2. Customize the Image Specification Document (ImageSpecification.xml).

  3. Configure the image.

  4. Build the image.

These steps are discussed in the following sections.

9.4.1 Cloning the Image Description Tree

xscr builds images using a specific file system directory structure known as the Image Description Tree. The Image Description Tree provides the XML documents, configuration files, and other components required to build images for Point of Service systems.

You can use the default Image Description Trees provided with Novell Linux Point of Service to generate the DiskNetboot, CDBoot, Minimal, Browser, Java, and Desktop images. However, to maintain a standardized source tree and simplify the upgrade process, we recommend you maintain the default Image Description Trees provided with Novell Linux Point of Service as master copies. To build your own images, you can clone the default Image Description Trees, then modify the cloned tree.

When you clone an Image Description Tree using xscr, you can define the image distribution as NLD or SLES (--dist nld|sles). If you define the image distribution as NLD, xscr adds a child document (image_name.xml) to the parent Image Specification Document that includes the NLD RPMs in the image. Conversely, if you define the image distribution as SLES, xscr adds a child document (image_name-sles.xml) to the parent Image Specification Document that includes the SLES RPMs in the image.

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.

The basic syntax to clone an Image Description Tree is as follows:

xscr --create image_name-version --image image_name-version --dist nld|sles

For example, the following command clones the Desktop-2.0.21 Image Description Tree to create a new NLD-based Image Description Tree named myImage-1.1.1:

xscr --create myImage-1.1.1 --image desktop-2.0.21

IMPORTANT:You cannot use the word “boot” in any image name other than the cdboot and disknetboot images.

The new Image Description Tree is located at /opt/SLES/POS/system/myImage-1.1.1. You can then modify the cloned Image Description Tree as required to create your new image. For a description of the individual Image Description Tree components, see Section 9.2.1, Image Description Tree and Section B.0, Novell Linux Point of Service Files and Directory Structure.

9.4.2 Customizing the Image Specification Document

Image Specification Documents contain XML elements that define the structure, configuration, and other components required to build images for Point of Service systems. In general, a master Image Specification Document (or parent document) defines general image parameters and individual image subcomponents such as add-on features, custom applications, and so forth are defined in sub-documents referred to as child documents.

Novell Linux Point of Services allows you to nest multiple child documents within a parent Image Specification Document. These child documents can be located anywhere and can be given any filename. The parent Image Specification Document must be named ImageSpecification.xml and must be located at the root of the Image Description Tree (/opt/SLES/POS/system/image_name-version).

The default Image Description Trees provided with Novell Linux Point of Service have a parent Image Specification Document at the root of the tree. After you clone the tree, you can customize the parent Image Specification Document as needed to build your image.

The following sections outline how to customize elements in Image Specification Documents:

Adding Features to Client Images

Novell Linux Point of Service provides add-on features that can be added to client images generated with xscr. To add a feature to a client image, simply reference the add-on feature’s Image Specification Document (that is, child document) within the client Image Specification Document (that is, parent document). The parent document’s IncludeSpecificationList element identifies the child documents that you want ImageBuilder to include when it generates the image.

For example, to include the VNC 4 Remote Control add-on option in a client image, you must provide the URI to the vnc.xml child document in the parent document’s IncludeSpecificationList element, as follows:

<IncludeSpecificationList>
   <IncludeSpecification URI="/opt/SLES/POS/system/templates/addons/
   vnc.xml"/>
</IncludeSpecificationList>

Table 9-11 lists the Image Specification Documents for add-on features that can be added to client images.

IMPORTANT:Some of the add-on features have dependencies. The dependencies are noted in Table 9-11; however, you can also check the RequiredList element in the Image Description Document to verify dependencies. If the image does not have a RequiredList element, the add-on feature can be added to any client image. For more information, see RequiredList.

Table 9-11 Image Specification Documents for client add-on features

Feature

Image Specification Document

Description

admind

/opt/SLES/POS/system/templates/addons/admind.xml

Adds the admind utility to client images. admind allows simple commands to be executed on Point of Service terminals from a remote location. For more information, see Section 11.0, Remotely Managing Point of Service Terminals with admind and adminc.

This feature can be added to any NLD-based client image.

Advanced Linux Sound Library

/opt/SLES/POS/system/templates/addons/alsa.xml

Adds the Advanced Linux Sound Library (ALSA) to client images. ALSA provides audio and MIDI functionality for Point of Service terminals.

This feature can be added to any client image.

Debug

/opt/SLES/POS/system/templates/addons/debug.xml

Adds debugging tools to client images for troubleshooting purposes.This feature can be added to any client image.

EvTouch

/opt/SLES/POS/system/templates/addons/evtouch.xml

Adds the driver for evtouch screens in ncurses mode.

NOTE:This driver does not support evtouch screens in X11 mode.

This feature can be added only to the Java, Browser, or Desktop images.

Firefox

/opt/SLES/POS/system/templates/addons/firefox.xml

Adds the Firefox browser to client images.

This feature can be added only to the NLD-based Browser or Desktop images.

GNOME 2.6 for NLD

/opt/SLES/POS/system/templates/addons/gnome.xml

Adds the GNOME desktop to NLD-based client images.

This feature can be added only to the NLD Desktop image.

GNOME 2.6 for SLES

/opt/SLES/POS/system/templates/addons/gnome-sles.xml

Adds the GNOME desktop to SLES-based images used for POSBranch.

This feature can be added only to the SLES Desktop image.

IBM Java

/opt/SLES/POS/system/templates/addons/ibmjava.xml

Adds the current IBM Java Runtime Environment (JRE) to NLD-based client images.

This feature can be added to the Java, Browser, or Desktop images.

KDE 3.2 for NLD

/opt/SLES/POS/system/templates/addons/kde.xml

Adds the KDE desktop to NLD-based client images.

This feature can be added only to the NLD Desktop image.

KDE 3.2 for SLES

/opt/SLES/POS/system/templates/addons/kde-sles.xml

Adds the KDE desktop to SLES-based images used for POSBranch.

This feature can be added only to the SLES Desktop image.

Mozilla

/opt/SLES/POS/system/templates/addons/mozilla.xml

Adds the Mozilla browser to client images.

This feature can be added to the Browser or Desktop images.

Samba 3 Client

/opt/SLES/POS/system/templates/addons/samba.xml

Provides Common Internet File System (CIFS) file access for Windows and Linux clients.

NOTE:The Samba 3 server is included with Novell Linux Point of Service.

This feature can be added to any client image.

Vim

/opt/SLES/POS/system/templates/addons/vim.xml

Adds Vim (Vi IMproved) to client images.

Vim is an almost compatible version of the UNIX editor vi. Almost every possible command can be performed using only ASCII characters. Many new features have been added such as multilevel undo, command line history, filename completion, block operations, and editing of binary data. Vi is available for the AMIGA, MS-DOS, Windows NT, and various versions of UNIX.

This feature can be added to any client image.

VNC 4 Remote Control Client

/opt/SLES/POS/system/templates/addons/vnc.xml

Adds the VNC 4 Remote Control client to the image so you can remotely control the Point of Service terminal over any TCP/IP connection.

This feature can be added to Java, Browser or Desktop images.

YaST2

/opt/SLES/POS/system/templates/addons/yast2.xml

Adds the YaST2 console to client images.

YaST2 is the system configuration console. It can configure hardware (sound cards, printers, keyboards, mice), network connections (network cards, ISDN cards, modems, DSL connections), network clients and services (NFS, NIS), as well as a general system options (language, partitioning, software, bootloader).

This feature can be added only to the Desktop image.

For more information on the IncludeSpecificationList element, see IncludeSpecificationList. For a sample Image Specification Document, see Section C.3.2, Defined ImageSpecification.xml Document.

Adding Drivers

The Novell Linux Point of Service XML schema allows you to include or exclude specific drivers from a client image. To include or exclude drivers, you must reference the driver within a parent or child Image Specification Document. The DriverSpecifications element identifies the drivers that you want to include or exclude from the image.

Novell Linux Point of Service includes the driver packages listed in Table 9-12.

Table 9-12 Driver packages included with Novell Linux Point of Service

Driver Set

URI

Driver Name

General Drivers

/kernel/

  • net/packet/*
  • fs/ext3/*
  • fs/jbd/*
  • drivers/ide/*
  • drivers/dump/*
  • drivers/char/dcs/*
  • drivers/cdrom/*
  • drivers/input/keyboard/ikbps.ko
  • drivers/pci/*

Network Drivers

/kernel/drivers/net/

  • pcnet32.ko
  • mii.ko
  • natsemi.ko
  • tulip/tulip.ko
  • eepro100.ko
  • e100.ko
  • e1000/e1000.ko

USB Drivers

/kernel/drivers/usb/

  • host/uhci-hcd.ko
  • host/ohci-hcd.ko
  • core/usbcore.ko
  • host/ehci-hcd.ko
  • storage/usb-storage.ko
  • nput/hid.ko

SCSI Drivers

/kernel/drivers/scsi/

  • scsi_mod.ko
  • sg.ko
  • sd_mod.ko
  • st.ko
  • sr_mod.ko

To include these drivers in a client image, you must list the driver name and URI in the DriverIncludeList element. Conversely, to exclude a driver, you must list the driver in the DriverExcludeList element.

For example, to include network drivers but exclude the st.ko SCSI driver from a client image, you would define the DriverSpecifications element as follows:

<DriverSpecifications>
   <DriverIncludeList>
      <DriverSet Name="netdrivers">
         <ExplicitPath URI="/kernel/drivers/net/"/>
            <DriverList>
               <Driver Name="pcnet32.ko"/>    
               <Driver Name="mii.ko"/>
               <Driver Name="natsemi.ko"/>
               <Driver Name="tulip/tulip.ko"/> 
               <Driver Name="eepro100.ko"/>       
               <Driver Name="e100.ko"/>
               <Driver Name="e1000/e1000.ko"/>
            </DriverList> 
         </DriverSet>
      </DriverIncludeList>
   <DriverExcludeList>
      <Driver Name="st.ko"/>
   </DriverExcludeList>
</DriverSpecifications>

When working with parent and child documents, remember that DriverSpecifications settings in parent documents take precedence over child documents. That means the parent document can exclude any item that is in the include list of a child document or conversely, the parent document can include any item that is in the exclude list of a child document.

For more information on the DriverSpecifications element, see DriverSpecifications. For a sample Image Specification Document with a complete driver definition, see Section C.3.2, Defined ImageSpecification.xml Document.

Adding RPMs

The Novell Linux Point of Service XML schema allows you to include or exclude RPM packages from a client image. To include or exclude an RPM package, you must reference the RPM within a parent or child Image Specification Document. The RPMSpecifications element identifies the RPMs that you want to include or exclude from the image.

For example, Novell Linux Point of Service includes an RPM package for the VT100 terminal emulator. To include the VT100 terminal emulator in a client image, you must list the name of the RPM package in the RPMIncludeList element. You must also include the URI for a DistributionSource document that defines where the VT100 RPM is located and define the ImageClass.

NOTE:The ImageClass determines the type of image generated from the current Image Specification Document. The available image classes are NLD and SLES. In general, most Point of Service images are created using the NLD image class. The only images that require the SLES image class are POSBranch images.

To exclude an RPM package from a client image, you must list the name of the RPM package in the RPMExcludeList element.

The following example includes the VT100 terminal emulator package and excludes the SCSI package from a NLD-based client image:

<RPMSpecifications>
   <RPMIncludeList>
      <RPMSet>
         <RPMList>
            <RPM Name="vt100"/>
         </RPMList>
      </RPMSet>
   </RPMIncludeList>
   <RPMExcludeList>
      <RPM Name="scsi"/>
   </RPMExcludeList>
   <DistributionSource URI="/opt/SLES/POS/system/templates
      /Distribution.xml" ImageClass="NLD"/>
</RPMSpecifications>

When working with parent and child documents, remember that RPMSpecifications settings in parent documents take precedence over child documents. That means the parent document can exclude any item that is in the include list of a child document or conversely, the parent document can include any item that is in the exclude list of a child document.

For more information on the RPMSpecifications element, see RPMSpecifications. For information on the Distribution Source Document, see Section 9.2.3, Distribution Source Document (Distribution.xml). For a sample Image Specification Document, see Section C.3.2, Defined ImageSpecification.xml Document. For a sample Distribution Source Document, see Section C.4.2, Defined Distribution.xml Document.

Managing Users and Groups within an Image

The UserGroupSpecifications element within an Image Specification Document defines the users and groups that are created within the image. All users and groups that will be logging into the Point of Service terminals configured by the current image can be pre-defined within the image.

The UserGroupSpecifications settings in the parent document take precedence over settings in child documents.

This section outlines how to manage users and groups within the UserGroupSpecifications element.

For more information on the UserGroupSpecifications element, see UserGroupSpecifications.

Adding Users to an Image

To add a user to a client image, you must define the user account within the UserList element in the UserGroupSpecifications element. User attributes include the user name, encrypted password, userID, home directory, main group, and group associations.

NOTE:This EncrptedPassword value in the UserList element must be the encrypted password. You must use an encryption utility to encrypt the user account password before it can be used as the value for this attribute.

The following example creates a user account for Mandy Post in the client image:

<UserGroupSpecifications>
   <UserList>		
      <User Name="Mandy Post"
       EncryptedPassword="d41d8cd98f00b204e9800998ecf8427e"
       HasPassword="true" UserId="mpost" HomeDirectory="/home/mpost"
       MainGroup="Admin">
      <GroupAssociation Name="All"/>
      <GroupAssociation Name="Admin"/>
      </User>
   </UserList>
</UserGroupSpecifications>
Adding Groups to an Image

To add a group to a client image, you must define the group within the GroupList element in the UserGroupSpecifications element. Group attributes include the group name and ID.

The following example creates the All and Admin groups in the client image:

<UserGroupSpecifications>
   <GroupList>
      <Group Name="All" GroupId="001"/>
      <Group Name="Admin" GroupId="002"/>
   </GroupList>
</UserGroupSpecifications>
Managing the Root Account

The RootSettings element within the UseGroupSpecifications element allows you to manage the Root account for all Point of Service terminals configured with the current client image. Using the DisableRootAccess element, you can disable the Root account. Using the EncryptedRootPassword element, you can specify the encrypted password for the Root account.

NOTE:This EncrptedPassword value in the RootSettings element must be the encrypted password.

The following syntax in the Image Specification Document disables the Root user account:

<UserGroupSpecifications>
   <RootSettings DisableRootAccess="true"/>
</UserGroupSpecifications>

The following syntax in the Image Specification Document defines a password for the Root user account:

<UserGroupSpecifications>
   <RootSettings DisableRootAccess="false"
    EncryptedRootPassword="encrypted_password"/>
</UserGroupSpecifications>

IMPORTANT:The EncryptedRootPassword element is only valid if the Root account is enabled.

Changing the Image Language

To define the language deployed on the Point of Service terminal:

  1. Define the language in the Locale attribute. The Locale attribute contains a comma-separated list of valid locale names and is stored in the ImageSpecification element within the Parent Image Specification Document.

    For example, the following syntax sets the client image locale, time zone, and keytable to German:

    <ImageSpecification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/SLES/POS/ImageSpecification.xsd" SchemaVersion="1" SchemaRevision="1" ImageName="java" ImageVersion="2.0.21" Type="ext2" ImageType="diskful" Timezone="Europe/Berlin" Locale="en_US, de_DE" Keytable="de.map.gz">
    

    Novell Linux Point of Service provides support for the following locales:

    • de_DE (German)
    • en_US (US English)
    • es_ES (Spanish)
    • fr_FR (French)
    • it_IT (Italian)
    • ja_JP (Japanese)
    • ko_KR (Korean)
    • pt_PT (Portuguese)
    • zh_CN (Simplified Chinese)
    • zh_TW (Traditional Chinese)

    For more information on the ImageSpecification element, see ImageSpecification.

  2. Add the child Image Specification Documents required to support the client image add-on features for each language (other than English) designated in the Locale attribute. The child documents must be added to the parent Image Specification Document's IncludeSpecificationList element.

    NOTE:The English language files are included in the add-on feature image; therefore, they do not need to be separately added to the client image.

    For example, if de_DE is specified in the Locale attribute and the client image includes the Mozilla browser and GNOME desktop add-on features, you must include the German versions of gnome.xml and mozilla.xml as child documents in the parent document’s IncludeSpecifications element as follows:

    <IncludeSpecificationList>
       <IncludeSpecification URI="/opt/SLES/POS/system/templates
        /addons/gnome.xml"/>
       <IncludeSpecification URI="/opt/SLES/POS/system/templates
        /addons/mozilla.xml"/>
       <IncludeSpecification URI="/opt/SLES/POS/system/templates
        /locale/de_DE/gnome.xml"/>
       <IncludeSpecification URI="/opt/SLES/POS/system/templates
        /locale/de_DE/mozilla.xml"/>
    </IncludeSpecificationList>
    

    The locale Image Specification Documents are located in the /opt/SLES/POS/system/templates/locale/locale/ directories.

    Table 9-13 lists the child Image Specification Documents provided for each supported locale.

    Table 9-13 Image Specification Documents for supported locales

    /opt/SLES/POS/system/templates/locale/

     

     

    de_DE

    German Locale Documents

     

     

    gnome.xml

     

    This Image Specification Document provides the language files required to support the GNOME desktop in NLD-based client images.

     

     

    gnome-sles.xml

    This Image Specification Document provides the language files required to support the GNOME desktop in SLES-based images used for POSBranch.

     

     

    kde.xml

    This Image Specification Document provides the language files required to support the KDE desktop in NLD-based client images.

     

     

    kde-sles.xml

    This Image Specification Document provides the language files required to support the KDE desktop in SLES-based images used for POSBranch.

     

     

    mozilla.xml

    This Image Specification Document provides the language files required to support the Mozilla browser in Desktop or Browser client images.

     

     

    yast2.xml

    This Image Specification Document provides the language files required to support the YaST2 console in client images.

     

    es_ES

     

     

     

    Spanish Locale Documents

     

     

    gnome.xml

     

    This Image Specification Document provides the language files required to support the GNOME desktop in NLD-based client images.

     

     

    gnome-sles.xml

    This Image Specification Document provides the language files required to support the GNOME desktop in SLES-based images used for POSBranch.

     

     

    kde.xml

    This Image Specification Document provides the language files required to support the KDE desktop in NLD-based client images.

     

     

    kde-sles.xml

    This Image Specification Document provides the language files required to support the KDE desktop in SLES-based images used for POSBranch.

     

     

    yast2.xml

    This Image Specification Document provides the language files required to support the YaST2 console in client images.

     

    fr_FR

     

     

    French Locale Documents

     

     

    gnome.xml

     

    This Image Specification Document provides the language files required to support the GNOME desktop in NLD-based client images.

     

     

    gnome-sles.xml

    This Image Specification Document provides the language files required to support the GNOME desktop in SLES-based images used for POSBranch.

     

     

    kde.xml

    This Image Specification Document provides the language files required to support the KDE desktop in NLD-based client images.

     

     

    kde-sles.xml

    This Image Specification Document provides the language files required to support the KDE desktop in SLES-based images used for POSBranch.

     

     

    yast2.xml

    This Image Specification Document provides the language files required to support the YaST2 console in client images.

     

    it_IT

     

     

    Italian Locale Documents

     

     

    gnome.xml

     

    This Image Specification Document provides the language files required to support the GNOME desktop in NLD-based client images.

     

     

    gnome-sles.xml

    This Image Specification Document provides the language files required to support the GNOME desktop in SLES-based images used for POSBranch.

     

     

    kde.xml

    This Image Specification Document provides the language files required to support the KDE desktop in NLD-based client images.

     

     

    kde-sles.xml

    This Image Specification Document provides the language files required to support the KDE desktop in SLES-based images used for POSBranch.

     

     

    yast2.xml

    This Image Specification Document provides the language files required to support the YaST2 console in client images.

     

    ja_JP

     

     

     

    Japanese Locale Documents

     

     

    browser.xml

    This Image Specification Document provides the language files required to support the NLD-based Browser image.

     

     

    browser-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Browser image.

     

     

    desktop.xml

    This Image Specification Document provides the language files required to support the NLD-based Desktop image.

     

     

    desktop-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Desktop image.

     

     

    gnome.xml

     

    This Image Specification Document provides the language files required to support the GNOME desktop in NLD-based client images.

     

     

    gnome-sles.xml

    This Image Specification Document provides the language files required to support the GNOME desktop in SLES-based images used for POSBranch.

     

     

    java.xml

    This Image Specification Document provides the language files required to support the NLD-based Java image.

     

     

    java-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Java image.

     

     

    kde.xml

    This Image Specification Document provides the language files required to support the KDE desktop in NLD-based client images.

     

     

    kde-sles.xml

    This Image Specification Document provides the language files required to support the KDE desktop in SLES-based images used for POSBranch.

     

     

    mozilla.xml

    This Image Specification Document provides the language files required to support the Mozilla browser in Desktop or Browser client images.

     

     

    yast2.xml

    This Image Specification Document provides the language files required to support the YaST2 console in client images.

     

    ko_KR

     

     

    Korean Locale Documents

     

     

    browser.xml

    This Image Specification Document provides the language files required to support the NLD-based Browser image.

     

     

    browser-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Browser image.

     

     

    desktop.xml

    This Image Specification Document provides the language files required to support the NLD-based Desktop image.

     

     

    desktop-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Desktop image.

     

     

    java.xml

    This Image Specification Document provides the language files required to support the NLD-based Java image.

     

     

    java-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Java image.

     

     

    mozilla.xml

    This Image Specification Document provides the language files required to support the Mozilla browser in Desktop or Browser client images.

     

     

    yast2.xml

    This Image Specification Document provides the language files required to support the YaST2 console in client images.

     

    pt_PT

     

     

     

    Portuguese Locale Documents

     

     

    gnome.xml

     

    This Image Specification Document provides the language files required to support the GNOME desktop in NLD-based client images.

     

     

    gnome-sles.xml

    This Image Specification Document provides the language files required to support the GNOME desktop in SLES-based images used for POSBranch.

     

     

    kde.xml

    This Image Specification Document provides the language files required to support the KDE desktop in NLD-based client images.

     

     

    kde-sles.xml

    This Image Specification Document provides the language files required to support the KDE desktop in SLES-based images used for POSBranch.

     

    zh_CN

     

    Simplified Chinese Locale Documents

     

     

    browser.xml

    This Image Specification Document provides the language files required to support the NLD-based Browser image.

     

     

    browser-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Browser image.

     

     

    desktop.xml

    This Image Specification Document provides the language files required to support the NLD-based Desktop image.

     

     

    desktop-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Desktop image.

     

     

    gnome.xml

     

    This Image Specification Document provides the language files required to support the GNOME desktop in NLD-based client images.

     

     

    gnome-sles.xml

    This Image Specification Document provides the language files required to support the GNOME desktop in SLES-based images used for POSBranch.

     

     

    java.xml

    This Image Specification Document provides the language files required to support the NLD-based Java image.

     

     

    java-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Java image.

     

     

    kde.xml

    This Image Specification Document provides the language files required to support the KDE desktop in NLD-based client images.

     

     

    kde-sles.xml

    This Image Specification Document provides the language files required to support the KDE desktop in SLES-based images used for POSBranch.

     

     

    yast2.xml

    This Image Specification Document provides the language files required to support the YaST2 console in client images.

     

    zh_TW

     

     

    Traditional Chinese Locale Documents

     

     

    browser.xml

    This Image Specification Document provides the language files required to support the NLD-based Browser image.

     

     

    browser-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Browser image.

     

     

    desktop.xml

    This Image Specification Document provides the language files required to support the NLD-based Desktop image.

     

     

    desktop-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Desktop image.

     

     

    gnome.xml

     

    This Image Specification Document provides the language files required to support the GNOME desktop in NLD-based client images.

     

     

    gnome-sles.xml

    This Image Specification Document provides the language files required to support the GNOME desktop in SLES-based images used for POSBranch.

     

     

    java.xml

    This Image Specification Document provides the language files required to support the NLD-based Java image.

     

     

    java-sles.xml

    This Image Specification Document provides the language files required to support the SLES-based Java image.

     

     

    kde.xml

    This Image Specification Document provides the language files required to support the KDE desktop in NLD-based client images.

     

     

    kde-sles.xml

    This Image Specification Document provides the language files required to support the KDE desktop in SLES-based images used for POSBranch.

     

     

    yast2.xml

    This Image Specification Document provides the language files required to support the YaST2 console in client images.

Setting Image Configuration Settings

The current Novell Linux Point of Service XML schema allows you to configure the following image settings within the ImageSpecification element in the ImageSpecification.xml document:

  • Image Name
  • Schema Version
  • Schema Revision
  • Image Type (diskful or diskless)
  • Image Version
  • Add-on Size
  • File System Type (ext2 or ext3)
  • Time Zone
  • Console Keymap

For an explanation of each setting, see ImageSpecification.

The following syntax in the Image Specification Document creates the Java 2.0.21 diskful image with an ext2 file system. The image time zone is Mountain Standard time, the locale is US English, and the console keymap is US.

NOTE:xscr replaces the ImageName and ImageVersion attributes with the name specified on the command line when the Image Description Tree is generated.

<ImageSpecification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/SLES/POS/ImageSpecification.xsd" SchemaVersion="1" SchemaRevision="1" ImageName="java" ImageVersion="2.0.21" Type="ext2" ImageType="diskful" Timezone="US/Mountain" Locale="en_US" Keytable="us.map.gz">

9.4.3 Configuring the Image

Configuring an image means adapting it for a specific hardware environment. This includes activating and deactivating services, setting up special Post-install scripts, adding standard configuration files and setting the time zone.

The following sections review these image configuration options:

Including Fixed Configuration Files

A fixed configuration is a configuration file that provides information for a service that is hardware independent. Fixed configuration files are stored in the Image Description Tree under the files-user subdirectory.

The following instructions illustrate how to add the fixed configuration file, /etc/sysconfig/hotplug, to the Image Description Tree, /opt/SLES/POS/system/myImage-1.1.1:

  1. Go to the source/files-user directory of the image:

    cd /opt/SLES/POS/system/myImage-1.1.1/files-user
    
  2. Create the directory structure according to the original system location of the configuration file:

    mkdir -p etc/sysconfig
    
  3. Create the configuration file within the files-user tree.

    In this case, simply copy the file from the real system to the image tree:

    cp /etc/sysconfig/hotplug etc/sysconfig
    

The file tree within files-user is completely copied to the image when it is generated. For more information on the files-user directory, see Section 9.2.1, Image Description Tree

Using Data Images to Manage External Configuration Files

A data-only image is an ext2 image file that contains 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. However, it can be used to add external configuration files to a Point of Service terminal.

If a disk-based system is booting and the IMAGE parameter 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.

The advantage of using data images to add external configuration files to a Point of Service terminal is that the data image is controlled in the same way as the client image. This means you can manage, modify and refresh the configuration files independent of the client image.

IMPORTANT:To implement this functionality, you must manually modify the config.MAC_address file for each Point of Service terminal that you want to load the data image. However, when you run posAdmin --updateconfig or posldap2crconfig.pl --dumpall to refresh the config.MAC_address files on the Branch Server, these modifications are overwritten. Therefore, to maintain the functionality, you must manually reconfigure the config.MAC_address files each time you regenerate them. For more information on the posldap2crconfig.pl command, see Section A.3.5, posldap2crconfig.pl. For more information on the posAdmin --updateconfig command, see Section 6.9, Updating config.MAC_address and Hardware Configuration Files.

The following instructions illustrate how to manage external configuration files with a data image:

  1. Create a temporary directory that contains the data.

    mkdir /tmp/mydata
    
  2. Create the directory structure according to the original system location of the configuration file below this data directory and apply your configurations.

    mkdir -p /tmp/mydata/etc/X11
    vi /tmp/mydata/etc/X11/XF86Config
    
  3. Create a data image.

    xscr --create-data-image /tmp/mydata \
        --image mydata-2.0.21 --destdir /tmp/myDataDirectory
    

    This call creates the data image, mydata-2.0.21, and the referring MD5 sum in /tmp/myDataDirectory/.

  4. Copy the image to the /opt/SLES/POS/rsync/image/ directory on the Administration Server.

    IMPORTANT:The data image must be copied to the /opt/SLES/POS/rsync/image directory on the Administration Server before the Branch Server can distribute it to Point of Service terminals.

  5. To activate the data image, add the data image to the IMAGE parameter in the config.MAC_Address file.

    The IMAGE entry might appear as follows:

    IMAGE=/dev/hda2;minimal;1.1.8;192.168.100.1;1024,
          /dev/ram2;mydata;2.0.21;192.168.100.1;1024
    

    IMPORTANT:To ensure the contents of the data image are copied to the system, the image must be downloaded to a /dev/ramx device.

With the data image listed as an IMAGE entry in the config.MAC_address file, the data image contents are copied to the Point of Service terminal after the data image has been downloaded to /dev/ram2.

To update the data image on the Point of Service terminal, do the following:

  1. Generate a new version of the data image.

  2. Copy the new data image version to the /opt/SLES/POS/rsync/image/ directory on the Administration Server.

  3. Run possyncimages.pl to download the image to the Branch Server.

  4. Modify the IMAGE entry in the config.MAC_Address file to reflect the data image’s new version number.

Enabling DMA on Point of Service Terminal CD Drives

Setting up a Direct Memory Access (DMA) channel for the CD drive on your Point of Service terminals speeds up the process of booting and loading an image from CD. The CDBoot image template provided with Novell Linux Point of Service includes the RPM package (hdparm) required to enable DMA so that the DMA channel is configured when the terminal boots from CD. However, if you would like DMA to be enabled beyond the initial install, you must add the DMA feature to the client image.

To add DMA functionality to a client image:

  1. Add the hdparm package to the RPMIncludeList element in the Image Specification Document as follows:

    <RPMSpecifications>
       <RPMIncludeList>
          <RPMSet>
             <RPMList>
                <RPM Name="hdparm"/>
             </RPMList>
          </RPMSet>
       </RPMIncludeList>
       <DistributionSource URI="/opt/SLES/POS/system/templates
        /Distribution.xml" ImageClass="NLD"/>
    </RPMSpecifications>
    

    NOTE:The CDBoot Image Specification Document includes the hdparm RPM package by default.

  2. Add the CD device (usually /dev/hdc) to the DEVICES_FORCE_IDE_DMA flag in the /etc/sysconfig/ide file. For example:

    DEVICES_FORCE_IDE_DMA="/dev/hdc:on"
    
  3. Provide a way for the /etc/sysconfig/ide file to be deployed on the Point of Service terminal.

    This can be accomplished in one of two ways:

  4. Build the image.

    For more information on this procedure, see Section 9.4.4, Building the Image.

Activating and Deactivating System Services

System services are activated or deactivated in the config.system file by using the insserv command to set or remove links.

To activate a service, add the following line to the config.system file:

sbin/insserv /etc/init.d/service

To deactivate a service, add the following line to the config.system file:

sbin/insserv -r /etc/init.d/service

For more information on the config.system file, see Section 9.2.1, Image Description Tree.

Writing Post-Install Scripts

A Post-install script is always bound to a package from the setup file and is usually used to remove items from the package that are not needed for the image. This type of script must have the same name as the corresponding package and is stored in the script directory of the Image Description Tree (opt/SLES/POS/system/image_name-version/script/). The script itself is called within the image environment, which means it is not possible to damage the host system with your script even if you are using absolute paths.

A Post-install script uses the following format:

\#!/bin/sh
echo -n "Image [image_name_version]..."
test -f /.profile \&\& . /.profile

... script code

echo done

image_name-version is the name of the image to which this script belongs.

For more information on the script directory, see Section 9.2.1, Image Description Tree.

9.4.4 Building the Image

xscr builds images using an Image Specification Document (ImageSpecification.xml) and a Distribution Source Document (Distribution.xml). These documents perform the same function as the IMAGE, VERSION, config, setup, and setup.user files in the Image Description Tree. They contain XML elements that define the structure, configuration files, and other components required to build client images.

If the Image Specification file is complete and located at the root of the Image Description Tree (/opt/SLES/POS/system/image_name-version/), you can generate the corresponding client image.

For example, the following xscr command creates the XML Desktop image with the version 2.0.6 in the working directory myImages and verifies the RPMs (type the command all on one line):

xscr --prepare --image desktop-2.0.6 --nostrict --build 
--destdir myImages --verify

IMPORTANT:xscr only maintains 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. If you want to maintain more than five versions of a single image, you must maintain them in separate directories.