Invoking the Auto-Installation Process

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

Keyword

Value

netdevice

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

server

Server (NFS) to contact for source directory

serverdir

Directory on NFS Server

hostip

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

netmask

Netmask

gateway

Gateway

nameserver

Nameserver

insmod

Kernel modules to load

autoyast

Location of the the control file for automatic installation, i.e. autoyast=http://192.168.2.1/profiles/

install

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

instmode

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

y2confirm

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

Description

autoyast=default

Default auto-installation option.

autoyast=file://<path>

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).

autoyast=device://<device>/<file>

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).

autoyast=floppy://<path>

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

autoyast=nfs://<server>/<path>

Looks for control file on <server>

autoyast=http://[user:password@]<server>/<path>

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

autoyast=https://[user:password@]<server>/<path>

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

autoyast=tftp://<server>/<path>

Retrieve the control file via TFTP.

autoyast=ftp://[user:password@]<server>/<path>

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 startup 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 the section called “ 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:

    autoyast=http://192.168.1.1/control-files/client01.xml
  2. Specify a directory where several control files are located:

    autoyast=http://192.168.1.1/control-files/

    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. 192.0.2.91 -> 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 192.0.2.91, the HTTP client will try:

      
C000025B
C000025
C00002
C0000
C000
C00
C0
C
0080C8F6484C
default
    

in that order.

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

Example 7.1. Determine HEX code for an IP address

# /usr/sbin/gethostip 10.10.0.1
10.10.0.1 10.10.0.1 0A0A0001

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:

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

....
  <install>
....
    <init>
      <info_file>
<![CDATA[
#
# Don't remove the following line:
# start_linuxrc_conf
#
install: nfs://192.168.1.1/CDs/full-i386
textmode: 1
autoyast: file:///info

# end_linuxrc_conf
# Do not remove the above comment
#
]]>

      </info_file>
    </init>
......
  </install>
....

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.