7.3.  Invoking the Auto-Installation process

7.3.1. Command line Options

Adding the command line variable autoyast will make linuxrc 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 up

  • 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 Advanced Linuxrc Options ):

Table 7.1. Keywords for linuxrc

KeywordValue
netdeviceWhich network device to use for network setup (Device used for BOOTP / DHCP requests)
serverWhich server to contact for source directory (NFS Server)
serverdirDirectory on NFS Server
hostipWhen empty, client sends BOOTP request, otherwise client is configured with entered IP configuration.
netmaskNetmask
gatewayGateway
nameserverNameserver
insmodKernel modules to load.
autoyastLocation of the the control file to be used for the automatic installation, i.e autoyast=http://192.168.2.1/profiles/
installLocation of the installation directory, i.e. install=nfs://192.168.2.1/CDs/
instmodeInstallation mode, i.e. nfs, http etc. (Not needed if install is set)
y2confirmeven with <confirm>no</confirm> in the profile, the confirm proposal comes up. This is available since SUSE Linux 10.1 / SLES10

These variables and keywords will bring the system up to the point where YaST2 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 / 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 for example also be set when creating network boot-able images or it can be passed to the kernel using a specially configured DHCP server in combination with Etherboot or PXE.

The format of the special command line variable autoyast can be used as described in table Command line variables for AutoYaST

Table 7.2. Command line variables for AutoYaST

Command line variable Description
autoyast=defaultDefault 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, instead use sda1). Since openSUSE 11.2 (not SLES11) you can leave out the device to trigger AutoYaST's search routine over all devices. (autoyast=device:///my.xml)
autoyast=floppy://<path>Looks for control file in the floppy (Useful when booting from CD). Since SLES10 SP1 and later the fallback is looking on USB devices too
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 with TFTP
autoyast=ftp://[user:password@]<server>/<path>Retrieve the control file with FTP
autoyast=usb://<path> (since SLES10 SP1)Retrieve the control file from USB devices (autoyast will search on all USB devices it can find)
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)Looks for control file on a device that has the label

Several scenarios for auto-installation are possible using different types of infrastructure and source media. The simplest way is by using the source media from the SuSE Box. 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 YaST2. The following list of scenarios explains how the control file can be supplied and the setup needed for the auto-installation process to be successful.

  • Using SuSE original CD-ROMs from SuSE Linux box:

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

    1. Floppy: Control file accessible via the autoyast=floppy option. YaST2 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 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.

    Using CD-ROMs for autoinstallation, it is required 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 / 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 network during installations where network is not needed or not available, for example when auto-installing from CD-ROMs use the linuxrc option netsetup to set network configuration behavior. To disable network setup use netsetup=0

If autoyast=default is defined, YaST2 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, YaST2 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 that file is not found, it will remove one hex digit and try again. This action is repeated till the file with the correct name is found. Ultimately, it will try looking for a file with the MAC address of the clients 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
	

7.3.2.  Auto-installing a Single System

The easiest way to auto-install a system without any network connection is by using the standard CD-ROMs that come in the SuSE Linux box. Using the CD-ROMs in combination with a floppy disk lets you getting started with AutoYaST very fast and without spending much time configuring installation server and network environments.

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 YaST2 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 the 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.  Linxurc 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, i.e. if it is on a floppy, then the protocol floppy has to be used. In other cases where the info file is stored in the initial ram-disk, the file option has to be used.