Page 1
Red-Paper: POS/Retail Project SUSE LINUX Retail Solution 8 (SLRS 8) Admin Guide F. Balzer, S. Duehr, T. Franke, R. Oertel, G. Rieger, M. Schaefer, A. Schmidt SUSE LINUX AG, Nuernberg May 3, 2006 Revision: 1275...
1 Introduction The SUSE LINUX Retail Solution 8 (SLRS 8) for Point of Sale (POS) Retail Systems is based on the SUSE LINUX Enterprise Server 8 (SLES 8) and pro- vides a complete SUSE LINUX operating system and management solution for POS Cash Register Systems (CR).
Page 8
1 Introduction Building and Maintaining POS Images — Chapters 8, 10, These chapters summarize all information about how to build and distribute custom POS images. Autobuild Branch Server — Chapter 13: Description for SLRS experts of how to prepare a CD boot media for automatic branch server installa- tion.
2.1 Administration Server RSYNC: An rsync server is used for software distribution and provides the POS system images and software updates to the BS systems. LDAP: The AS is the master LDAP directory server for the BS systems. XNTP: The BS xntp system can access the AS for time synchronization SYSLOG: The AS consolidates the syslog output from the BS.
Page 12
2 Architectural Overview servers, cash registers, and network infrastructure. Using posAdmin, the fol- lowing POS Data LDAP entries can be managed: organizational unit branch hardware type MAC address IP address (optional) debug mode OS Image name Cash registers can be created, deleted, and assigned specific operating system images.
Page 13
2.1 Administration Server POS Image Creation Images are created from SLRS or SLES standard packages and additional Ser- vice Pack packages using the SLRS imageBuilder software. For more detailed information, refer to Chaper on page 99. Figure describes the image creation process.
2 Architectural Overview Local Package Lists: It defines site and customer–specific packages from SLRS and SLES that are added to the POS system image. Application: Packages and start command. 2.2 Branch Server The branch server (BS) provides the network boot and system management infrastructure for the POS systems as well as a generic system platform for in- store applications, like database systems and back-ends for the cash register applications.
2.2 Branch Server 2.2.3 Administration No system administration other than emergency handling is necessary on the BS. All administrative tasks are controlled from the central AS and are ex- ecuted regularly by scripts run by the cron scheduler. For emergencies and debugging, all functionality can be triggered locally or via SSH login by call- ing scripts with no or few command line parameters.
2 Architectural Overview 2.3 Cash Register The cash registers (POS) are specialized systems based on an x86 32-bit ar- chitecture. Some are diskless systems and some have internal hard drives or other persistent media (flash drive or other) that can be used for application data or the operating system.
2.3 Cash Register Minimal Operating System "Image 1" The minimal image only contains the runtime environment for native code ap- plications (e.g., C, C++) and the “ncurses” library for user interface support. Java-capable Operating System "Image 2" In addition to the minimal system, the capability to run java programs in a Java2 runtime environment is provided.
2 Architectural Overview 2.3.4 Boot Process The POS operating system may consist of several images. The file systems that may be mounted read-only can be stored in cramfs-compressed RAM file systems to save POS RAM resources. A special CR configuration file, which contains information like image name and BS IP address for the application, is loaded from the BS server TFTP directory.
2.3 Cash Register 2.3.5 Graphical Display Configuration The graphics controller depends on the model type, so it can be derived from static tables. Displays that can be probed for their capabilities can be attached to POS terminals with different model types. Each POS terminal and each model type has an LDAP entry that can specify the XF86Config file to download at boot time.
3 Quick Start Guide Contents 3.1 Installation Process ..... . 22 3.2 Installation of the Administration Server ..23 3.2.1 Updating the SLRS Base Software .
3 Quick Start Guide 3.1 Installation Process To install the SLRS, complete the following tasks: Install the administration server (AS) Install the OEM Hardware vendor CD (AS) Configure the central LDAP directory (AS) Add store and branch information to LDAP (AS) Enable the POS Images on the AS Install the branch server (BS) for each store Configure the BS...
3.2 Installation of the Administration Server 3.2 Installation of the Administration Server The SLRS software contains 7 CDs, 2 SLRS CD, 3 CDs for United Linux and 2 Service Pack CDs. The installation starts, booting from the first CD (SLRS CD1).
Page 24
3 Quick Start Guide Expert: Click the headline Partitioning to change the YaST default set- tings. Furthermore please note, that in some cases YaST will not delete ex- isting partitions. Herefore select the option "Create custom partition setup". For further information refer to the SUSE LINUX documentation. Click the headline Software to change the Installation Settings and select one of the two possibilities: –...
3.2 Installation of the Administration Server Click the headline Network interfaces when prompted and configure the network interface , for example, eth0. Enter the IP address, such as 192.168.2.254, and the Network Mask, in a format like 255.255.255.0. – Configure the Host Name, for example, as1 –...
3 Quick Start Guide Figure 3.2: YaST2 Control Center Execute: /media/cdrom/install_update_rpms.sh umount /media/cdrom Eject the Service Pack CD. Note: The install scripts for updating RPMs are hard-coded to use /media/cdrom. If your CD-ROM drive uses a different name to mount (such as /media/cdrecorder), enter the following commands to create a link to the CD: cd /media ln -s cdrecorder cdrom...
3.2 Installation of the Administration Server Enter [ldap administrator password], such as secret Select (y/n) to enable or disable SSL (Secure LDAP) A summary of the LDAP directory data based on your input appears. If all data is correct, hit the ENTER key. The POS LDAP base structure has now been initialized on the AS.
Page 28
3 Quick Start Guide Figure 3.3: IRES Installation Menu Log in as root. Insert the Vendor CD for SLRS into the CD drive. Execute the command: mount /media/cdrom Start the install script: /media/cdrom/install Select item 1 Install/Update Administrative Server Select < OK > to start the installation. Start the install script again: /media/cdrom/install Select item 3 Install/Update Image Builder system Select <...
3.2 Installation of the Administration Server 3.2.4 Adding a New Branch to LDAP The POS system manufacturer will provide a script to add the information about a new branch to the LDAP directory. For information, refer to the POS system manufacturer hardcopy documenta- tion or the documentation on the OEM vendor CD.
Page 30
3 Quick Start Guide provides several POS images, which will be installed during the AS installa- tion. POS images are the software that is run on the POS clients. These should not be confused with the boot image and operating system image each POS client needs to receive after it is powered on.
3.3 Installation of the Branch Server cp /opt/SLES/POS/image/java-1.1.2-2003-12-03 \ /opt/SLES/POS/rsync/image/java-1.1.2 Copy the Java Image MD5 check sum file: cp /opt/SLES/POS/image/java-1.1.2-2003-12-03.md5 \ /opt/SLES/POS/rsync/image/java-1.1.2.md5 Congratulations! You have installed your Administration Server. 3.3 Installation of the Branch Server Note: Install the administration server before proceeding with this sec- tion.
Page 32
3 Quick Start Guide Select "New installation". Both other options will abort the SLRS instal- lation. Option "Boot installed system" will try to boot an OS from the primary hard disk drive. Expert: Click the headline Partitioning to change the YaST default set- tings.
3.3 Installation of the Branch Server – Configure Host Name, for example, bs1 – Set Domain Name, such as store1.berlin.mycompany.mycorp.us Note: It is very important to choose the same host name, domain name, and IP address as defined in the LDAP database of the admin- istration server.
3 Quick Start Guide Online Update . For detailed information about executing the YaST Update, refer to the SUSE LINUX documentation. Note: If you are using a non-graphical system environment, only YaST can be used. Furthermore the update can be done manually by mounting the Service Pack CD and calling the install_update_rpms.sh script, as described below: Log in as root.
Page 35
3.3 Installation of the Branch Server Figure 3.5: IRES - Install/Update Branch Server Option Right click CD-ROM Icon and select the option Eject, to eject the Vendor CD again. If you are using a non-graphical system environment execute the following steps: Log in as root.
3 Quick Start Guide 3.3.3 Configuration of the Branch Server Note: Update the branch server software with United Linux Service Pack 3 CD before proceeding with this section. Expert: This guide skips the HA service configuration. For information, refer to Section 5.3.4 on page 66.
3.3 Installation of the Branch Server – ls /tftpboot/boot – ls /tftpboot/images According to the example in Section 3.2.6 on page 30, the disknet boot image and a java POS image should now be available on the BS. Verify the LDAP settings, with the available POS images located below the path /tftpboot/images.
3 Quick Start Guide Congratulations! You have installed your branch server. 3.4 Test your SLRS System Environment To complete the steps of the SLRS installation process, as described in Section on page 22, you have to verify the installation by booting at least one POS client attached to the previously installed branch server.
Page 39
3.4 Test your SLRS System Environment Figure 3.6: Dependences between LDAP, tftpboot directory and POS Client...
Page 40
3 Quick Start Guide scPosImageVersion attribute of the POS image associated to your POS client. For further information how to activate POS images with PosAdmin refer to Section on page 95. Power on the POS client. Experts: Optionally watch the log messages of the branch server using the command tail -f /var/log/messages.
Page 41
3.4 Test your SLRS System Environment Address> and the corresponding directory will be written for this new CR below the /tftpboot/CR directory of the branch server, for example, the file config.00:06:29:E3:02:E6 and the directory 00:06:29:E3:02:E6. The newly registered POS client can be found in LDAP of the admin- istration server, for example, POS01.
4 Server Structure be able to be maintained fault-free for several hours in the event of loss of link. That means that this rigorously centralized structure must also function decentrally and potential server failures must also be taken into account. 4.2 Architecture There is a central administration server and a branch server in each branch or office.
Page 45
4.3 LDAP Structure Figure 4.1: LDAP Structure listed in the Appendix. The core scripts only search through the names of the object classes. The common name for an entry is not used. The origin of the LDAP directory is an objectClass: organization that is intended to depict a parent corporation, for example.
Page 46
4 Server Structure Operating system images (objectClass: scPosImage) objectClass: scLocation, cn=headquarter corresponds in structure to the branches described below, except here it deals with the central adminis- tration server in a central location. objectClass: organizationalUnit, cn=berlin (Example) These organiza- tional units are used to structure the branches and offices into regions. They were introduced to improve organizational coherence.
4.4 Server Configuration and Server Services The procedure is similar for CR hardware. Here, in addition to the referenced hardware type (through attribute scRefPcDn to a scCashRegister object), a reference image is pointed to via scPosImageDn to a scPosImage object. The scRefObjectContainer container objects should, by definition, always have cn=global and also appear only once per directory level.
4 Server Structure TFTP Server Structure The TFTP server directory structure is divided into the following main areas under the tftp_root directory: Image configurations The /tftpboot/CR/ directory contains the various config. MAC Address image configuration files. Configuration files The /tftpboot/CR/ MAC Address / directory contains the various sys- tem configuration files, such as XF86config.
4.5 POS Scripts contain the prefix pos, so a quick overview of the available programs can be displayed using tab completion. It is recommended to use the directory /opt/SLES/POS/bin as the storage location for the POS scripts. All the scripts can be controlled transparently using the posadmin metascript, as long as they are not run by cron.
4 Server Structure type is specified as a reference to a scPosImage object in the at- tribute scPosImageDn (which points to the reference image in the global container). The information about the reference hardware and image are then added to the scWorkstation object as distin- guished names (dn) and the attributes are named scRefPcDn and scPosImageDn.
4.6 Cash Register Images 4.6.1 Distributing Images New or updated images are pulled from the individual branch servers by a script (working title: posImageTrans.pl) using RSYNC. This procedure can be triggered in two ways: The script is started locally on a branch server by an administrator. The script is started locally on a branch server by a cronjob.
5 Setting up Administration and Branch Servers Contents 5.1 Installation of the Administration Server ..55 5.1.1 Partitioning ..... . . 5.1.2 Software Selection .
5 Setting up Administration and Branch Servers We recommend a machine with a least a 1 GHz Pentium III, at least 30 GB of available disk space, and at least 512 MB of RAM. The administration server software is part of the SUSE LINUX Retail Solution (SLRS) 8 CD set, which is based on the SUSE LINUX Enterprise Server (SLES) 8.
Page 57
5.1 Installation of the Administration Server "SLRS POS/Retail Branch and Admin server Minimum System" "SLRS Admin server Image Building System" and - depending on the requirements of the system - any of the following: KDE Desktop Environment LSB Runtime Environment Help &...
5 Setting up Administration and Branch Servers 5.1.3 Updating The actual version of the SLRS 8 is based on the SLES/UL Service Pack 3 and needs to be updated with the United Linux Service Pack 3 CD1 from the SLRS 7-CD Set. To initiate the update insert the Service Pack CD into the CD drive of the AS, mount the CD and call the install_update_rpms.sh script, as described below: mount /media/cdrom...
Page 59
5.1 Installation of the Administration Server ldapsearch command or a GUI-based LDAP browser, such as GQ. For further information about LDAP, refer to the corresponding manual pages. The values o= and c= depend on your configuration. For example: ldapsearch -x -h localhost -b cn=global,o=mycorp,c=de The necessary GQ configuration to access the LDAP server is shown in the example below: General settings:...
5.2 Installation of the Branch Server 5.2 Installation of the Branch Server The following sections describe the key requirements and steps for installing and configuring the branch server. This section is intentionally brief. For detailed information, refer to your hardcopy SUSE Linux documentation, or the SUSE Linux documentation on your installation CD, or the speed-start SLRS installation procedure described in Chapter on page 21.
5 Setting up Administration and Branch Servers deployed - ‘java´ and ‘browser´ images require only about 150MB per image, whereas the ‘desktop´ image is over 700MB in size. You should have space for 2-3 generations of images in /tftpboot. 5.2.2 Software Selection Using the module "Software"...
5.2 Installation of the Branch Server IP Address 10.0.0.1 Netmask 255.255.255.0 Table 5.4: Network Configuration of eth0 on the Branch Server IP Address 192.168.2.1 Netmask 255.255.255.0 Host Name Domain Name berlin1.berlin.mycompany.mycorp.de Name Server 127.0.0.1 Table 5.5: Network Configuration of eth1 on the Branch Server To configure eth1 (the NIC for the external connection to the administration server), enter the values shown in Table on page 63.
5 Setting up Administration and Branch Servers 5.2.4 Configuration Before starting the configuration of the branch server, check the network set- tings. Note: It is very important to choose the same host name, domain name, and IP address as defined in the LDAP database of the administration server.
5.3 Installation of the Highly Available Branch Servers Finally the core script posleases2ldap which registers new CRs in LDAP, and controlls all other POS scripts needs to be started. For further information about testing your newly installed SLRS system envi- ronment refer to Section on page 38.
5 Setting up Administration and Branch Servers During the configuration of the network settings, configure two interfaces in addition to the public interface. Using two networks from the private range is suggested, for example: node1: eth0 192.168.1.1 node2: eth0 192.168.1.2 (public network) node1: eth1 192.168.10.1 node2: eth1 192.168.10.2 (DRBD connect) node1: eth2 192.168.100.1 node2: eth2 192.168.100.2 (Heartbeat connect)
5.3 Installation of the Highly Available Branch Servers 5.3.5 DRBD Configuration SUSE provides templates of the needed configuration files. Here, use the file drbd.conf. Initially, adapt a few settings. Later, other parameters should be changed for fine tuning. Adapt the following settings: disk-size to the size of your DRBD partition And in the section on bs1 and on bs2: bs1 and bs2 to the host names of your servers given by uname -n...
5 Setting up Administration and Branch Servers Change the primary node2 to node1 again with "drbdsetup /dev/nb0 secondary" on node2 and issue "drbdsetup /dev/nb0 primary" on node1 Delete the test data You have now finished the preparation of DRBD. 5.3.6 Heartbeat Configuration Adapt the configuration file templates delivered by SUSE: File ha.cf: Change the entries node bs1 and node bs2 to match the names of your servers given by "uname -n", for example, to node servername1.
5.3 Installation of the Highly Available Branch Servers 5.3.8 Final Setup Now prepare the services actually used in the SUSE LINUX Retail Solution infrastructure. Provide failover for the services dhcpd, named, and tftpd. All data that is necessary for the services must be moved to the mirrored di- rectory /drbd and must be linked to the locations where the daemons expect the data.
5 Setting up Administration and Branch Servers Reboot both servers and check the replication of the /drbd directory from the primary node to the secondary as described previously. Check the correct operation of the services and the HA setup. Make sure that DNS names, like tftp, are resolved to the virtual IP address of your HA cluster.
6.2 posInitBranchserver.sh 6.1.3 Files /etc/openldap/ldap.conf /etc/openldap/slapd.conf /etc/opt/SLES/POS/template/slapd.conf.template /etc/init.d/ldap /etc/opt/SLES/POS/template/ldap.template /etc/opt/SLES/POS/template/ldif.pos.template 6.2 posInitBranchserver.sh The purpose of posInitBranchserver.sh is the generation of the central con- figuration file for all other POS scripts used on a branch server, the generation of header files needed for automated configuration of DNS and DHCP, the generation of configuration files for the DNS and DHCP services, adding a multicast route for TFTP, the activation of the services DNS, DHCP, and TFTP at boot time, and starting the services at once.
6 Server Commands 6.2.2 Usage Run posInitBranchserver.sh on a branch server. 6.2.3 Files /etc/opt/SLES/POS/named/named.conf /etc/opt/SLES/POS/template/dhcpd.conf.header.template /etc/opt/SLES/POS/dhcpd/dhcpd.conf.header /etc/opt/SLES/POS/template/dns-zonefile.header.template /var/named/ldap_generated/dns-zonefile.header /etc/opt/SLES/POS/template/resolv.conf.template /etc/resolv.conf /etc/sysconfig/network/routes 6.3 possyncimages.pl The script possyncimages.pl must be run on a branch server for fetching or updating the images from the administration server. It uses rsync and requires that the rsync service is properly configured and running on the administra- tion server.
6.4 posldap2crconfig.pl 6.4 posldap2crconfig.pl posldap2crconfig.pl creates configuration files for CRs. Those config files are generated by gathering data from LDAP and they contain information needed by the CR at boot time about image, configuration files, partitioning and disk. 6.4.1 Function In normal operation, posldap2crconfig.pl does a part of what is done by posleases2ldap.pl: It looks for hwtype.<MAC-address>...
6 Server Commands 6.5.2 Usage In normal operation, posleases2ldap.pl is run as a daemon. It can be started by using the init script /etc/init.d/posleases2ldap, which is also used to start the daemon at boot time. To enable this, use chkconfig posleases2ldap If posleases2ldap.pl is started manually, it backgrounds itself immediately.
6.7 posldap2dhcp.pl /var/named/ldap_generated/ /var/named/ldap_generated/dns-zonefile.header /var/named/ldap_generated/named.zones /etc/named.conf 6.7 posldap2dhcp.pl posldap2dhcp.pl generates the DHCP daemon configuration file from LDAP. 6.7.1 Function posldap2dhcp.pl is called by posleases2ldap.pl at regular intervals. First, all scLocation objects are looked up in LDAP. Each of these objects defines a subnet and for each of them a subnet declaration in the dhcpd.conf is gener- ated.
6 Server Commands 6.8.1 Function posReadPassword.pl is called by posInitLdap.sh and posInitBranchserver. sh for password entry purposes. 6.8.2 Usage From within shell scripts, use a line like PASSWORD=‘posReadPassword.pl‘ 6.8.3 Files none 6.9 poscheckip.pl poscheckip.pl is a helper script to look up a server’s IP address in LDAP and output the netmask and domain name related to that entry.
7 PosAdmin --base o=mycorp,c=de --base ou=berlin,o=mycorp,c=de In some cases, you can also set an abbreviation or a common name for the base. This is only possible if the common name is a unique value in the database. --base hamburg If posAdmin cannot determine the base — no or more than one base is found —...
Page 81
7.2 Basic Actions Attribute Type Explanation --ou must This is the name of the organizational unit, for example, berlin. --userPassword Linux password --searchGuide This attribute is only for use by X.500 clients in constructing search filters. --seeAlso This attribute specifies names of other directory objects and is used as a pointer to a related directory entry.
7 PosAdmin This will create a directory "ou=berlin,o=mycorp,c=de". Use only uppercase or lowercase letters or numbers. If desired, add a description by adding the following attribute value pair to the command above: --description ’a description of the city’ The Table on page summarizes all LDAP attributes of the object class organizationalUnit.
Page 83
7.2 Basic Actions Attribute Type Explanation --cn must This is the common name of the location. --ipNetworkNumber must This is the network address of the subnet of the branch, for example, 192.168.1.0. --ipNetmaskNumber must This is the netmask of the subnet of the branch, for example, 255.255.255.0.
Page 84
7 PosAdmin posAdmin.pl --user cn=admin,o=mycorp,c=de \ --password secret \ --base cn=server,cn=habor,ou=berlin,o=mycorp,c=de \ --add --scBranchServer --cn bs Now add a network interface card with a static IP address from the subnet already defined. This is a scNetworkcard object with the must attributes -- scDevice and --scIpHostNumber.
Page 86
7 PosAdmin Attribute Type Explanation --cn must This is the common name of the service. --ipHostNumber must This is the existing IP address assigned to a network interface card. --scDnsName must This is the DNS Name of the service, which will be created by the posldap2dns.pl script.
Page 87
7.2 Basic Actions posAdmin.pl --user cn=admin,o=mycorp,c=de \ --password secret \ --base cn=bs2,cn=server,cn=habor,ou=berlin,o=mycorp,c=de \ --add --scNetworkcard --scDevice eth0 --ipHostNumber 192.168.1.2 ## eth1 for bs2 posAdmin.pl --user cn=admin,o=mycorp,c=de \ --password secret \ --base cn=bs2,cn=server,cn=habor,ou=berlin,o=mycorp,c=de \ --add --scNetworkcard --scDevice eth1 --ipHostNumber 192.168.0.2 Now add, the services DNS, TFTP, and DHCP as highly available services. A description of all scHAService attributes is shown in Table on page 88.
Page 88
7 PosAdmin posAdmin.pl --user cn=admin,o=mycorp,c=de \ --password secret \ --base cn=bs2,cn=server,cn=habor,ou=berlin,o=mycorp,c=de \ --add --scHAService --cn dns --ipHostNumber 192.168.1.3 \ --scDnsName dns --scServiceName dns \ --scServiceStartScript named \ --scServiceStatus TRUE --scPrimaryService FALSE; ## TFTP on bs2 as backup service posAdmin.pl --user cn=admin,o=mycorp,c=de \ --password secret \ --base cn=bs2,cn=server,cn=habor,ou=berlin,o=mycorp,c=de \ --add --scHAService --cn tftp --ipHostNumber 192.168.1.4 \...
7.2 Basic Actions 7.2.5 Modify The modify basic option enables you to modify attributes of an object, to add a may attribute to an object, or to delete a may attribute. If an operation is not finished successfully, get an error message. To add or to modify attributes, specify the object, an attribute value pair, and a DN.
7 PosAdmin 7.2.6 Remove To remove an object from the database, you need the basic option --remove, the option --DN, and, as the attribute, the distinguished name of the object to delete. If the referred object has subentries, you also need the --recursive option.
--dnList must A list distinguished names limited colons (’:’). example, --cn=crtype3,cn=global,o=mycorp,c=us: cn=CR001,cn=branch,ou=berlin,o=mycorp,c=de. Valid object types are scPosImage, scCashRegister, scConfigFileTemplate, scConfigFileSyncTemplate and scWorkstation Table 7.10: Update Config Options for PosAdmin a) Update all configuration files on clients that use the scCashRegister object "cn=crtype3,cn=global,o=novell,c=us":...
7 PosAdmin posAdmin.pl --password secret \ --user cn=admin,o=mycorp,c=de \ --base ou=berlin,o=mycorp,c=de \ --updateconfig --dnList cn=crtype3,cn=global,o=novell,c=us b) Update all configuration files on clients that use the image object "cn=browser,cn=global,o=novell,c=us" following client "cn=CR001,cn=branch,ou=berlin,o=mycorp,c=de": posAdmin.pl --password secret \ --user cn=admin,o=mycorp,c=de \ --base ou=berlin,o=mycorp,c=de \...
Page 93
7.3 Managing Hardware --base cn=global,o=mycorp,c=de \ --add --scCashRegister --cn crtype3 \ --scCashRegisterName 1234567 \ --scPosImageDn cn=browser,ou=global,o=mycorp,c=de The next step is to add hardware-dependent configuration files, such as XF86Config. The following example adds a scConfigFileTemplate object below the Cash Reg- ister Hardware container crtype3 using the attributes as described in Table 7.12.
Page 94
7 PosAdmin --scConfigFile /etc/X11/XF86Config \ --scMust TRUE --scBsize 1024 \ --scConfigFileLocalPath /opt/SLES/POS/rsync/config/XF86Config.1234567 Attribute Type Explanation --scConfigFileLocalPath must This local source path config file, example, /opt/SLES/POS/rsync/config/XF86Config.mydata. Table 7.13: ConfigFileSyncTemplate Attributes for PosAdmin Next, define the hard disk or the RAM disk of the CR. To add a RAM disk, which is a minimum requirement if no hard disk is available, you need the following parameters as described in Table 7.14.
7.4 Managing Images Attribute Type Explanation --base must This base distinguished name the CR object, for example, cn=crtype3, cn=global,o=mycorp,c=de. --cn must The common name of the device, for example, hda. --scDevice must This is the device of the hard disk, for example, /dev/hda.
Page 96
7 PosAdmin Value Explanation 1.1.2 The Version number is set to 1.1.2, but this POS image is disabled in LDAP and will not be used for a new CR client, even when the scCashRegister object which correspond to the POS client matches with the scPosImageDn attribute entry. 1.1.2;passive Same behaviour as above.
Page 97
7.4 Managing Images Attribute Type Explanation --base must This is the base distinguished name of the POS image object, for example, cn=myjava,cn=global,o=mycorp,c=de. --cn must This is the common name of the POS im- age, for example, myjava. --scImageName must This is the name of the POS image, for example, myjava.
8 The imageBuilder Contents 8.1 Overview of the POS_Image Packages ... . 99 8.2 Operating System Images ....101 8.3 Installing imageBuilder .
Page 100
8 The imageBuilder image and operating system image each POS client needs to receive after it is powered on. For further information refer to Section on page Section 15.6.3 on page 151. The following packages exist: POS_Image This package contains the README.Packages file, which describes the package structure of the POS project.
8.2 Operating System Images POS_Image-Java-Binary This is the prebuilt java image. POS_Image-Browser This package contains the browser image description structure, which includes all the files and directories needed to build the browser image using the imageBuilder. It can be loaded from one of the available boot images.
8 The imageBuilder Note when installing: If you have received a SUSE LINUX Option Pack CD, follow the instruc- tions that come with this CD. If the name of an RPM file contains the version number and the archi- tecture for which it was built, specify the entire RPM file name in your rpm command line.
8.6 Prebuilt Standard Images For example: SLESCD1=/opt/SLES/dists/ul-sp3/CD1 SLESCD2=/opt/SLES/dists/slrs-i386/CD1 SLESCD3=/opt/SLES/dists/ul-i386/CD1 SLESCD4=/opt/SLES/dists/ul-i386/CD2 SLESCD5=/opt/SLES/dists/ul-i386/CD3 During installation, the imageBuilder checks each CD set to find the packages needed to create the requested image. The order of the single CD entries is im- portant. scr looks for the requested package in the same order as the CD spec- ification in AdminServer.conf.
9 The Boot Process of a Cash Register System To understand how to use the operating system images, a short description of the cash register system is useful. The following diagram shows the simplified boot process of a cash register system. CashRegister PXE Network Boot Load kernel...
Page 106
9 The Boot Process of a Cash Register System Via PXE network boot or boot manager (GRUB), the cash register boots the initrd (initrd.gz) that it receives from the branch server. If no PXE boot is possible, the cash register tries to boot from the hard disk, if accessible.
Page 107
10 The scr tool This chapter describes the principles of creating and modifying cash register images using the scr (setup cash register) command line tool. Every image created is filed into a specified directory. The scr tool can be used in one of the following ways: 1.
Page 108
10 The scr tool no-strip [filename] Executables and libraries are normally stripped out to discard symbols and save space. If symbols are needed this option can be used. Without specifying a filename nothing gets stripped. if a filename is given only the matching files will not be stripped.
Page 109
– addgroup:<groupname> Include the group with the name groupname into the image. – auth Include root authentication into the image. During image prepara- tion, the user is asked for the root password, which is needed to log in to the image system later. –...
Page 110
10 The scr tool image name Defines the name of the image to prepare or build. verify prepare, all packages are verified using RPM In conjunction with after they are installed. The result of the verification is displayed. gzip In conjunction with build, the created image file is compressed us- ing gzip.
11 Creating Operating System Images Contents 11.1 List All Image Descriptions ....112 11.2 Creating a Standard Image ....112 11.3 Creating a New Image Description Tree .
11 Creating Operating System Images For image changes that involve the addition or removal of packages, thus changing the features of the image, the minor number is incremented and the release number is reset. The config file remains unchanged. For image changes that change the size of the image file (change to the config file), the major number is incremented.
11.3 Creating a New Image Description Tree 11.3 Creating a New Image Description Tree Creating a standard image is not that exciting and all the standard images are available as prebuilt versions with the imageBuilder RPM package. More interesting is building your own image description tree. For example, create a new image description tree named myImage-1.1.1.
Page 114
11 Creating Operating System Images package Subdirectory in which searches for packages occur. The directory is au- tomatically initialized depending on the entries in the imageBuilder con- figuration file /etc/opt/SLES/POS/AdminServer.conf. During this process, symbolic links for all keys containing the partial string CD are created. The value after the key in AdminServer.conf indicates the path to an installation CD provided by SUSE.
Page 115
11.3 Creating a New Image Description Tree – name The image name indicates the base name of the image. It is au- tomatically expanded using the version number and the date. The version number is extracted from the directory in which the de- scription files for this image are located.
Page 116
11 Creating Operating System Images – drivers Contains a comma-separated list of file names. Every file is indi- cated relative to the directory /lib/modules/ Version /kernel The names are interpreted as general driver name and captured if they are contained in the kernel tree. –...
11.4 Extending an Image 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 will be executed after the installation of all the packages.
Page 118
11 Creating Operating System Images 2. Create a file using the same syntax as the setup file and add the package to it. The size parameter can be part of this file, too. Specify the file as an argument of the scr parameter --extend The following example will demonstrate both possible workflows for extend- ing an image, starting with the first method: 1.
11.5 Manually Extending an Image 11.5 Manually Extending an Image The description above is based upon the existence of the package within the SLRS CD set. Extending an image may be based on non-standard packages or even on software not bundled in a package. Packages Not in SLRS To extend an image with a package not part of the SUSE LINUX Retail Solution (SLRS), the procedure varies from that described above:...
11 Creating Operating System Images 4. Copy the non-RPM–based software to a directory within the image. For example: cp <software> root-myImage-1.1.1/tmp 5. Change into the image system with the command: chroot root-myImage-1.1.1 bash 6. Perform all the steps needed to install the software. 7.
11.6 Configuring an Image mkdir -p etc/sysconfig 3. Create the configuration file within the files-user tree. In this case, sim- ply copy the file from the real system into the image tree: cp /etc/sysconfig/hotplug etc/sysconfig The file tree within files-user is completely copied to the image while it is created.
11 Creating Operating System Images 11.6.3 Activating and Deactivating System Services These tasks are all done in the config.system file. To activate or deactivate a service the according runlevel, links must be set or removed. This should be done using the insserv command. To activate a service, include a call like this: sbin/insserv /etc/init.d/ service To deactivate a service, include a call like this:...
11.7 Distributing New Images The parameter name should be the name of the image to which this script belongs. 11.7 Distributing New Images The purpose of this section is to put new build POS images to the central rsync directory of the AS and to distribute them to the branch servers (BS). First, copy the required POS images from the directory: /opt/SLES/POS/image/ to the rsync directory:...
Page 124
11 Creating Operating System Images cp /opt/SLES/POS/image/initrd-netboot-1.1.7-2003-12-12.gz \ /opt/SLES/POS/rsync/boot/initrd.gz Copy the Linux kernel: cp /opt/SLES/POS/image/initrd-netboot-1.1.7-2003-12-12.kernel.2.4.21-152-POS_IBM \ /opt/SLES/POS/rsync/boot/linux Note: The POS clients boot two images — a first and a second stage image. Refer to Section 15.6.3 on page for further information. BS Interaction: Transfer the POS Images from example 1 and 2 from AS to BS.
12 Preparing a CD-ROM Boot Image 12.1.1 Set up the CD-ROM Cash Register Image Normally, all files a cash register image needs are obtained from the network controlled by a configuration file. In the case of a CD boot, all files must be part of the CD-ROM and therefore must be prepared before the image creation process.
Page 127
12.1 Preparing the CR CD-ROM Boot Image CONF Specifies a comma-separated list of source:target configuration files. The source (src) corresponds to the file within the directory. The target (dest) corresponds to an absolute path below the cash register image to which it is saved. PART Specifies the partitioning data.
12 Preparing a CD-ROM Boot Image The examples below show two typical examples of the config.image file. One using a RAM disk (/dev/ram1) into the minimal image will be loaded in- stalling on diskless POS clients and a second example using a hard disk drive (/dev/hda) where the partition /dev/hda2 will be used as root file system for the browser image on diskful POS systems.
12.3 Booting the CR CD-ROM Boot Image 2. Create the ISO image from the previously created operating system im- ages. The create-iso option of the scr will create a CD directory struc- ture and all necessary boot manager files. Then an ISO image is made using the mkisofs command.
13 Automatic Branch Server Installation The tools rely on the imageBuilder configuration file /etc/opt/SLES/POS/AdminServer.conf to list the SLRS and United Linux base media and service packs in the order they will be searched for packages. 13.2 LDAP Data for the Branch Server To enable the autoinstall system to configure the branch server completely, detailed information about the hard disk and the network interfaces must be present.
13.3 XML Template File 13.3 XML Template File The basic configuration of the branch server is laid out in the AutoYaST XML template file. A basic template is installed in /opt/SLES/POS/xml/template.xml which also is the default location for the template used by the tools. 13.3.1 Modifying the Template The template can be modified with a text editor (such as vi or emacs), an XML editor, or the AutoYaST GUI system.
13 Automatic Branch Server Installation template file that will be used. Then use ‘Profile Management’, ‘Create or Edit Configurations’, select the template file and click ‘Edit’ to modify the base template. A menu system similar to the YaST configuration interface will allow you to modify specific sections of the template.
13.5 Creating the Boot Media If the --output and --template options are not used, the autoinst.iso and autoinst.xml file is created in the current directory. 13.5 Creating the Boot Media The previously created ISO file autoinst.iso is used to create a bootable CD- ROM.
Page 136
13 Automatic Branch Server Installation ‘info’, ‘posInitBranchserver.auto.cfg’ and ‘autoinst.xml’. Set the branch server to boot from CD-ROM, insert floppy disk and CD-ROM, and boot. The automatic installation system should start, request confirmation of the start of the installation, and otherwise run without interaction. After the system is installed, log in as the ‘root’...
14 Best Practices slapcat >ldap.$(date +’%Y%m%d-%T’) This will generate an LDIF (LDAP Data Interchange Format) file named ldap.<datetime> where <datetime> is the current date and time. The output file can be archived, backed up on offline media, and restored with the slapadd com- mand.
14.2 Access Control server is able to run with an empty database. If the database has been cor- rupted, the database files in /var/lib/ldap/ must be removed before restor- ing the online backup. To restore a backup file taken with ldapsearch, run the command ldapadd -D <adminDN>...
Page 140
14 Best Practices Now the –user argument can be set to –user cn=HaborBerlinUser,cn=habor,ou=berlin,o=suse,c=de in all posAdmin commands concerning the cn=habor,ou=berlin,o=suse,c=de location. Especially for the posInitBranchserver command, the default LDAP user can be replaced by this user. Please enter the DN of the LDAP user for administration tasks [default: cn=admin,o=mycorp,c=de] cn=HaborBerlinUser,cn=habor,ou=berlin,o=suse,c=de Consult your company security policy to learn about security requirements...
15 Advanced Topics 15.2 Standard Images SUSE provides the following standard images with the operating system struc- ture in the Retail Project: Boot Image This image is the basis upon which all the following images can be loaded. The boot image is loaded as initrd as soon as the cash register boots.
15.4 Naming and Storing Images Diskless + Diskful CDBoot: Can operate diskless systems (loads RAM disks from a fixed CD image file) and preinstalled diskful systems. 15.4 Naming and Storing Images An image is always created in a directory that must be indicated. The fol- lowing path was defined as the root directory for all the components of this project: /opt/SLES/POS...
15 Advanced Topics The boot image is also stored in the directory, but should always contain the word initrd in its name. Such boot images named as initrds should be created as a zipped ext2 file system. 15.5 Creating Images If the image description is complete (for further information about the image description tree structure, refer to Section 11.3.1...
Page 145
15.5 Creating Images 11. Create the image. In the case of a boot images, the kernel used to create this boot image is additionally extracted. All other images are fitted with a checksum file (Imagename.md5). The checksum file contains the md5 sum and the size of the image file in bytes.
15 Advanced Topics – Value equals zero The question for the alias will not appear (default). – Value equals -1 The question for the alias name appears and the boot process sleeps until the user enters something. This feature only takes effect when creating boot images. Image configured as a branch server (feature=branch_server).
15.6 Booting the Cash Registers Trivial File Transfer Protocol (TFTP) (refer to the manual page) TFTP structure on BS (refer to Section 4.4.3 on page 47) CR configuration file (config.<MAC Address>) (refer to Section 15.6.1) CR Control file (hwtype.<MAC Address>) (refer to Section 15.6.2) An example of a BS TFTP structure is shown below: /tftpboot/CR: 00:02:55:23:F3:93 00:03:56:01:D5:5F config.00:02:55:23:F3:93 config.00:03:56:01:D5:5F...
Page 148
15 Advanced Topics For SLRS system administrators there is no need to edit the CR configuration files manually. All information is gathered from the LDAP entries of the ad- ministration server. For testing and debugging purposes the RELOAD_IMAGE and RELOAD_CONFIG feature is available. The POS script posldap2crconfig.pl (see Section on page 75) can be used to update and overwrite all CR configuration files.
Page 149
15.6 Booting the Cash Registers compressed Specifies if the image file on the TFTP server is compressed and handles it accordingly. To specify a compressed image download only the key- word "’compressed"’ needs to be added. If compressed is not specified the standard download workflow is used.
15 Advanced Topics RELOAD_CONFIG If set to an non-empty string, forces all config files to be loaded from the server. Used mainly for debugging purposes, this option only makes sense on diskful systems. Using posldap2crconfig.pl will overwrite this optional feature of the CR configuration file. 15.6.2 The CR Control File This section describes the cash register control file: hwtype.
15.6 Booting the Cash Registers 15.6.3 Overview of the CR Boot Process The following section describes the steps that take place when the cash regis- ter is booted with the image determined by its product ID: Via PXE network boot or boot manager (GRUB), the cash register boots the initrd (initrd.gz) that it receives from the branch server.
Page 152
15 Advanced Topics If this file is not available and cannot be loaded, it means this is a new cash register that can be immediately registered. A new cash register is registered in two steps: An optional alias name can be set for the new cash register. During image creation of one of the boot images, you can enable the system alias setting via the POSSetAlias feature module.
Page 153
15.6 Booting the Cash Registers 11. Checksums checked. Repeat download if necessary. 12. The CONF: line is evaluated. All the indicated files are loaded from the TFTP server and stored in a /config/ path. 13. Terminate all the user-land processes based on the boot image (dhcpcd -k).
15 Advanced Topics 15.7 Thin Client Adminstration 15.7.1 Admind Admind is a small daemon that allows simple commands to be executed on POS terminals from a remote location. Used together with adminc, an admin- istrator can perform tasks like shutdown, configuration reload or application restart on multiple POS clients from a single location.
15.7 Thin Client Adminstration Option Explanation Defines a valid server. The names of the connecting servers are compared against this list. Short names can be used and will be expanded for the local domain. Defines a valid username on the connecting machine. Defines the fixed commands.
16 Troubleshooting Contents 16.1 Server Infrastructure ..... 157 16.1.1 Installation ..... . . 157 16.1.2 Name Resolution .
Page 158
16 Troubleshooting installation. Hints Herefore the United Linux Service Pack would be the solution or an optional SCSI driver disk from the hardware manufacturer. For example, booting from the United Linux Service Pack 3 CD1 the United Linux boot screen is displayed (see Figure 16.1). The selection "Installation" will start the installation, the selection "Manual Installation"...
16.2 Operating 16.1.2 Name Resolution Especially when configuring the branch servers with posInitBranchserver.sh, care must be taken that the system can resolve its own name to its IP address that belongs to the branch network. If the system has only one network interface, or if the eth0 interface is the branch network interface, the correct resolution is done through the /etc/hosts file, where YaST adds the correct entries.
16 Troubleshooting branch server. It uses rsync to let the branch servers fetch only the files that need to be updated. Enough space should be configured to keep at least two ‘generations’ of image files, to make sure that there is a valid image available at all times. The way it is called by default, rsync will update existing files, create new files and even delete files that do not exist in the original download directory on the administration server.
Page 161
16.2 Operating exists. Make sure that the image has been transferred to the branch server and that the version in LDAP has a ;active flag attached. Hints Keep at least two generations of image files available and active in LDAP at all times.
A Installation RPM Lists A.1 RPM Lists for Minimal Installations The following selection list gives the minimal recommended installation for the operating system of branch and administration servers (without high avail- ability features): A.1.1 Installation Process During the Installation, select the "‘Minimum graphical system (without KDE)"’ as the base system instead of the default system.