AutoYast2: SLES8 - Automatic Linux Installation and Configuration with YaST2 | ||
---|---|---|
<<< Previous | Chapter 5. Autoinstallation | Next >>> |
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:
In the root directory of the initial ramdisk that you use to boot the system up
In the root directory of the floppy
The configuration file used by linuxrc can contain the following keywords:
Table 5-1. Keywords for linuxrc
Keyword | Value |
---|---|
netdevice | Which network device to use for network setup (Device used for BOOTP / DHCP requests) |
server | Which server to contact for source directory (NFS Server) |
serverdir | Directory on NFS Server |
ip | 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 to be used for the 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) |
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=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 ) |
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.
Using SuSE original CDs from SuSE Linux box:
To use the original CDs, you need a media with the control file, the control file can reside on the following locations:
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. To use this option, create the control file and copy it to a pre-formatted floppy disk and start the installation as usual.
Network: Control file accessible via the autoyast=nfs://.., autoyast=http://.. or autoyast=tftp://.. options.
Using 'self-made' CDs:
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 CDs.
Using NFS and Floppy, Network or CD-ROM for system bootup.
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:
Floppy/CD-ROM: Control file accessible via the autoyast=file:/.. option.
Network: Control file accessible via the autoyast=http://.., autoyast=nfs://.. or autoyast=tftp://.. options.
If autoyast=default is defined, YaST2 will look for a file named autoinst.xml in the following three places:
The root directory of the floppy disk.
The root directory of the installation medium.
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.
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).
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.
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).
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.
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:
Specify the exact location of the control file:
autoyast=http://192.168.1.1/control-files/client01.xml |
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:
First, it will search for the control file using its own IP address in upper case hexadecimal, e.g. 192.0.2.91 -> C000025B.
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.
This option is similar to the former one using HTTP.
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).
<<< Previous | Home | Next >>> |
The Auto-Installation Process | Up | Combining linuxrc info file with YaST2 control file |