AutoYaST allows you to install SUSE® Linux Enterprise on a large number of machines in parallel. The AutoYaST technology offers great flexibility to adjust deployments to heterogeneous hardware. This chapter tells you how to prepare a simple automated installation and lay out an advanced scenario involving different hardware types and installation purposes.
![]() | Identical Hardware |
---|---|
This scenario assumes you are rolling out SUSE Linux Enterprise to a set of machines with exactly the same hardware configuration. |
To prepare for an AutoYaST mass installation, proceed as follows:
Create an AutoYaST profile that contains the installation details needed for your deployment as described in Section 21.1.1, “Creating an AutoYaST Profile”.
Determine the source of the AutoYaST profile and the parameter to pass to the installation routines as described in Section 21.1.2, “Distributing the Profile and Determining the autoyast Parameter”.
Determine the source of the SUSE Linux Enterprise installation data as described in Section 21.1.3, “Providing the Installation Data”.
Determine and set up the boot scenario for autoinstallation as described in Section 21.1.4, “Setting Up the Boot Scenario”.
Pass the command line to the installation routines by adding the
parameters manually or by creating an info
file as
described in
Section 21.1.5, “Creating the info
File”.
Start the autoinstallation process as described in Section 21.1.6, “Initiating and Monitoring the Autoinstallation”.
An AutoYaST profile tells AutoYaST what to install and how to configure the installed system to get a completely ready-to-use system in the end. It can be created in several different ways:
Clone a fresh installation from a reference machine to a set of identical machines
Use the AutoYaST GUI to create and modify a profile to meet your requirements
Use an XML editor and create a profile from scratch
To clone a fresh reference installation, proceed as follows:
Perform a normal installation.
After you complete the hardware configuration and read the release
notes, check /root/autoyast.xml
that can be used to create
clones of this particular installation.
To use the AutoYaST GUI to create a profile from an existing system configuration and modify it to your needs, proceed as follows:
As root
, start YaST.
Select
+ to start the graphical AutoYaST front-end.Select
+ to prepare AutoYaST to mirror the current system configuration into an AutoYaST profile.As well as the default resources (like boot loader, partitioning, and software selection), you can add various other aspects of your system to the profile by checking the items in the list in
.Click
to have YaST gather all the system information and write it to a new profile.To proceed, choose one of the following:
If the profile is complete and matches your requirements, select
autoyast.xml
.
Modify the reference profile by selecting the appropriate configuration “Hardware/Sound”) and clicking . The respective YaST module starts but your settings are written to the AutoYaST profile instead of applied to your system. When done, select + and enter a suitable name for the profile.
and (such asLeave the AutoYaST module with
+ .
The AutoYaST profile can be distributed in several different ways. Depending
on the protocol used to distribute the profile data, different AutoYaST
parameters are used to make the profile location known to the
installation routines on the client. The location of the profile is
passed to the installation routines by means of the boot prompt or an
info
file that is loaded upon boot. The following
options are available:
Profile Location |
Parameter |
Description |
---|---|---|
File |
|
Makes the installation routines look for the control file in the
specified path (relative to source root
directory— |
Device |
|
Makes the installation routines look for the control file on a
storage device. Only the device name is
needed— |
Floppy |
|
Makes the installation routines look for the control file on a floppy in the floppy drive. This option is especially useful, if you want to boot from CD-ROM. |
NFS |
|
Has the installation routines retrieve the control file from an NFS server. |
HTTP |
|
Has the installation routines retrieve the control file from an HTTP server. |
HTTPS |
|
Has the installation routines retrieve the control file from an HTTPS server. |
TFTP |
|
Has the installation routines retrieve the control file from a TFTP server. |
FTP |
|
Has the installation routines retrieve the control file from an FTP server. |
Replace the server
and
path
placeholders with values matching your
actual setup.
AutoYaST includes a feature that allows the binding of certain profiles to
the client's MAC address. Without having to alter the
autoyast=
parameter, you can have the same setup
install several different instances using different profiles.
To use this, proceed as follows:
Create separate profiles with the MAC address of the client as the filename and put them on the HTTP server that holds your AutoYaST profiles.
Omit the exact path including the filename when creating the
autoyast=
parameter, for example:
autoyast=tftp://192.168.1.115/
Start the autoinstallation.
YaST tries to determine the location of the profile in the following way:
YaST searches for the profile using its own IP address in uppercase
hexadecimal, for example, 192.0.2.91
is
C000025B
.
If this file is not found, YaST removes one hex digit and tries again. This action is repeated eight times until the file with the correct name is found.
If that still fails, it tries locating a file with the MAC address of
the clients as the filename. The MAC address of the example client is
0080C8F6484C
.
If the MAC address–named file cannot be found, YaST searches
for a file named default
(in lowercase). An
example sequence of addresses where YaST searches for the AutoYaST
profile looks as follows:
C000025B C000025 C00002 C0000 C000 C00 C0 C 0080C8F6484C default
The installation data can be provided by means of the product CDs or DVDs or using a network installation source. If the product CDs are used as the installation source, physical access to the client to be installed is needed, because the boot process needs to be initiated manually and the CDs need to be changed.
To provide the installation sources over the network, set up a network
installation server (HTTP, NFS, FTP) as described in
Section 14.2.1, “Setting Up an Installation Server Using YaST”. Use an
info
file to pass the server's location to the
installation routines.
The client can be booted in several different ways:
As with a normal remote installation, autoinstallation can be initiated with Wake on LAN and PXE, the boot image and control file can be pulled in via TFTP, and the installation sources from any network installation server.
You can use the original SUSE Linux Enterprise media to boot the system for autoinstallation and pull in the control file from a network location or a floppy. Alternately, create your own custom CD-ROM holding both the installation sources and the AutoYaST profile.
The following sections provide a basic outline of the procedures for network boot or boot from CD-ROM.
Network booting with Wake on LAN, PXE, and TFTP is discussed in
Section 14.1.3, “Remote Installation via VNC—PXE Boot and Wake on LAN”. To
make the setup introduced there work for autoinstallation, modify the
featured PXE Linux configuration file
(/srv/tftp/pxelinux.cfg/default
) to contain the
autoyast
parameter pointing to the location of the
AutoYaST profile. An example entry for a standard installation looks like
this:
default linux # default label linux kernel linux append initrd=initrd install=http://192.168.1.115/install/suse-enterprise/
The same example for autoinstallation looks like this:
default linux # default label linux kernel linux append initrd=initrd install=http://192.168.1.115/install/suse-enterprise/ \ autoyast=nfs://192.168.1.110/profiles/autoyast.xml
Replace the example IP addresses and paths with the data used in your setup.
There are several ways in which booting from CD-ROM can come into play in AutoYaST installations. Choose from the following scenarios:
Use this approach if a totally network-based scenario is not possible (for example, if your hardware does not support PXE) and you have physical access to system to install during most of the process.
You need:
The SUSE Linux Enterprise media
A network server providing the profile data (see Section 21.1.2, “Distributing the Profile and Determining the autoyast Parameter” for details)
A floppy containing the info
file that tells
the installation routines where to find the profile
or
Access to the boot prompt of the system to install where you
manually enter the autoyast=
parameter
Use this approach if an entirely network-based installation scenario would not work. It requires physical access to the system to be installed for turning on the target machine, or, in the second case, to enter the profile's location at the boot prompt. In both cases, you may also need to change media depending on the scope of installation.
You need:
The SUSE Linux Enterprise media
A floppy holding both the profile and the
info
file
or
Access to the boot prompt of the target to enter the
autoyast=
parameter
If you just need to install a limited number of software packages and the number of targets is relatively low, creating your own custom CD holding both the installation data and the profile itself might prove a good idea, especially if no network is available in your setup.
info
File¶The installation routines at the target need to be made aware of all the different components of the AutoYaST framework. This is done by creating a command line containing all the parameters needed to locate the AutoYaST components, installation sources, and the parameters needed to control the installation process.
Do this by manually passing these parameters at the boot prompt of the
installation or by providing a file called info
that is read by the installation routines (linuxrc). The former requires
physical access to any client to install, which makes this approach
unsuitable for large deployments. The latter enables you to provide the
info
file on some media that is prepared and
inserted into the clients' drives prior to the autoinstallation.
Alternatively, use PXE boot and include the linuxrc parameters in the
pxelinux.cfg/default
file as shown in
Section 21.1.4.1, “Preparing for Network Boot”.
The following parameters are commonly used for linuxrc. For more
information, refer to the AutoYaST package documentation under
/usr/share/doc/packages/autoyast
.
![]() | Separating Parameters and Values |
---|---|
When passing parameters to linuxrc at the boot prompt, use
|
Keyword |
Value |
---|---|
|
The network device to use for network setup (for BOOTP/DHCP requests). Only needed if several network devices are available. |
|
When empty, the client sends a BOOTP request. Otherwise the client is configured using the specified data. |
|
Netmask for the selected network. |
|
Default gateway. |
|
Name server. |
|
Location of the the control file to use for the automatic
installation, such as
|
|
Location of the installation source, such as
|
|
If set to |
|
The password for VNC. |
|
If set to |
If your autoinstallation scenario involves client configuration via DHCP
and a network installation source, and you want to monitor the
installation process using VNC, your info
would
look like this:
autoyast:profile_source
install:install_source
vnc:1 vncpassword:some_password
If you prefer a static network setup at installation time, your
info
file would look like the following:
autoyast:profile_source
install:install_source
hostip:some_ip
netmask:some_netmask
gateway:some_gateway
Each option must be entered as one continuous string on a separate line.
The info
data can be made available to linuxrc in
various different ways:
As a file on a floppy or CD Rom that is in the client's drive at
installation time. Add the info parameter similar to
info=floppy:/info
or
info=cd:/info
.
As a file in the root directory of the initial RAM disk used for booting the system provided either from custom installation media or via PXE boot.
As part of the AutoYaST profile. In this case, the AutoYaST file needs to be
called info
to enable linuxrc to parse it. An
example for this approach is given below.
By means of an URL that points to the location of the info file. The
syntax for this looks like
info=http://www.example.com/info
.
linuxrc looks for a string (start_linuxrc_conf
) in the
profile that represents the beginning of the file. If it is found, it
parses the content starting from that string and finishes when the
string end_linuxrc_conf
is found. The options are
stored in the profile as follows:
.... <install> .... <init> <info_file> <![CDATA[ # # Don't remove the following line: # start_linuxrc_conf # install: nfs:server
/path
vnc: 1 vncpassword: test autoyast: file:///info # end_linuxrc_conf # Do not remove the above comment # ]]> </info_file> </init> ...... </install> ....
linuxrc loads the profile containing the boot parameters instead of the
traditional info
file. The
install:
parameter points to the location of the
installation sources. vnc
and
vncpassword
indicate the use of VNC for installation
monitoring. The autoyast
parameter tells linuxrc to
treat info
as an AutoYaST profile.
After you have provided all the infrastructure mentioned above (profile,
installation source, and info
file), you can go
ahead and start the autoinstallation. Depending on the scenario chosen
for booting and monitoring the process, physical interaction with the
client may be needed:
If the client system boots from any kind of physical media, either product media or custom CDs, you need to insert these into the client's drives.
If the client is not switched on via Wake on LAN, you need to at least switch on the client machine.
If you have not opted for remote controlled autoinstallation, the graphical feedback from AutoYaST is sent to the client's attached monitor or, if you use a headless client, to a serial console.
To enable remote controlled autoinstallation, use the VNC or SSH
parameters described in
Section 21.1.5, “Creating the info
File” and connect to the
client from another machine as described in
Section 14.5, “Monitoring the Installation Process”.
The following sections introduce the basic concept of rule-based installation using AutoYaST and provide an example scenario that enables you to create your own custom autoinstallation setup.
Rule-based AutoYaST installation allows you to cope with heterogeneous hardware environments:
Does your site contain hardware of different vendors?
Are the machines on your site of different hardware configuration (for example, using different devices or using different memory and disk sizes)?
Do you intend to install across different domains and need to distinguish between them?
What rule-based autoinstallation does is, basically, generate a custom
profile to match a heterogeneous scenario by merging several profiles
into one. Each rule describes one particular distinctive feature of your
setup (such as disk size) and tells AutoYaST which profile to use when the
rule matches. Several rules describing different features of your setup
are combined in an AutoYaST rules.xml
file. The rule
stack is then processed and AutoYaST generates the final profile by merging
the different profiles matching the AutoYaST rules into one. To illustrate
this procedure, refer to
Section 21.2.2, “Example Scenario for Rule-Based Autoinstallation”.
Rule-based AutoYaST offers you great flexibility in planning and executing your SUSE Linux Enterprise deployment. You can:
Create rules for matching any of the predefined system attributes in AutoYaST
Combine multiple system attributes (such as disk size and kernel architecture) into one rule by using logical operators
Create custom rules by running shell scripts and passing their output to the AutoYaST framework. The number of custom rules is limited to five.
![]() | |
For more information about rule creation and usage with AutoYaST, refer to
the package's documentation under
|
To prepare for a rule-based AutoYaST mass installation, proceed as follows:
Create several AutoYaST profiles that contain the installation details needed for your heterogeneous setup as described in Section 21.1.1, “Creating an AutoYaST Profile”.
Define rules to match the system attributes of your hardware setup as shown in Section 21.2.2, “Example Scenario for Rule-Based Autoinstallation”.
Determine the source of the AutoYaST profile and the parameter to pass to the installation routines as described in Section 21.1.2, “Distributing the Profile and Determining the autoyast Parameter”.
Determine the source of the SUSE Linux Enterprise installation data as described in Section 21.1.3, “Providing the Installation Data”
Pass the command line to the installation routines by adding the
parameters manually or by creating an info
file
as described in
Section 21.1.5, “Creating the info
File”.
Determine and set up the boot scenario for autoinstallation as described in Section 21.1.4, “Setting Up the Boot Scenario”.
Start the autoinstallation process as described in Section 21.1.6, “Initiating and Monitoring the Autoinstallation”.
To get a basic understanding of how rules are created, think of the following example, depicted in Figure 21.2, “AutoYaST Rules”. One run of AutoYaST installs the following setup:
This machine just needs a minimal installation without a desktop environment and a limited set of software packages.
These machines need a desktop environment and a broad set of development software.
These machines need a desktop environment and a limited set of specialized applications, such as office and calendaring software.
In a first step, use one of the methods outlined in
Section 21.1.1, “Creating an AutoYaST Profile” to create
profiles for each use case. In this example, you would create
print.xml
, engineering.xml
,
and sales.xml
.
In the second step, create rules to distinguish the three hardware types from one another and to tell AutoYaST which profile to use. Use an algorithm similar to the following to set up the rules:
Does the machine have an IP of
? Then make it the print server.Does the machine have PCMCIA hardware and feature an Intel chipset? Then consider it an Intel laptop and install the sales department software selection.
If none of the above is true, consider the machine a developer workstation and install accordingly.
Roughly sketched, this translates into a rules.xml
file with the following content:
<?xml version="1.0"?> <!DOCTYPE autoinstall SYSTEM "/usr/share/autoinstall/dtd/rules.dtd"> <autoinstall xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <rules config:type="list"> <rule> <hostaddress> <match>192.168.2.253</match> <match_type>exact</match_type> </hostaddress> <result> <profile>print.xml</profile> <continue config:type="boolean">false</continue> </result> </rule> <rule> <haspcmcia> <match>1</match> <match_type>exact</match_type> </haspcmcia> <custom1> <script> if grep -i intel /proc/cpuinfo > /dev/null; then echo -n "intel" else echo -n "non_intel" fi; </script> <match>*</match> <match_type>exact</match_type> </custom1> <result> <profile>sales.xml</profile> <continue config:type="boolean">false</continue> </result> <operator>and</operator> </rule> <rule> <haspcmcia> <match>0</match> <match_type>exact</match_type> </haspcmcia> <result> <profile>engineering.xml</profile> <continue config:type="boolean">false</continue> </result> </rule> </rules> </autoinstall>
When distributing the rules file, make sure that the
rules
directory resides under the
profiles
directory, specified in the
autoyast=
URL. AutoYaST looks for a protocol
:serverip
/profiles/rules
subdirectory containing
a file named rules.xml
first then loads and merges
the profiles specified in the rules file.
The rest of the autoinstallation procedure is carried out as usual.
For in-depth information about the AutoYaST technology, refer to the
documentation installed along with the software. It is located under
/usr/share/doc/packages/autoyast2
. The most recent
edition of this documentation can be found at
http://www.suse.de/~ug/autoyast_doc/index.html.