Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise Server 11 SP4

7 The Auto-Installation Process

7.1 Introduction

After the system has booted into an automatic installation and the control file has been retrieved, YaST configures the system according to the information provided in the control file. All configuration settings are summarized in a window that is shown by default and should be deactivated if a fully automatic installation is needed.

By the time YaST displays the summary of the configuration, YaST has only probed hardware and prepared the system for auto-installation. Nothing has been changed in the system yet. In case of any error, you can still abort the process.

A system should be automatically installable without the need to have any graphic adaptor or monitor. Having a monitor attached to the client machine is nevertheless recommended so you can supervise the process and to get feedback in case of errors. Choose between the graphical (Qt or GTK) and the text-based Ncurses interfaces. For headless clients, system messages can be monitored using the serial console.

7.1.1 X11 Interface (graphical)

This is the default interface while auto-installing. No special variables are required to activate it.

7.1.2 Serial console

Start installing a system using the serial console by adding the keyword "console" (i.e. console=ttyS0) to the command line of the kernel. This starts linuxrc in console mode and later YaST in serial console mode.

7.1.3 Text-based YaST Installation

This option can also be activated on the command line. This will start YaST2 in Ncurses mode. To start YaST in text mode, add textmode=1 on the command line.

Starting YaST in text mode is recommended when installing a client with less than 64 MB or when X11 is not being configured at all, especially on headless machines.

7.2 Choosing the Right Boot Medium

There are different methods for booting the client. The computer can boot from its network interface card (NIC) to receive the boot images via DHCP or TFTP. Alternatively a suitable kernel and initrd image can be loaded from a floppy or a bootable CD-ROM.

7.2.1 Booting from a floppy

For testing/rescue purposes or because the NIC does not have a PROM or PXE you can build a boot floppy to use with AutoYaST. Using a floppy to initiate an auto-install process is limited due to the size of the data a floppy can hold. However, it is still possible to use floppies when auto-installing a single, disconnected machine.

Floppies can also store the control file, especially when using the original SuSE CD-ROMs for a single, disconnected machine. Via the kernel command line, you can specify the location of the control file on the floppy.

Even without specifying any command line options, it is still possible to initiate the auto-install process by placing a control file on a floppy with the pre-defined file name autoinst.xml. YaST will check for autoinst.xml upon start-up and if it was found it will switch from interactive to automated installation.

7.2.2 Booting from CD-ROM

You can use the original SuSE CD-ROMs in combination with other media. For example, the control file can be provided via a floppy or a specified location on the network.

Alternatively, create a customized CD-ROM that holds only the package you need and the control file. If you need to change the configuration, you'll have to create a new CD-ROM.

7.2.3 Booting via PXE over the network

Booting via PXE requires a DHCP and a TFTP server in your network. The computer will boot then without a physical media like a boot floppy or CDROM.

Here is an example of a /srv/tftp/pxelinux.cfg/default file:

default SLES9

# install SLES9
label SLES9
  kernel linux_sles9
    append initrd=initrd_sles9 vga=0x0314 install=.... autoyast=... language=de_DE

# boot harddisc
label hd·

We recommended you add the vga=... parameter with a valid value for graphical installations, to trigger an installation with the frame buffer device instead of the vesa driver or ncurses mode.

Here is as an example of a /etc/dhcp.conf file:

