Next Previous Contents

## 5. SuSE Client Install

You should have already decided by now using the Quick Guide section of this HOWTO whether you are going to install your machine using the automated process or a manual process. The automated process under SuSE is known as AutoYaST and in short provides you with a configuration file for the machine that you are going to install so that you can perform unattended installs of client machines.

## 5.1 Create AutoYaST Config Files

You only need to read/follow this section if you are intending to use an automated install process, if you intend to do a manual installation over your network then skip this section. Here we go through the process of creating configuration files that the installer will read in order to create the configuration of our client machine we are installing during an unattended network installation.

### YaST 2 Module Installation

In order to start creating your config files you will need to install the AutoYaST module for YaST2 on your SuSE machine. You will need three RPMs for this, all of which are on your SuSE source media e.g. CDs. The three RPMs are:

- yast2-trans-autoinst
- yast2-config-autoinst
- yast2-module-autoinst

Check to see if you already have them installed with the command:

    rpm -q {rpm package name}

If these packages are not installed then install with the command:

    rpm -Uvh {rpm package name}

### Create A Basic Config File

Once you have confirmed that you have the AutoYaST packages installed on your system, you can now start to create configuration files. For most situations the basic configuration described here will be sufficient to perform your installations.

Start the YaST2 Autoinstall configuration GUI with the command:

    yast2 autoyast

You will now be presented with a window that allows you to configure most of your installation options as if you were installing a new machine or performing an upgrade. You can proceed through the menu system configuring your options for a particular system or set of similar systems that you wish to automatically install. Alternatively, you can create class definitions which allows you to save different parts of the configuration setup and then use different classes for different sets of machines.

The use of classes is particularly good when you have a set of systems that are similar but that you would like installed in slightly different ways. For example, you could create a class definition for the hardware setup of all your client machines and create a separate class for the packages you want installed on them, whether they are server machines, test machines, workstations, etc. You can then choose which classes are used by which machines when they are installed. In our example here, all the machines would use the same hardware setup, but the workstation machines could install our workstation class of packages, test machines the test class, etc.

Once you have progressed through each configuration screen in the config setup GUI from YaST2 you are ready to save out your configuration file to disk. NOTE: it is outside the boundaries of this document to take you through each configuration option for installation, we are just concerned with the principles of network installs here. Please consult your SuSE documentation or the SuSE Website for this information.

When you save your configuration files they will be stored locally in two different locations depending on what file you have created as follows:

- Machine configuration files are stored in `/var/lib/autoinstall/repository`
- Class definition files are stored in `/var/lib/autoinstall/classes`

### Advanced Config File Setup

Before attempting advanced configuration please make sure that you have first created a valid basic configuration file as described above. It is perfectly possible to create your own configuration files from scratch but it is far easier to use the tools provided to do the job for you!

Once you have your configuration file saved, you can open it in your favourite text editor. The file is in XML format so it is particularly easy to follow and edit manually. You can use or modify any of the existing tags in your file, just so long as the tags, options, and syntax you use are legal. A full guide to the tags and their usage can be found in the AutoYaST manual, please see Appendix A of this guide for a reference.

The best use of editing the configuration file manually is probably for adding your own customised packages to the installation. Back in the SuSE Server Setup section we describe how to add your own customised packages to your install server. Here, we describe how to access those packages using the configuration file so they can be automatically installed with the rest of the system.

You should be able to locate a `<software>` section in your basic configuration file in your editor. You can use a sub-tag inside the software section called the `<extra_packages>` tag which can be used as in the following example:

    <software>
            <extra_packages>
                    <package_location>
                            custom
                    </package_location>
                    <packages config:type="list">
                            <package>{Your package name}</package>
                            <package>{Another Package}</package>
                    </packages>
            <extra_packages>
            <base>Default<base>
    <software>

The package location is written as `custom` which describes the directory under the `suse` directory of you install server where you have put your custom packages, in our example this would be `/install/suse/custom`, but you only need to write `custom` here.

You can include as many `package` tags under the `packages` section as you wish. Use one `package` tag for each custom package you want to include in your config file and install on the client machine.

The `base` tag at the bottom should be left as you configured it during the basic configuration.

Save your modified configuration file from your text editor and it will then be ready to use in your installations as described below.

## 5.2 Boot the Machine

