SLEPOS-imgsrv12 Color en
SLEPOS-imgsrv12 Color en
Images
SUSE Linux Enterprise Point of Service 11 SP3
Creating 64-Bit Client Images: Using a SUSE Linux Enterprise 12-Based Image
Server
SUSE Linux Enterprise Point of Service 11 SP3
A SUSE Linux Enterprise 11-based image server can be used to create 32-bit client
images. However, to create 64-bit client images required for booting 64-bit Point
of Service clients, it is necessary to set up a SUSE Linux Enterprise 12-based image
server on a dedicated machine. The following chapters provide explanation on how
to deploy a SUSE Linux Enterprise 12-based image server as well as create and boot
64-bit client images.
SUSE LLC
1800 South Novell Place
Provo, UT 84606
USA
https://documentation.suse.com
Contents
When performing a new SUSE Linux Enterprise Server installation, select Image Server from
the list of extensions.
If SUSE Linux Enterprise Server is already installed, you can use the YaST registration
module to install the Image Server.
In both cases, make sure to install the SLEPOS_Image_Server pattern. For further information,
refer to the SUSE Linux Enterprise Server 12 documentation at https://www.suse.com/documen-
tation/sles-12/index.html .
Setting Up a SUSE Linux Enterprise 12-Based Image Building Server SUSE Linux Enterp…
1 11 SP3
1.2 Building Images with KIWI
KIWI is an imaging suite that allows you to configure, build, and deploy your own operating
system images. The KIWI workflow is divided into three distinct stages:
config.xml
This le is used to define the image type, base name, repositories used to build the im-
age, profiles, options, and the package/pattern list. The wireless support is also enabled
here. For a more detailed example of a typical SUSE Linux Enterprise Point of Service
config.xml , refer to Example 1.1, “An Example config.xml Image Description”.
config.sh
config.sh is an optional image configuration script. It is executed at the end of the
installation of the image after the chroot command is used to switch to the image. It can
be used to configure the image system by activating or deactivating services.
images.sh
images.sh is an optional clean up script that runs before the image creation process is
started and the logical extend is created. It removes les that are only needed while the
physical extend exists.
config
The config directory is an optional directory that may contain shell scripts to be executed
after all packages have been installed. You could, for example manipulate a package to
remove parts that are not needed for the operating system by adding the relevant script
to the config directory. Make sure the name of your Bash scripts resembles the package
name specified in config.xml .
repo
The repo directory is an optional directory that could hold any RPM packages that do not
originate from one of your preconfigured repositories, but which you want to add manual-
ly. Place the RPMs in this directory and reference them by <package name="your_pack-
age"> in the config.xml le.
root
The root directory contains les, scripts and directories to customize the image after the
installation of all packages.
<description type="system"> 2
<author>Admin User</author>
<contact>[email protected]</contact>
<specification>POS image builder software - configuraton for graphical image</
specification>
</description>
<preferences> 3
<opensusePattern name="SLEPOS_Template_Graphical"/>
<package name="haveged" bootinclude="true"/>
<package name="posbios" bootinclude="true"/>
...
<package name="java-1_7_0-ibm"/>
<package name="aaa_base"/>
<package name="bash"/>
...
<archive name="bootsplash.tar" bootinclude="true"/>
<archive name="gdm.tar"/>
<!--begin wireless support 6
<file name="drivers/net/wireless/*"/>
1 The image element carries all basic information on the image description le. The name
attribute provides the base name of the image, the displayname attribute allows the setup
of the boot menu title and schemeversion the current version of KIWI.
2 The description element is used to provide some basic information on the creator of the
image and a basic description of the image's purpose. The author element holds the image
author's real name and the contact element a valid e-mail address. specification holds
a short description of the image's purpose.
3 The preferences element holds information needed to create the logical extend. The
type element determines the type of image to be created. SUSE Linux Enterprise Point of
Service supports the following values for type : oem , pxe , and iso . If your config.xml
contains more than one type element, you either need to add the primary attribute (with
its value set to true ) to the type that should be used for the final image, or the rst entry
is used by default.
defaultdestination and defaultroot are used if KIWI is not called with the destdir
option or the root option, respectively.
4 The Users element lists the users belonging to the group specified with the group attribute.
At least one user child element must be specified as part of the users element. Multiple
users elements may be specified.
SLEPOS image templates contain the root user by default. The default root password is
linux .
5 The packages element serves as a container for all the package elements used to designate
the packages to be handled by KIWI. There are several types of package sets supported by
KIWI: image includes all the packages which make up the image and are used to finish the
image installation, boot includes the list of packages needed to create a new operating
system root tree, and delete includes all packages marked for deletion and which are not
needed in the final image.
6 The section, marked in config.xml by begin/end wireless support , contains the con-
figuration necessary for booting using PXE via wireless networks. It is commented out in
the default configuration le of the minimal image. WPA configuration ( /etc/wpa_sup-
plicant/wpa_supplicant.conf ) is contained in the wlan.tar.gz TAR archive. WPA
configuration can be eventually adjusted there.
mkdir /var/lib/SLEPOS/system/graphical-default
cp -R /usr/share/kiwi/image/SLEPOS/graphical-3/* \
/var/lib/SLEPOS/system/graphical-default/
mkdir /var/lib/SLEPOS/system/image/graphical-default
a. Check whether the value of defaultroot points to the proper directory for the ch-
root environment needed to build the image. In this case: /var/lib/SLEPOS/sys-
tem/chroot/graphical-default .
c. Add the paths to the repositories needed to build your image. If you are building your
image from the standard SUSE Linux Enterprise Point of Service package sources,
specify /var/lib/SLEPOS/dist/base_distribution .
d. Add any optional configuration or scripts you need for your particular image as
described under Section 1.2.1, “Understanding the KIWI Configuration”.
5. Check whether config.xml is still well-formed XML to avoid parser problems when run-
ning the actual image building commands:
If this command does not return any messages, the XML is well-formed and you can pro-
ceed with creating the image. If it returns error messages, x the errors it returned and
retry until no more errors occur.
6. Perform the actual image preparation, but make sure the following requirements are met,
before you execute the kiwi command:
Zypper or YaST must not run while you invoke the image preparation and build
commands. These commands use Zypper and will be blocked by other processes
requesting the same services.
cd /var/lib/SLEPOS/system/
kiwi --prepare ./graphical-default --root ./chroot/graphical-default
KIWI creates the system image and any additional les needed to deploy the image.
Find the result of the imaging process under /var/lib/SLEPOS/system/images/graph-
ical-default .
2. Check whether the resulting image matches your needs. If not, you may modify the image
configuration inside the prepared physical extend by either:
For more information on the KIWI command and the options available, run the kiwi --help
command.
1. Select the pxe image type in config.xml as described in Section 1.2.1, “Understanding the
KIWI Configuration”.
2. Run the --prepare and --create commands of KIWI as described in Section 1.2.3, “Cre-
ating the KIWI Image”.
Also, the wireless drivers must be enabled in the drivers section of the config.xml le:
Building Customized SUSE Linux Enterprise Point of Service Images SUSE Linux Enterp…
10 11 SP3
<!-- end wireless support -->
The necessary lines are already present in the provided configuration of the minimal image,
they are just commented out. The wireless configuration is contained in the /etc/wpa_sup-
plicant/wpa_supplicant.conf le present in the wlan.tar.gz TAR archive and can be ad-
justed there.
To create the initial boot image with KIWI, use the kiwi --bootusb initrd command. The
image must be of the netboot type. The initrd must be an initrd le with wireless support
enabled in the config.xml le. The kernel is expected to be in the same directory and follow
the same naming convention. For example:
cd /var/lib/SLEPOS/system/images/jeos-5.0.0
kiwi --bootusb initrd-netboot-suse-SLES12.x86_64-2.1.1.splash.gz
The resulting image can be used for booting from a USB ash drive or it can be preloaded on
the hard disk.
2. Run the --prepare and --create commands of KIWI as described in Section 1.2.3, “Cre-
ating the KIWI Image”.
cd /var/lib/SLEPOS/system/images/image_name
4. Burn the ISO image to CD using a CD burning application of your choice (k3b or Nautilus,
for example).
Building Customized SUSE Linux Enterprise Point of Service Images SUSE Linux Enterp…
11 11 SP3
1.2.4.4 Building Bootable CD Images Without a System Image
If the terminals are not able to boot from network over PXE but network is present, CDs without
a system image can be used for booting the client system. The system image is downloaded via
the network after the boot. To build such images, proceed as follows:
1. Select the pxe image type in config.xml as described in Section 1.2.1, “Understanding the
KIWI Configuration”.
2. Run the --prepare and --create commands of KIWI as described in Section 1.2.3, “Cre-
ating the KIWI Image”.
cd /var/lib/SLEPOS/system/images/image_name
5. Burn the resulting ISO image to CD using a CD burning application of your choice (k3b
or Nautilus, for example).
The image can be booted from a USB ash drive. In that case it initializes the service partition
on the hard disk identified by the DISK variable in the configuration le. This way, it is possible
to set up a shop faster without the need of having network connections upfront and without
the initial PXE boot cycle to ll the system partitions. The resulting partition table should be
identical to what would be the outcome of a regular PXE boot/install.
To create an offline USB image on Combo Server, proceed as follows:
1. Start with a built image. Only boot image is needed, so you can use both the minimal
and the graphical image:
cd /var/lib/SLEPOS/system/images/graphical-3.4.0
Building Customized SUSE Linux Enterprise Point of Service Images SUSE Linux Enterp…
12 11 SP3
3. Add 1 GB of free space to the image:
4. Resize the partition (using fdisk delete it and create a new one - it defaults to whole disk):
w
EOT
DEV=/dev/mapper/`kpartx -s -v -a initrd-netboot-suse-SLES12.x86_64-2.1.1.splash.raw
|cut -f 3 -d ' '`
e2fsck -f $DEV
resize2fs $DEV
7. Set the partition label to SRV_SLEPOS_TMPL . This label marks the partition with newest
offline configuration:
zypper -n in POS_Image-Tools
10. Use the existing config.mac as a template for offline installation. This creates config.default
and the referenced les to the partition:
Building Customized SUSE Linux Enterprise Point of Service Images SUSE Linux Enterp…
13 11 SP3
11. Unmount everything:
umount /mnt
kpartx -d initrd-netboot-suse-SLES12.x86_64-2.1.1.splash.raw
IMAGE=/dev/sda3;minimal.x86_64;3.4.0;192.168.124.254;8192
PART=3000;83;/srv/SLEPOS,1000;82;swap,3000;83;/
DISK=/dev/disk/by-id/pci-0000:00:1f.2-scsi-0:0:0:0
POS_KERNEL=linux
POS_INITRD=initrd.gz
POS_KERNEL_PARAMS= panic=60 ramdisk_size=710000 ramdisk_blocksize=4096
vga=0x314 splash=silent console=tty0 console=ttyS0,115200 mac_separator=":"
POS_KERNEL_PARAMS_HASH=db8571ae6dfacaf1
fd24053b74a07aa4
image/minimal.x86_64-3.4.0
image/minimal.x86_64-3.4.0.md5
boot/linux
boot/linux.md5
boot/initrd.gz
boot/initrd.md5
cd /var/lib/SLEPOS/system/images/jeos-5.0.0
kiwi --bootusb initrd-netboot-suse-SLES12.x86_64-2.1.1.splash.gz
1. The terminal boots the 32-bit SUSE Linux Enterprise 11-based boot image.
2. The terminal is registered. This creates the scWorkstation object in the LDAP database
and the config.MAC le.
3. The generated config.MAC le points to the 64-bit SUSE Linux Enterprise 12-based image
in the custom scDistributionContainer LDAP object.
5. Kernel parameters (including version) are compared, and the terminal is then rebooted. If
the /srv/SLEPOS service partition is configured, the new boot image is started via Kexec.
6. The client boots the 64-bit SUSE Linux Enterprise 12-based boot image.
7. The SUSE Linux Enterprise 12-based system image is activated and booted.
cd /var/lib/SLEPOS/system/images/jeos-5.0.0
kiwi --bootusb initrd-netboot-suse-SLES12.x86_64-2.1.1.splash.gz
Use then the created image for the initial boot of the terminal. For further information
about creating a boot image, refer to Section 1.2.4.2, “Creating Images for Wireless Setup”.
In cases when the MAC and hwtype properties of the terminal are known and external
DHCP is not used, you can use the following command to prepare a MAC-specific PXE
configuration that points to terminal-specific kernel and initrd:
Problem: Booting the Point of Service client fails with the "vga=0x314 option is deprecated" error
message
Solution: For SUSE Linux Enterprise 12-based branches, remove the vga=0x314 kernel
parameter from the posdefaults object in the LDAP database using the posAdmin tool.
For mixed branches, remove the vga=0x314 kernel parameter from the posdefaults
object and add the parameter to each SUSE Linux Enterprise 11-based boot image via the
scDistributionContainer object.