option domain-name-servers;
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none; ddns-updates off;
log-facility local7;
option grub-menufile code 150 = text;
option grub-menufile "(nd)/menu.lst";·
subnet netmask {
        # PXE related stuff ...
        # "next-server" defines the TFTP server which will·
        # serve the pxelinux image to the PXE clients.
        allow booting;
        allow bootp;
        option routers; # default gateway

        # "filename" specifies the pxelinux image on the TFTP server·
        # which will be served to the PXE clients.
        # The configured TFTP server on runs in a·
        # "change-root jail" to /srv/tftpboot
        filename "pxelinux.0";

A problem you might run into if you do installation via PXE is that the installation will run into an endless loop, because after the first reboot, the machine is doing PXE boot again and restarts the installation instead of booting from hard disk for the second stage of the installation.

This problem can be solved in different ways. One way is to use an http server to provide the AutoYaST profile. And, instead of a static profile, run a CGI script on the Web server that provides the profile and changes the TFTP server configuration for your target host. Then the next PXE boot of the machine will be from hard disk by default.

Another way is to use AutoYaST to upload a new PXE boot configuration for the target host via the profile:

       <pxe_localboot config:type="boolean">true</pxe_localboot>
  LABEL linux
  localboot 0

       <filename>__MAC__</filename>   <!-- since openSUSE 11.2, not SLES11 -->

This entry will upload a new configuration for the target host to the TFTP server shortly before the first reboot happens. In most installations the TFTP daemon runs as user "nobody". You have to make sure this user has write permissions to the pxelinux.cfg directory. So if your machine has the IP address "", a file C0A842C3 will be uploaded. When the machine reboots and receives the same IP address via DHCP, the new configuration will be used, telling the target host to boot from hard disk.

If you want to do another auto-installation on the same machine, you have to remove the file from the TFTP server.

Since openSUSE 11.2 (not SLES11), you can also configure the filename that will be uploaded. If you use the "magic" __MAC__ filename, the filename will be the mac address of your machine like this "01-08-00-27-79-49-ee". If the filename setting is missing, the IP address will be used for the filename.

7.3 Invoking the Auto-Installation Process

7.3.1 Command Line Options

Adding the command line variable autoyast causes linuxrc to start in automated mode. linuxrc searches for a configuration file, which should be distinguished from the main control file in the following places:

  • in the root directory of the initial RAM disk used for booting the system,

  • in the root directory of the floppy.

The configuration file used by linuxrc can have the following keywords (for a detailed description of how linuxrc works and other keywords, see Appendix B, Advanced Linuxrc Options):

Table 7.1: Keywords for linuxrc




Network device to use for network setup (for BOOTP and DHCP requests)


Server (NFS) to contact for source directory


Directory on NFS Server


When empty, client sends BOOTP request, otherwise client is configured with entered IP configuration.






Name server


Kernel modules to load


Location of the the control file for automatic installation, i.e. autoyast=


Location of the installation directory, i.e. install=nfs://


Installation mode, i.e. nfs, http etc. (not needed if install is set)


Even with <confirm>no</confirm> in the profile, the confirm proposal comes up (available since SUSE Linux 10.1/SLES10).

These variables and keywords will bring the system up to the point where YaST can take over with the main control file. Currently, the source medium is automatically discovered, which in some cases makes it possible to initiate the auto-install process without giving any instructions to linuxrc.

The traditional linuxrc configuration file (info) has the function of giving the client enough information about the installation server and the location of the sources. In most cases, this file is not needed; it is however needed in special network environments where DHCP and BOOTP are not used or when special kernel modules have to be loaded.

All linuxrc keywords can be passed to linuxrc using the kernel command line. The command line can also be set when creating network bootable images or it can be passed to the kernel using a specially configured DHCP server in combination with Etherboot or PXE.

The command line variable autoyast can be used in the format described in table Table 7.2, “Command Line Variables for AutoYaST”

Table 7.2: Command Line Variables for AutoYaST

Command line variable



Default auto-installation option.


Looks for control file in specified path (relative to source root directory, i.e. file:///autoinst.xml if in the top directory of a CD-ROM and you did an installation from CD).


Looks for control file on a storage device (only device name needed without full path, i.e. /dev/sda1 is wrong, use only sda1 instead). Since openSUSE 11.2 (not SLES11) you can omit specifying the device and trigger AutoYaST to search all devices (autoyast=device:///my.xml).


Looks for control file on a floppy (useful when booting from CD). Since SLES10 SP1 and later the fallback is looking on USB devices.


Looks for control file on <server>


Retrieves the control file from a Web server using the HTTP protocol.


Retrieves the control file from a Web server using HTTPS (encrypted connection) protocol (possible since SL 10.1 and SLES10).


Retrieve the control file via TFTP.


Retrieve the control file via FTP.

autoyast=usb://<path> (since SLES10 SP1)

Retrieve the control file from USB devices (AutoYaST will search all connected USB devices).

autoyast=relurl://<path> (since openSUSE 11.0)

Retrieve the control file from the installation source (install=....).

autoyast=slp (since openSUSE 11.2, not SLES 11)

Query the location of the profile from an SLP server (service:autoyast:...). Since openSUSE 11.3 you can add a "description=" attribute so you can "translate" the URL into something more readable.

autoyast=cifs://<server>/<path> (since openSUSE 11.2, not SLES 11)

Looks for control file on <server> with CIFS

autoyast=label://<label>/<path> (since openSUSE 11.3, not SLES 11)

Searches for control file on a device with the specified label

Several scenarios for auto-installation are possible using different types of infrastructure and source media. The simplest way is to use the source media from SuSE. In that case you have either a DVD with all SuSE packages or a set of CD-ROMs. To initiate the auto-installation process however, the auto-installation command line variable should be entered at system boot-up and the control file should be accessible to YaST. The following list of scenarios explains how the control file can be supplied as well as the setup needed for the auto-installation process to succeed.

  • Using original CD-ROMs from SuSE:

    To use the original CD-ROMs, you need a media with the control file. The control file can reside in the following locations:

    1. Floppy: Control file accessible via the autoyast=floppy option. YaST also searches upon start-up for a file named autoinst.xml. If such a file is found, YaST2 will switch into auto-installation mode even if no special command line variables were supplied. (See Section 7.3.2, “Auto-installing a Single System”.)

    2. Network: Control file accessible via the autoyast=nfs://.., autoyast=ftp://.., autoyast=http://.. or autoyast=tftp://.. options.

  • Using 'self-made' CD-ROMs:

    In this case, you can include the control file on the CD-ROM for easy access (using the autoyast=file:// option) or use one of the above mentioned methods used with the original SuSE CD-ROMs.

    When using CD-ROMs for auto-installation, it is necessary to instruct the installer to use the CD-ROM for installation and not try to find the installation files on the network. This can be accomplished by adding the instmode=cd option to the kernel command line (this can be done by adding the option to the isolinux.cfg file on the CD).

  • Using NFS and Floppy, Network or CD-ROM for system boot-up.

    This option is the most important one due to the fact that installations of PC farms are normally done using NFS servers and other network services like BOOTP and DHCP. The control file can reside in the following places:

    1. Floppy/CD-ROM: Control file accessible via the autoyast=file://.. option.

    2. Network: Control file accessible via the autoyast=http://.., autoyast=ftp://.., autoyast=nfs://.. or autoyast=tftp://.. options.

Note: Disabling Network and DHCP

To disable the network during installations where it is not needed or unavailable, for example when auto-installing from CD-ROMs, use the linuxrc option netsetup to set the network configuration behavior. To disable network setup use netsetup=0.

If autoyast=default is defined, YaST will look for a file named autoinst.xml in the following three places:

  1. the root directory of the floppy disk,

  2. the root directory of the installation medium,

  3. the root directory of the initial RAM disk used to boot the system.

With all AutoYaST invocation options, excluding default, it is possible to specify the location of the control file in the following ways:

  1. Specify the exact location of the control file:

  2. Specify a directory where several control files are located:


    In this case the relevant control file is retrieved using the hex digit representation of the IP as described below.

If only the path prefix variable is defined, YaST will fetch the control file from the specified location in the following way:

  1. First, it will search for the control file using its own IP address in upper case hexadecimal, e.g. -> C000025B.

  2. If this file is not found, YaST will remove one hex digit and try again. This action is repeated until the file with the correct name is found. Ultimately, it will try looking for a file with the MAC address of the client as the file name (mac should have the following syntax: 0080C8F6484C) and if not found a file named default (in lower case).

As an example, for, the HTTP client will try:


in that order.

To determine the hex representation of the IP address of the client, use the utility called /usr/bin/gethostip available with the syslinux package.

Example 7.1: Determine HEX code for an IP address
# /usr/bin/gethostip 0A0A0001

7.3.2 Auto-installing a Single System

The easiest way to auto-install a system without any network connection is to use the original SuSE CD-ROMs and a floppy disk. You do not need to set up an installation server nor the network environment.

Create the control file and name it autoinst.xml. Copy the file autoinst.xml to a floppy by either mounting the floppy or by using the mtools.

mcopy autoinst.xml a:

7.3.3 Combining linuxrc info file with YaST control file

If you choose to pass information to linuxrc using the info file, it is possible to integrate the keywords in the XML control file. In this case the file has to be accessible to linuxrc and has to be named info.

Linuxrc will look for a string (start_linuxrc_conf in the control file which represents the beginning of the file. If it is found, it will parse the content starting from that string and will finish when the string end_linuxrc_conf is found. The options are stored in the control file in the following way:

Example 7.2: Linuxrc options in the control file
# Don't remove the following line:
# start_linuxrc_conf
install: nfs://
textmode: 1
autoyast: file:///info

# end_linuxrc_conf
# Do not remove the above comment


Note that the "autoyast" keyword must point to the same file. If it is on a floppy, then the protocol floppy has to be used. If the info file is stored in the initial RAM disk, the file option has to be used.

7.4 System Configuration

The system configuration during auto-installation is the most important part of the whole process. Customizing a system according to your environment and needs is what makes an auto-installation system attractive, not the installation part.

As you have seen in the previous chapters, almost anything can be configured automatically on the target system. In addition to the pre-defined directives, you can always use post-scripts to change other things in the system. Additionally you can change any system variables, and if required, copy complete configuration files into the target system.

7.4.1 Post-Install and System Configuration

The post-installation and system configuration are initiated directly after the last package is installed on the target system and continue after the system has booted for the first time.

Before the system is booted for the first time, AutoYaST writes all data collected during installation and writes the boot loader in the specified location. In addition to these regular tasks, AutoYaST executes the chroot-scripts as specified in the control file. Note that these scripts are executed while the system is not yet mounted.

If a different kernel than the default is installed, a hard reboot will be required. A hard reboot can also be forced during auto-installation, independent of the installed kernel. Use the reboot property of the general resource (see Section 4.1, “General Options”).

7.4.2 System Customization

Most of the system customization is done in the second stage of the installation. If you require customizations that cannot be done using AutoYaST resources, use post-install scripts for further modifications.

You can define an unlimited number of custom scripts in the control file, either by editing the control file or by using the configuration system.

Print this page