SuSE Linux: Versions up to (including) 7.3
The purpose of this document is to describe the automated installation of SuSE Linux with YaST. This requires a specially prepared bootdisk and one of several installation media. The bootdisk can be simply generated from the normal SuSE boot-disk. Currently CD-ROM and NFS are possible media for the automated installation. The automated installation media can be created from the normal CDs as distributed by SuSE.
The automated boot-disk can be generated from the standard boot- disk. You simply copy the image of the standard boot-disk from the first CD onto a disk.
dd if=/cdrom/disks/bootdisk of=/dev/fd0The disk now contains the following files (example for SuSE Linux 6.4 may differ for newer releses):
-rwxr-xr-x 1 root root 631335 Mar 31 17:29 initrd -r-xr-xr-x 1 root root 8920 Mar 13 07:40 ldlinux.sys -rwxr-xr-x 1 root root 816685 Mar 13 07:40 linux -rwxr-xr-x 1 root root 2424 Mar 13 07:40 message -rwxr-xr-x 1 root root 774 Mar 13 07:40 syslinux.cfgThe file 'linux' must be a kernel, which supports the hard-disks onto which you are installing. If a SCSI system is installed, the corresponding SCSI controller has to be compiled into the kernel. If the installation is to be carried out via NFS, support for the networking cards has also to be compiled into the kernel. If you want to be able to install a wider range of hardware from the same boot-disk, support for all SCSI controllers and networking cards which could potentially be used have to be compiled into the kernel.
Since SuSE 6.3 it is also possible to perform an automated insatllation with the standard kernel. You just have to add the modules to be loaded in the 'info' file on the boodisk. More details on this are in section 4 of this manual.
The file syslinux.cfg of SuSE Linux 6.4 contains this in the second line:
append initrd=initrd rw ramdisk_size=65536To make this disk capable of doing an automatic installation you need to add linuxrc=auto to the second line. It should then read as follows:
append initrd=initrd rw ramdisk_size=65536 linuxrc=autoThe instructions for the automated installation are kept in the file /suse/setup/descr/info, which needs to be created on the diskette. The contents of this file are described in section 4 of this manual. This file may also be located in the root directory of the bootdisk.
Currently, automated installation can be carried out via NFS or from CD-ROM.
To create an automated installation environment on an NFS server, you have two choices for setting up the NFS directory. You can either place all of the source files in multiple directories which are named after the CD's from which they originated or place all of the source files into a single directory.
Here is a description of the first method:
mkdir /usr/AUTO cd /usr/AUTO
mkdir CDROM1 CDROM2 CDROM3 CDROM4
cp -av /cdrom/. CDROM1
mkdir suse cp -av CDROM1/suse/setup suse
cp -av CDROM?/.S* .
cd suse ln -s ../CDROM?/suse/*[0-9] . ln -s ../CDROM1/suse/images . ln -s ../CDROM1/suse/inst-sys .^L
mkdir /usr/AUTO cd /usr/AUTO
mount /cdrom cp -av /cdrom/* . cp /cdrom/.S* .
Determines the names of the network devices.
Options available: "eth0", "tr0", "fddi0".
Determines the IP-address of the NFS-server.
Options available: the IP address of the NFS server.
Contains the NFS installation directory on the NFS server. This is the directory containing the sub-directory suse . In the case of the example from section 3 the directory /usr/AUTO should be entered here.
Determines the IP-address of the machine that you are currently installing. If this keyword has not been set, the system tries to query a bootp or DHCP server for the IP address and all successive values.
Determines the netmask of the network.
If the NFS server is not located in the same sub-net as the machine to be installed, the IP-address of the gateway computer has to be entered here.
This is where the Nameserver can be specified.
Since SuSE 6.3 it is possible, with the standard kernels of the SuSE distribution, to peform an automatic installation by indicating the drivers that are necessary (SCSI and network card) for the installation with the 'insmod' statement. Should the automated installation be possible on a variety of SCSI controllers or network adapters you have to provide multiple 'insmod' staements. For an installation on SCSI controllers of Adaptec and NCR the following could be provided:
insmod aic7xxx insmod ncr53c8xxSimilarly, one could add support for multiple network drivers as follows:
insmod 3c59x insmod tulipNaturally, for this to work correctly, the modules have to be on the bootdisk. Because of space limitations, it is not possible to include all of the modules on a single bootdisk. We will only be concerned with the modules that are necessary for the installation. To see which modules ar available on the current disk, perform the following steps:
8390.o advansys.o eepro100.o ne.o rtl8139.o BusLogic.o aha1542.o ips.o ne2k-pci.o tulip.o 3c59x.o aic7xxx.o ncr53c8xx.o nvram.o
Language: german # "german" or "english" Display: color # "color" or "mono" Keytable: us # Keytable for us Bootmode: Net # Needed for network installation IP: 192.168.103.2 Netmask: 255.255.255.0 Gateway: 192.168.103.1 Server: 192.168.102.10 Serverdir: /usr/AUTO # From this example Nameserver: 192.168.102.1 # as the name says Netdevice: eth0 insmod aic7xxx insmod ncr53c8xx insmod rtl8139 insmod tulip insmod 3c59xAdditionally, of course, the info file on the boot-disk can contain all the entries of a normal info file. These entries will be described in the following sections.
The hierarchy works as follows (higher precedence first):
Determines whether automatic partitioning is to happen.
Options available: 0, 1, 2 0: No automatic partitioning 1: Automatic partitioning will be executed. Before the partitions are entered on the disks, the partitioning plan is displayed to the user who has to explicitly confirm the partitioning. It can also be edited manually at this stage. 2: Automatic Partitioning is carried out without user approval.Sample entry:
AUTO_FDISK 1
Contains a list of disk-device names which could be used for automatic installation. The installation will be performed on the disk corresponding to the first device name from the list. The partitioning of the disk is controlled through the files named 'part_NNNNN' in the directory suse/setup/descr on the installation medium (where NNNNN is a five-digit number, which represents the size of a hard drive in MB, more on this below). The files named 'part_NNNN' each contain partitioning plans, wich are used during automated installation. The plans specify which partitions will be created and how large they should be. The files are designed to give flexibility to the sysadmin in the event that automatic installations are being done on various sized hard drives.
The various 'part_NNNNN' files which have been created with various partitioning plans are dynamically selected during the installation. Which 'part_NNNNN' file gets used will depend on the size of the hard drive that is being partitioned. The file is selected by comparing the NNNN number with the size of the hard drive. The highest NNNNN number will be chosen that is below the size of the hard drive in Megabytes.
EXAMPLE
You are doing automatic partitioning (the variable AUTO_FDISK is set to 2) of a 2 GB hard drive. There are two files 'part_00000'and 'part_02500' in the directory suse/setup/descr. The partitioning plan in the file 'part_00000' will be used. In the above example, if you had a 4 GB hard drive, then the partitioning plan from the file 'part_02500' would have been used.
Sample entry:
AUTO_FDISK_DISK /dev/hda /dev/sdaSince SuSE 6.3 there is an alternate format for with a partitioning plan. This format allow more detailed specification about the partitioning and the caretd filesystems.
Example file containing a partitioning plan (old format):
SWAP 110 / 200 /var 300 /usr 800 /home 0The file above would create the following partitioning on a SCSI-disk (Device /dev/sda): As first partition (/dev/sda1) a swap-partition of at least 110 MB will be created. The next partition will be the root-partition (/dev/sda5) of 200 MB minimum. The next partitions will be /var (/dev/sda6) and /usr minimum. The next partitions will be /var (/dev/sda6) and /usr (/dev/sda7) with at least 300 and 800 MB each. The last partition to be created will be /home, which takes up the whole of the remaining disk space. The sizes mentioned are minimum sizes. The partitions can in fact be bigger, as only complete cylinders go into a partition. Several entries can have the keyword SWAP, so that several swap partitions can be created. If the last line lists the size 0 (as shown in the example above), the remainder of the hard drive will be allocated to this partition.
Example for a 'part_NNNNN' file using an alternate format :
/ size=200 id=83 bs=1024 err=c maxm=20 idns=4096 respc=5 SWAP size=110 id=82 /var size=300 id=83 bs=1024 err=c maxm=20 idns=4096 respc=5 /usr size=800 id=83 bs=1024 err=c maxm=20 idns=4096 respc=5 /home size=0 id=83 bs=1024 err=c maxm=20 idns=4096 respc=5The above example will create the same partitioning scheme as the previous plan in the old format. By changing the values of the keywords you have more control over the various partitioning and filesystem options. The keyword are defined as follows:
Keyword size=nnnn Sample entry: size=400
Size in megabyte for the partition.
Keyword num=nn Beispiel: num=3
Number of the partition. Becareful with the use of this
keyword. Make sure that you do not destroy an existing
partition. You are responsible for the results.
Keyword id=xx Sample entry: id=8E
Partition Id written in Hex
bs=nnnn Sample entry: bs=4096
Blocksize of the created ext2 filesystem.
idns=nnnn Sample entry: idns=4096
Inode density for the partition. The value represents the
average size of a file on the filesystem.
maxm=nnnn Sample entry: maxm=999
Maximal mount count. After the partition has been mounted nnnn
times, a filesystem check will be forced.
err=[c|r|p] Sample entry: err=c
Reaction to errors in the filesystem (c=continue, r=remount-ro,
p=panic)
respc=nnnn Sample entry: respc=2
Percentage of blocks reserved for root (respc and resbl may not
be configured simultaneously).
resbl=nnnn Sample entry: resbl=10000
Number of blocks reserved for root (respc and resbl may not be
configured simultaneously).
fsys=reiser Sample entry: fsys=reiser
The created filesystem is not ext2. Instead a reiser filesystem
is created (available since SuSE 6.4). For a reiser filesystem
the keywords bs, idns, maxm, err, respc und resbl are ignored.
Contains a list of partitions. All specified partitions are searched for the file /etc/fstab. If it is found on one of the partitions listed, partitioning does not happen automatically, but the contents of /etc/fstab will be read and the installation takes place according to the partitioning plan in this file. If you use this entry in combination with the following keyword (FSTAB_FORMAT) you determine that during automated installation partitions relevant to the system (such as /var /usr) will be installed from scratch, where as other partitions which are not relevant to the system (e.g. /home /space) are not effected.
Sample entry:
FSTAB_SEARCH /dev/sda1 /dev/hda1
Contains the mount points of the partitions which are regarded as relevant to the system. This entry really only makes sense in combination with the previous entry (FSTAB_SEARCH). It includes the mount points of those partitions which during automated installation have to be re-initialized after an existing file /etc/fstab has been read. All partitions whose mount points are not listed remain untouched during such an installation.
Sample entry:
FSTAB_FORMAT / /var /usr
This entry allows you to assign a specific partitioning file to a particular hard-disk. The entry contains the keyword, the device name of a hard-disk and the path name to the file containing the partitoning plan. Within this path name the wildcard "$I:" stands for the path to the medium for installation. Several entries with the keyword AUTO_FDISK_TABLE may exist. If they refer to the same disk, the partitioning file will be handled according to the hierarchy explained in section 4.2. If the entries refer to different disks, the entries from all partitioning files are taken together and several disks used for installation. It is then up to the user to make sure that these partitioning files fit into a valid filesystem hierarchy. This means that there has to be an entry for the root file system and that no mount point may be assigned several times. Entries refering to hard-disks without write access will be ignored. If at least one AUTO_FDISK_TABLE entry with a writeable hard-disk is found, this is used for partitioning and the entries in AUTO_FDISK_DISK will be ignored.
Sample entry:
AUTO_FDISK_TABLE /dev/sdb $I:/suse/ADD_FILES/part_test
The entry serves to centrally disable all features of an automated installation. If this has be done a manual installation of the SuSE distribution can be executed from this installation medium.
Options available: 0, 1, 2
0: No automated installation. 1: The user is asked to confirm if the automated installation should be carried out. 2: Peform always an automated installation.Sample entry:
FAST_INSTALL 2
This entry determines whether Lilo-configuration is to happen automatically. Lilo-entries called linux or linux.old , which refer to the kernels /boot/vmlinuz or /boot/vmlinuz.old , are assigned automatically. If a DOS-partition is present, this is also entered into Lilo.
Options available: 0, 1, 2
0: No automatic Lilo-configuration 1: At the end of the automatic Lilo- configuration, Lilo-output is displayed to the user. In case of problems, the user can repeat the Lilo-configuration manually. 2: Automatic Lilo-configuration as standard. Lilo-output is stored under /var/adm/inst- log/lilo.inst on the installed system.Sample entry:
PassMaxLen AUTO_LILO 2
The automatic Lilo-configuration creates an entry for booting a DOS-partition, if this should be present on the system. This entry determines the Lilo-name for booting the DOS-partition in the Lilo-configuration.
Sample entry:
LILO_DOS_NAME win98
If networking is to be installed, the network configuration settings (netdevice, IP-address, net mask, gateway) may automatically be adopted for the system that is being installed.
Options available: 0, 1
0: No automatic network configuration 1: Network data is automatically configured for the system during installation.Sample entry:
AUTO_NET 1
If an installation is carried out via bootp- or DHCP-server and if this server supplies a nameserver, the machine name specified by the nameserver can automatically be adopted for the system that is being installed.
Options available: 0, 1
0: Machine name is not being adopted. 1: The machine name, that was determined by the nameserver for the IP address, is being adopted.Sample entry:
AUTO_NAME 1
If an installation is carried out via bootp- or DHCP-Server and if this server also supplies a nameserver, this nameserver can automatically be adopted for the system that is being installed.
Options available: 0, 1
0: Nameserver is not adopted. 1: Nameserver is adopted for the system being installed.Sample entry:
AUTO_NAMSERVER 1
Determines whether the user will be queried which network services are to be available, or not.
Options available: 0, 1
0: Query concerning network services to be started. 1: Do not query concerning network services to be started.Sample entry:
AUTO_SERVICES 1
This entry specifies the selection file that is to be used for automatic installation. The selection file contains the names of all packages on the SuSE distribution that are being installed. A path for the selection file can be entered. Within this path the string "$I:" stands for the path to the installation medium.
NOTE: It is best to copy the format of the existing selection files. One example is the Minimal.sel which is located on CD1 in /suse/setup/descr/ directory. The same applies for the ADD_INSTALL variable described below.
Sample entry:
AUTO_INSTALL $I:/suse/ADD_FILES/AUTO.sel
With this entry additional selection files can be installed. Several entries containing the keyword ADD_INSTALL may be present. All selection files will be installed. In the context of class-specific installation this entry opens up the possibility of installing different sets of packages on certain classes of machines.
Sample entry:
ADD_INSTALL $I:/suse/ADD_FILES/Tex.sel
Once the packages have been installed, the user can check the installation logs. This entry serves to suppress the wait for user input. Installation logs are stored in /var/adm/inst-log
Options available: 0, 1
0: Do not wait for user input after package installation. 1: Wait for user input after package installation.Sample entry:
INSTALL_WAIT 0
Contains the name of the kernel to be installed. Sonce SuSE 6.4 you can specify either a kernel RPM or the name of a self compiled kernel. The selfcompiled kernel has to be present on the installation medium under suse/images/<Kernelname>.ikr . at least the appropriate SCSI support hast to be compiled into the kernel, if the installations happens on a SCSI system. The old method of installing self compiled kernels is still supported. Note that since 6.4 the SuSE CDs only contain the kernel in RPM format.
Sample entry:
AUTO_KERNEL k_deflt.rpm SuSE default kernel RPM in suse/images AUTO_KERNEL mykernel Selfcompiled kernel in suse/images/mykernel.ikr
If the installation happens via NFS, this is where the device name for the CD-ROM-drive can be specified.
Sample entry:
CDROM_DEVICE /dev/scd0
This entry controls whether the question concerning to use of a swap partition will be asked.
Options available: 0, 1
0: Question concerning use of swap-partition will be asked. 1: Question concerning use of swap-partition will not be asked.Sample entry:
NO_ASK_SWAP 1
This entry controls whether the user will be asked at the end of the installation whether he wants to boot the system he has just installed.
Options available: 0, 1
0: System will be booted automatically. 1: The user will be asked whether the system should be booted now.Sample entry:
END_MESSAGE 0
This entry determines whether or not the message stating that the system is now installed appears at the end of the first start-up.
Options available: 0, 1
0: Message is not displayed. 1: Message is displayed.Sample entry:
END_STARTUP 0
This entry controls whether the installation should be interrupted, while the automatic dependency check of the packages installed detects unresolved dependencies.
Options available: 0, 1
0: No interruption in case of unresolved dependencies. 1: Interruption in case of unresolved dependencies.Sample entry:
CHECK_DEPENDENCY 0
Determines that all queries will be answered with the default- value. This prevents windows waiting for user input from being displayed during automatic installation in case of problems. When this entry is set to '1' the installation will run smoothly and without interruption. It cannot be guaranteed however that a system installed in this way is usable.
Options available: 0, 1
0: In case of unexpected problems the user will be queried. 1: The user is never queried. Installation will run through.Sample entry:
NEVER_STOP 0
These entries can determine the contents of the file /etc/rc.config. Following the keyword RC_CONFIG_0 the entries contain the name of the entry in /etc/rc.config. The rest of the line is taken up by the value set for this name in /etc/rc.config. The info-files read can contain any number of such entries. They are all incorporated into /etc/rc.config. If an entry with the same variable name is present several times in /etc/rc.config, the value for this variable is determined according to the rules of hierarchy in section 4.2.Note that you can also use this variable to configure a variable that will be in a file located in /etc/rc.config.d/
Sample entry:
RC_CONFIG_0 START_GPM yes
Entries in /etc/rc.config, which can only be incorporated once the packages from the additional CDs have been installed. This entry only makes sense when an automatic installation from several CD-ROMs takes place. In the case of an installation via NFS or from a single CD, RC_CONFIG_1 is functionally equivalent to RC_CONFIG_0 and should therefore not be used.
Sample entry:
RC_CONFIG_1 DBROOT /opt/adabasApart from the entries for automatic installation the info-file on the installation medium also contains entries which describe the system to be installed itself. They are primarily used and analysed when a system is updated using YaST. These entries only exist in the info-file on the installation medium and should not be edited.
This refers to the following entries:
ELF MIN_YAST_VERSION DIST_STRING DIST_IDENT MIN_DIST_VERSION HAS_LIVE_CD
There are three points during the installation which can be used for customized scripts and packages:
At all three points any number of scripts can be started. As their first parameter the scripts contain the directory where they are located. This is also where you put additional files which are to be copied into the distribution. The second parameter to be passed on is PRE, POST or LAST, depending on when the script was called. The scripts are called up with "sh -x"and all output is directed into /var/adm/inst-log/<Scriptname>.log .
When you are creating your scripts, it is important to remember that the script will not understand the variable $I (it represents the directory on the installation medium), which is used in the info file (described above). When you specify a directory on the installation medium from within a script, you will have to use the full path, which will start with /var/adm/mount/suse. /var/adm/mount is the directory under which the installation medium is mounted during the installation. Additionally the path to the script is provided as first parameter of the script, so every install script can use $1 to access the directory where the script itself is located.
Insert the package specified into the list of packages which are to be installed before all packages of the SuSE distribution.
Sample entry:
PRE_INSTALL $I:/suse/ADD_FILES/preinst.rpm
Inserts the package specified into the list of packages which are to be installed after all the packages in the SuSE distribution which can be installed without change of media.
Sample entry:
POST_INSTALL $I:/suse/ADD_FILES/postinst.rpm
Inserts the package specified into the list of packages which are to be installed after all packages in the SuSE distribution. This entry only makes sense during an automated installation form several CD-ROMs. If the installation happens via NFS or from a single CD-ROM, LAST_INSTALL is functionally equivalent with POST_INSTALL and should therefore not be used.
Sample entry:
LAST_INSTALL $I:/suse/ADD_FILES/lastinst.rpm
Incorporates the script specified into the list of scripts, which are to be executed before the first package from the SuSE distribution is installed.
Sample entry:
PRE_SCRIPT $I:/suse/ADD_FILES/scripts/prepare
Incorporates the script specified into the list of scripts that are to be executed after all the packages from the SuSE distribution that are installable without change of media have been installed.
Sample entry:
POST_SCRIPT $I:/suse/ADD_FILES/scripts/add_user
Inserts the script specified into the list of scripts which are to be executed after all the packages from the SuSE distribution have been installed. This entry only makes sense when an automated installation from several CD-ROMs is taking place. During an installation via NFS or from a single CD-ROM LAST_SCRIPT is functionally equivalent with POST_SCRIPT and should therefore not be used.
Sample entry:
LAST_SCRIPT $I:/suse/ADD_FILES/scripts/last
To determine the membership in a class of machines a list of machine names and / or IP-addresses is supplied. For machine names '*' can be used as a wildcard, for IP-addresses ranges can be specified. Therefore specifications such as *.subnet.company.de as well as 192.168.102.20-40 are both possible. In the list several comma-separated areas can be strung together.
A machine can belong to several classes. In this case the info- files of the various classes are read one after to other. The definition of machine classes really only makes sense if the IP- addresses are assigned automatically during an installation via a bootp or DHCP server.
Sample entry:
CLASS 192.168.102.1-20,192.168.103.100-110 tex CLASS *.subnet.company.de x11