There are different situations during a network installation boot of one of your client systems that might mean that you wish to boot in one of the ways below. NOTE: you only need use one of the methods described for the particular usage for which it has been described.

### Manual Installation

If you skipped over the section above about creating AutoYaST config files then this is the way in which you should boot your client machines.

1. Turn on your machine, ensure the CD drive is in the boot list of your BIOS, insert the CD. You should be faced with the normal boot menu of the SuSE installation program. As an alternative to booting from CD, you can boot from floppy images, from the network, or using whichever method you would normally use to boot the installation program.
2. Select the "Manual Installation" option from the boot menu
3. Your client should now boot the installation program and present you with a new menu system for the installer
4. Load any network modules you will need in order to connect to your network
5. Load any other modules you might need for installation e.g. SCSI modules if you are installing onto a SCSI type machine.
6. Select "Start Installation" from the menu
7. Choose the NFS option and fill in the IP addresses when prompted for. These should all be familiar to you i.e. the IP address of your server, and perhaps your client and nameserver as well if you have not selected to use DHCP.
8. The installation will now proceed to the configuration screens where you can select the installation options you require for your client in the normal way
9. Once you have configured all the installation options and selected to start the installation process, instead of reading from the normal CD (or other) media, the installation program will read all the information it needs from the network.
10. Don't forget to remove the CD (or other media) from the drive otherwise you could end up with a recursive installation process.
11. Go grab a cup of something while you wait for your shiny new installation to finish, no changing of installation media needed.

### Automatic Installation

If you followed the section above about creating AutoYaST config files then this is the way in which you should boot your client machines.

1. Copy your config file that you have already created as above from your repository directory on your hard disk to your floppy disk as a file called autoinst.xml. You can do this as follows:

       Insert and mount a floppy disk
       cp /var/lib/autoinstall/repository/Your-File /dev/fd0/autoinst.xml
       Unmount the floppy disk

2. Put your floppy disk with the config file in your client machine
3. Turn on your machine, ensure the CD drive is in the boot list of your BIOS, insert the CD. You should be faced with the normal boot menu of the SuSE installation program. As an alternative to booting from CD, you can boot from floppy images, from the network, or using whichever method you would normally use to boot the installation program.
4. At the boot menu leave the default line as Linux to do the standard boot, but add the following parameters in order to read your configuration file from the floppy disk:

       linux autoyast=floppy

5. Your client should now boot the installation program and it will try to load appropriate modules and install the system with the information that you have provided in the config file.
6. If you are prompted to input any information for any reason then do so e.g. if the installer cannot connect to your network.
7. Once the installation is running then you can remove the CD and the floppy disk and grab a cup of something while you wait for your shiny new installation to finish, no changing of installation media needed.

### Further Boot Options

This is an extension to the technique used to boot client machines for Automatic Installations as described above. You should try this method if you have tried and failed with the method above. This section should help you if you have had network connection problems during boot, for example, if you do not have a DHCP server on your network.

You can create what we call an "info" file to hold information about your clients network details. This can then be used more explicitly by the install process to contact your network. This is a plain text file in which you put certain keyword and value combinations that are recognised by the installer.

The list of keywords you can use is as follows:

- autoyast - the location of your configuration file
- gateway - the gateway your client should use (if any)
- insmod - any special kernel modules you need to be loaded
- install - a full path to your server installation directory
- ip - the address of your client machine. If this is blank then the installer will try BOOTP/DHCP
- nameserver - the nameserver address on your network
- netdevice - the network adaptor you want to be used
- netmask - your client's netmask
- server - the hostname or IP address of the server you have set up i.e. the machine you have your NFS exports from
- serverdir - the directory on your server the installation should be taken from

Using the above keywords in an example info file, you might end up with something looking a little bit like this:

    install: nfs://10.0.0.100/install/SuSE8.0
    netdevice: eth0
    server: 10.0.0.100
    serverdir: /install/SuSE8.0
    ip: 10.0.0.200
    netmask: 255.0.0.0
    gateway: 10.0.0.1
    nameserver: 10.0.0.2
    autoyast: floppy

Substitute the IP addresses above for relevant ones for your particular network and save this file with filename `info` in the root directory of your floppy disk that contains your configuration file `autoinst.xml`

Next Previous Contents