5.7. Invoking the Auto-Installation process

Adding the command line variable autoyast will make linuxrc started in automated mode. Linuxrc searches for a configuration file, which should be distinguished from the main control file in the following places:

The configuration file used by linuxrc can contain the following keywords:

Table 5-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
ipWhen 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)

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) file should be used only in the preparation phase and 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.

An alternative to supplying the mentioned keywords in the info configuration file is to pass these keywords to linuxrc using the kernel command line. All keys/variables combinations can now be passed using this way. The command line can for example 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 PE.

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

Table 5-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 )
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)
autoyast=floppy://<path>Looks for control file in the floppy (Usefull when booting from CD)
autoyast=nfs://<server>/<path>Looks for control file on <server>
autoyast=http://<server>/<path>Retrieves the control file from a web server using the HTTP protocol.
autoyast=tftp://<server>/<path>Retrieve the control file with TFTP

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 CDs. To initiate the auto-installation process however, the auto-installation command line variable should be entered at system bootup 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.

5.7.1. Default behavior

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.

This is the default which also matches the behavior of linuxrc in earlier releases of SuSE Linux.

5.7.2. Control file on boot media

You should be able to define the location of the control file using the file option which indicates where the control file is located. Depending on the used boot method, YaST2 will look for the control file using the specified path in the root directory of the initial ramdisk (initrd).

5.7.3. Control file on a storage device

YaST2 can look for the control file on a storage device. This is done after mounting the partition or the device to a temporary mount point.

5.7.4. Control file on a Floppy

YaST2 looks for the control file on a Floppy in the specified directory. This is particularly usefull when booting using a CD-ROM to boot (Original SuSE CD-ROMs).

5.7.5. Control file on a NFS server

YaST2 looks for the control file on the NFS server specified on the command line. In this case linuxrc will auto-probe the network device and use DHCP to to configure the Ethernet device.

5.7.6. Control file retrievable via HTTP.

To use HTTP set the boot command line variable autoyast with control file location using the http protocol. It is possible to specify the location of the control file using the following methods:

  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 pathprefix variable is defined, YaST2 will fetch the control file from the HTTP server 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 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, and 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 5-7. Determine HEX code for an IP address

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

5.7.7. Control file retrievable via TFTP.

This option is similar to the former one using HTTP.

5.7.8. Control file on a NFS server

YaST2 will looks for the control file on the NFS server specified on the command line. In this case linuxrc will auto-probe the network device and use DHCP to to configure the Ethernet device.

Note that the same behaviour dealing with hex IPs is also available here (as with tftp and http).