Chapter 4. Configuration and Installation Options

4.1. Closer look on control file resources

This section features the most important parts of a control file for standard purposes. To have an idea about the other options available, please consult the reference or use the configuration management system.

4.1.1. General Options

This is a required section of the profile. General options include all the settings related to the installation process and the environment of the installed system. This resource includes among other the following 4 properties which are required: language, keyboard, clock and mouse almost for any installation. If left out, default values will be used, which might not be in one hand with how you want the system to be installed.

Example 4-1. General Options

    <install>
...
        <general>
          <language>de_DE</language>
          <keyboard>
                <keymap>german</keymap>              
            </keyboard>
            <clock>
                <timezone>US/Eastern</timezone>
                <utc config:type="boolean">true</utc>
                <ntp_servers config:type="list">
                    <ntp_server>ntp.example.com</ntp_server>
                </ntp_servers>
            </clock>
            <mouse>
                <id>ps0</id>
                <device>/dev/psaux</device>     
            </mouse>
            <mode>                
                <confirm config:type="boolean">false</confirm>
                <reboot  config:type="boolean">false</reboot>
            </mode>

        </general>
...
    </install>


	

The reboot property in the mode resource is used to force a reboot after initial system setup and before the system is booted for the first time.

By default, the auto-installation process has to be confirmed by the user. The confirmation should be disabled if a fully unattended installation is desired. This options is used to view and change the settings on a target system before anything is changed and can be used for debugging. It is set to true by default to avoid recursive installs when the system schedules a reboot due to a different kernel than the default or if a reboot was requested in the control file.

4.1.2. Reporting

The report resource manages 3 types of pop-ups that may appear during installation.

  • Pop up messages (Normally only non-critical, informative messages)

  • Warning messages (If something might go wrong)

  • Error messages (In the case of an error)

Example 4-2. Reporting Behavior

    <install>
...
       <report>    
            <messages>
                <show config:type="boolean">true</show>
                <timeout config:type="integer">10</timeout>
                <log config:type="boolean">true</log>
            </messages>
            <errors>
                <show config:type="boolean">true</show>
                <timeout config:type="integer">10</timeout>
                <log config:type="boolean">true</log>
            </errors>
            <warnings>
                <show config:type="boolean">true</show>
                <timeout config:type="integer">10</timeout>
                <log config:type="boolean">true</log>
            </warnings>
       </report>
...
    </install>

	

Depending on your experience, you can skip, log and show (with timeout) those messages. It is recommended to show all messages with timeout. Warnings can be skipped in some places but should not be ignored.

The default setting in auto-installation mode is to show all messages without logging and with a timeout of 10 seconds.

NoteCritical system messages
 

Note that not all messages during installation are controlled by the report resource. Some critical messages concerning package installation and partitioning will still show up ignoring your settings in the report section.

4.1.3. The Boot loader

If you do not want to install a boot loader, you have to specify this using the write_bootloader property (Boolean value). In this case make sure you create a boot disk or have another way to boot your system (such as a third-party boot loader). Note that the default setting is to write the bootloader

If you choose to install a boot loader, you must decide where to to install it (the Master Boot Record or the first sector of the /boot partition).

You can pass special parameters to the kernel to be used when the system boots, enter these parameters using the kernel parameters property. Additionally, you can choose whether you want to use linear mode and whether you want to force the use of lba32 mode.

Example 4-3. Bootloader configuration

    <install>
...
         <bootloader>
             <write_bootloader config:type="boolean">true</write_bootloader>
             <location>mbr</location>
             <linear  config:type="boolean">false</linear>
             <lba_support  config:type="boolean">false</lba_support>
             <activate  config:type="boolean">true</activate>
             <kernel_parameters>foo=bar bar=foo</kernel_parameters>
             <initrd_modules  config:type="list" >
                 <module>+++some kernel module name+++</module>
             </initrd_modules>
         </bootloader>
...
    </install>

	

4.1.4. Partitioning

4.1.4.1. Automated Partitioning

For the automated partitioning to be completed, only the sizes and mount points of partitions are required. All other data needed for successful partitioning can be calculated during installation if not given in the control file.

If no partitions are defined and the specified drive is also the drive where the root partition should reside, the following partitions are created automatically:

  • /boot

    Size of the /boot is determined by the architecture of the target system.

  • swap

    Size of the swap partitions is determined by the amount of memory available in the system.

  • / (root partition)

    Size of the / (root partition) is the space left after creating swap and /boot.

Depending on the initial status of the drive and how it was previously partitioned, it is possible to create the default partitioning in the following ways:

  • Use free space

    If the drive is already partitioned, it is possible to create the new partitions on the available space of the hard drive. This requires the availability of enough space for all selected package in addition to swap.

  • Reuse all available space

    This option will lead to the deletion of existing partitions.

  • Reuse only specified partitions

    This option will lead to the deletion of the specified partitions. The selection of the partitions scheduled for deletion should be started from the last available partition.

In case of the presence of multiple drives in the target system, all drives should be identified with their device names and the way the partitioning should be performed.

Partition sizes can be given in Gigabytes, Megabytes or can be set to a flexible value using the keywords auto and max. max is used to fill a partition to the maximal available space on a drive (Which mean that the partition is the last one on the drive). auto can be used to determine the size of a swap or boot partitions which depend on memory and the type of the system.

A fixed size can be given as shown below:

Size. 1gb will create a partition with 1 GB size. 1500mb will create a parition which is 1.5 GB big.

Example 4-4. Automated partitioning

The following is an example of a single drive system, which is not pre-partitioned and should be automatically partitioned according to the described pre-defined partition plan:

....
<partitioning  config:type="list">
     <drive>
        <device>/dev/hda</device>       
        <use>all</use>
     </drive>
</partitioning>
.....

	  

A more detailed example shows how existing partitions and how multiple drives are handled.

Example 4-5. Detailed automated partitioning

....
<partitioning  config:type="list">
     <drive>
        <device>/dev/hda</device>        
        <use>free</use>
        <partitions config:type="list">
           <partition>
              <mount>/</mount>
              <size>5gb</size>
           </partition>
           <partition>
              <mount>swap</mount>
              <size>1gb</size>
           </partition>
        </partitions>
     </drive>
     <drive>
        <device>/dev/hdb</device>
        <use>all</use>
        <partitions config:type="list">
           <partition>
              <mount>/data1</mount>
              <size>15gb</size>
              <filesystem config:type="symbol">reiser</filesystem>
           </partition>
           <partition>
              <mount>/data2</mount>
              <size>auto</size>
              <filesystem config:type="symbol">jfs</filesystem>
           </partition>
        </partitions>
     </drive>
</partitioning>
.....

	  

4.1.4.2. Advanced Partitioning features

By default, AutoYaST2 will create an extended partition and adds all new partitions as logical devices. It is possible however to instruct AutoYaST2 to create a certain partition as a primary partition or as extended partition. Additionally, it is possible to specify the size of a partition using sectors rather than size in Mbytes.

The properties partition_id and partition_type control such behaviour. To specify the size in sectors, the list resource region should be used:

Example 4-6. Advanced Automated partitioning

....
    <partitioning config:type="list">
      <drive>
        <device>/dev/hdc</device>
        <partitions config:type="list">
          <partition>
            <partition_id config:type="integer">5</partition_id>
            
            <region config:type="list">
              <region_entry config:type="integer">0</region_entry>
              <region_entry config:type="integer">16858</region_entry>
            </region>
            <size>8699830273</size>
          </partition>
          <partition>
            <filesystem config:type="symbol">reiser</filesystem>
            <mount>/</mount>
            <partition_id config:type="integer">131</partition_id>           
            <region config:type="list">
              <region_entry config:type="integer">0</region_entry>
              <region_entry config:type="integer">2081</region_entry>
            </region>
            <size>1073479681</size>
          </partition>
          <partition>
            <mount>swap</mount>
            <partition_id config:type="integer">130</partition_id>          
            <region config:type="list">
              <region_entry config:type="integer">2081</region_entry>
              <region_entry config:type="integer">781</region_entry>
            </region>
            </partition>
        </partitions>
        <use>all</use>
      </drive>
     </partitioning>
.....

	  

4.1.4.3. Logical Volume Manager (LVM)

To configure LVM, first you need to create a physical volume using the normal partitioning method described above.

Example 4-7. Create LVM Physical Volume

The following example shows how to prepare for LVM in the partitioning resource:

....
<partitioning config:type="list">
     <drive>
         <device>/dev/sda</device>         
         <use>all</use>
         <partitions config:type="list">
            <partition>
               <size>max</size>
               <lvm_group>system</lvm_group>
               <partition_type>primary</partition_type>
            </partition>
         </partitions>
     </drive>
</partitioning>
.....

	    

The last example will create a non-formatted partition on device /dev/sda1 of the type LVM and with the volume group system. The partition created will use all available space on this drive.

The logical volumes should be defined in the lvm resource. Currently it is not possible to configure LVM using the configuration system, instead it is required to add the resource manually as shown in the following example.

Example 4-8. LVM Logical Volumes

....
  <lvm config:type="list">
     <lvm_group>
      <lvm_name>system</lvm_name>
      <pesize>4M</pesize>
      <logical_volumes config:type="list">
        <lv>
           <lv_name>usrlv</lv_name>
              <lv_size>500mb</lv_size>
              <lv_fs>reiser</lv_fs>
              <lv_mount>/usr</lv_mount>
           </lv>
           <lv>
              <lv_name>optlv</lv_name>
              <lv_size>1500mb</lv_size>
              <lv_fs>reiser</lv_fs>
              <lv_mount>/opt</lv_mount>
           </lv>
           <lv>
              <lv_name>varlv</lv_name>
              <lv_size>200mb</lv_size>
              <lv_fs>reiser</lv_fs>
              <lv_mount>/var</lv_mount>
           </lv>
      </logical_volumes>
   </lvm_group>
  </lvm>
.....

	    

4.1.4.4. Software RAID

Using AutoYaST2, you can create and assemble software RAID devices. The supported RAID levels are the following:

  • RAID 0: This level increases your disk performace. There is NO redundancy in this mode. If one of the drives crashes, data recovery will not be possible.

  • RAID 1:This mode has the best redundancy. It can be used with two or more disks. This mode maintains an exact copy of all data on all disks. As long as at least one disk is still working, no data is lost. The partitions used for this type of RAID should have approximately the same size.

  • RAID 5: This mode combines management of a larger number of disks and still maintains some redundancy. This mode can be used on three disks or more. If one disk fails, all data is still intact. If two disks fail simultaneously, all data is lost.

  • Multipath:This mode allow access to the same physical device over multiple controller for redundancy against a fault in a controller card. This mode can be used with at least two devices.

As with LVM, you need to create all RAID partitions first and assign the partitions to the RAID device you want to create and you need to specify whether a partition or a device should be configured in the RAID or if it should configured as a Spare device.

The following example shows a simple RAID1 configuration:

Example 4-9. RAID1 configuration

....
   <partitioning config:type="list">
      <drive>
        <device>/dev/hdc</device>
        <partitions config:type="list">
          <partition>
            <partition_id config:type="integer">253</partition_id>
            <format config:type="boolean">false</format>
            <raid_name>/dev/md0</raid_name>
            <size>4gb</size>            
          </partition>

          <!-- Here come the regular partitions, i.e. / and swap -->        

        </partitions>
        <use>all</use>
      </drive>
      <drive>
        <device>/dev/sda</device>
        <use>all</use>
        <partitions config:type="list">
          <partition>
             <partition_id config:type="integer">253</partition_id>
             <format config:type="boolean">false</format>
             <raid_name>/dev/md0</raid_name>            
             <size>4gb</size>
          </partition>
         </partitions>
       </drive>
   </partitioning>

   <raid config:type="list">
       <raid_device>
          <device_name>/dev/md0</device_name>
          <parity_algorithm>left-asymmetric</parity_algorithm>
          <persistent_superblock  config:type="boolean">true</persistent_superblock>
          <raid_type>raid1</raid_type>
          <filesystem_id config:type="integer">131</filesystem_id>
          <chunk_size>4</chunk_size>
          <mount>/space</mount>
          <format config:type="boolean">true</format>
          <filesystem config:type="symbol">reiser</filesystem>
       </raid_device>
    </raid>

....
	  
	    

4.1.5. Software

4.1.5.1. Package Selections

You can install software on the new system using the following different ways:

  • Use a pre-defined package base selection, i.e. Minimal, Minimal+X11, default etc. in addition to several Add-on selections.

  • Custom package selection, i.e. package selection of an existing system using the rpm command or similar tools.

  • Additional local packages, i.e. external packages (non SuSE packages) and packages for initial system setup and configuration.

In the control file, packages and package selections are described as the following:

Example 4-10. Package selection in control file

....
<software>
   <base>Minimal</base>
   <addons  config:type="list">
        <addon>Kde</addon>
   </addons>
   <packages  config:type="list">
        <package>apache</package>
        <package>sendmail</package>
   </packages>
</software>
....

	  

A list of possible pre-defined selections can be found on the first CD-ROM in the directory suse/setup/decr. You can install one base selection and additionaly one or multiple add-on selections.

When installing from a CDROM, needed packages from other CDROMs are installed after the initial booting of the system in the so-called continue mode. If you are installing packages from multiple CDROMs, then auto-installation has to be interrupted for switching the CDROMs. In the case of NFS installation, all packages are installed at first stage of the installation only if the NFS repostiry is configured as a one medium.

It is often required, that a package should be installed in the continue mode, especially custom packages which may contain scripts for configuring the system. This can be done using the post-packages resource.

4.1.5.2. Kernel packages

Kernel packages are not part of any selection. The required kernel is determined during installation. If the kernel package is added to any selection or to the individual package selection, installation will mostly fail due to conflicts.

To force the installation of a specific kernel, use the kernel property. The following is an example forcing the installation of the default kernel. In this example this kernel will be installed in any case, even if an SMP or other kernel is required

Example 4-11. Package selection in control file

....
<software>
   <base>Minimal</base>
   <kernel>k_deflt</kernel>
   <addons  config:type="list">
        <addon>Kde</addon>
   </addons>
   <packages  config:type="list">
        <package>apache</package>
        <package>sendmail</package>
   </packages>
</software>
....

	  

4.1.5.3. Custom Package Selections

In addition to the pre-defined selections, you can create custom selections by providing a customized selection file in the selection directory. (suse/setup/descr) The selection files have a special format and any additional selection file must conform to this format, otherwise YaST2 will not be able to read it.

As an example for the selection file, please take a look at the files available in the directory /suse/setup/descr/ on the CD-ROMs.

After creating a selection file, you can add it to the configuration as described earlier in this section.

Example 4-12. Customized Package selection

....
<software>
   <base>My</base>

</software>
....

	  

The file My.sel should have the following format:

Example 4-13. Package selection file

# SuSE-Linux-Package-Selection 3.0 -- (c) 2002 SuSE Linux AG
# generated on Sat Aug 10 17:55:42 UTC 2002

=Ver: 3.0

# name version release
=Sel: Kde-Desktop 8.1

# size in bytes (pkgsize instsize)
=Siz: 123456 1234567

# Summary
=Sum.cs: ProstÅ?edí KDE
=Sum.de: KDE Desktop-Umgebung
=Sum.en: KDE Desktop Environment
=Sum.es: Entorno Gráfico KDE
=Sum.fr: Environnement de bureau KDE
=Sum.gl: KDE Desktop Environment
=Sum.hu: KDE grafikus munkakörnyezet
=Sum.it: Ambiente Desktop KDE
=Sum.ja: KDE ã??ã,¹ã,¯ã??ã??ã?-ç'°å¢?
=Sum.lt: KDE Desktop Environment
=Sum.nl: KDE Desktop omgeving
=Sum.pt: KDE Desktop Environment
=Sum.sv: KDE Desktop Environment
=Sum.tr: KDE Desktop Environment

# selections required for installation
=Req: X11 Basis-Sound 
# conflicting selections
=Con: Minimal 
# category, add-on or base
=Cat: addon

# visibility of selection (for user interface)
=Vis: true

# list of packages to install
+Ins:
SDL
aalib
alsa

... 
smpppd
unixODBC
wvdial
-Ins:

# list of packages to install if given language is active

+Ins.cs:
kde3-i18n-cs
-Ins.cs:

+Ins.da:
kde3-i18n-da
-Ins.da:

+Ins.de:
kde3-i18n-de
-Ins.de:

... 


	  

4.1.5.4. Installing additional and customized Packages

In addition to the packages available for installation on the CDs, you can add external packages including customized kernels. Customized kernel packages must be compatible to the SuSE packages and must install the kernel files to the same locations.

Unlike earlier versions, to install custom and external packages there is no need for a special resource in the control file. Instead you need to re-create the package database and update it with any new packages or new package versions in the source repository.

A script is provided for this task which will query packages available in the repository and create the required package database.

Creating a new package database is only needed if new RPMs (i.e. update RPMs) were added. To re-create the database, use the /usr/lib/YaST2/bin/create_package_descr command. For example, use this command line to create the package database for all languages. (When creating the database, all languages will be reset to english).

Example 4-14. Creating package database

cd /usr/local/CDs/8.1/suse
/usr/lib/YaST2/bin/create_package_descr  -d /usr/local/CDs/8.1/suse  -l english -l german -l czech
	    

In the above example, the directory /usr/local/CDs/8.1/suse contains the architecture dependent and independent packages, i.e. noarch and i586.

The advantage of this method is that you can keep an up-to-date repository with fixed and updated package (i.e. from SuSE ftp server). Additionally this method makes the creation of custom CDs easier.

4.1.6. Services and Runlevels

With the runlevel resource you can set the default runlevel and specify in detail which system services you want to be started in which runlevel.

The default property specifies the default run level of the system. Changes to the default runlevel will take effect the next time you boot the system. After installation is completed, the system has runlevel 5, which is Full multiuser with network and xdm. If you have configured a system with no X11, then it is recommended to reboot the system after the first stage using the reboot property in the general resource.

A service should run in using a space delimited list of the runlevels as shown in the following example. An alternative to specifying the exact runlevels is to change the status of the service by either enabling or disabling it using the service_status property.

Example 4-15. Run-level Configuration

<configure>
....
  <runlevels>
   <default>3</default>
   <services config:type="list" >   
    <service>
     <service_name>at</service_name>
     <service_start>3 5</service_start>
     <service_stop>2 3 5</service_stop>
    </service>
    <service>
     <service_name>portmap</service_name>
     <service_status>enable</service_status>    
    </service>
    <service>
     <service_name>hwscan</service_name>
     <service_status>disable</service_status>    
    </service>
   </services>
  </runlevels>
....
</configure>

	

4.1.7. Network configuration

4.1.7.1. Network devices, DNS and Routing.

Network configuration is used to connect a single SuSE Linux workstation to an Ethernet-based LAN or to configure dial-up connection. More complex configuration (multiple network cards, routing, etc.) is now also provided. With this module it's possible to configure (set-up) Ethernet Controllers and Token-Ring Controllers.

To configure network settings and activate networking automatically, one global resource is used to store the whole network configuration.

Example 4-16. Network configuration

 <configure>
.....
    <networking>
      <dns>
        <dhcp_hostname config:type="boolean">true</dhcp_hostname>
        <dhcp_resolv config:type="boolean">true</dhcp_resolv>
        <domain>local</domain>
        <hostname>linux</hostname>
      </dns>
      <interfaces config:type="list">
        <interface>
          <bootproto>dhcp</bootproto>
          <device>eth0</device>
          <module>tulip</module>
          <options>options=0</options>
          <startmode>onboot</startmode>
        </interface>
      </interfaces>
      <routing>
        <ip_forward config:type="boolean">false</ip_forward>
        <routes config:type="list">
          <route>
            <destination>default</destination>
            <device>-</device>
            <gateway>192.168.1.240</gateway>
            <netmask>-</netmask>
          </route>
        </routes>
      </routing>
    </networking>
....
 </configure>

	  

4.1.7.2. Proxy

Configure your Internet proxy (caching) settings using this resource.

HTTP proxy is the name of the proxy server for your access to the world wide web (WWW). FTP proxy is the name of the proxy server for your access to the file transfer services (FTP). No proxy domains is a list of domains for which the requests should be done directly without caching.

If you are using a proxy server with authorization, fill in Proxy user name and Proxy password.

Example 4-17. Netwrok configuration: Proxy

<configure>
...
    <proxy>
       <http_proxy>proxy.example.com:3128</http_proxy>
       <ftp_proxy>proxy.example.com:3128</ftp_proxy>
       <no_proxy>localhost</no_proxy>
       <proxy_user>user</proxy_user>
       <proxy_password>password</proxy_password>
    </proxy>
...
</configure>

	  

4.1.7.3. NIS

The target machine can be set up as a NIS client. You can specify multiple servers by using the list attribute (config:type="list").

Example 4-18. Network configuration: NIS

<configure>
...
    <nis>
      <nis_broadcast config:type="boolean">true</nis_broadcast>
      <nis_broken_server config:type="boolean">true</nis_broken_server>
      <nis_domain>test.com</nis_domain>
      <nis_local_only config:type="boolean">true</nis_local_only>
      <nis_servers config:type="list">
        <nis_server>192.168.1.1</nis_server>
      </nis_servers>
      <start_autofs config:type="boolean">true</start_autofs>
      <start_nis config:type="boolean">true</start_nis>
    </nis>
...
</configure>

	  

4.1.7.4. NIS+

If you activate NIS+, the data of the NIS+ Server will be added to /etc/hosts. Keyserv and the NIS+ cache manager will be started and the NSS and PAM configuration will be modified to use NIS+ and set the Secret Key of a user.

Example 4-19. Network configuration: NIS+

<configure>
...
          <nisplus>
              <start_nisplus config:type="boolean">true</start_nisplus>
              <nisplus_domain>Domain</nisplus_domain>
              <nisplus_address>Address</nisplus_address>
              <start_autofs>true</start_autofs>
          </nisplus>
...
</configure>

	  

4.1.7.5. LDAP client

The installed machine can be set up as > LDAP client to authenticate users with an Open LDAP server. Required data are the name of the search base (base DN, e.g, dc=mydomain,dc=com) and the IP address of the LDAP server (e.g., 10.20.0.2).

If LDAP is activated, NSS and PAM will be configured accordingly to use LDAP for user authentication.

Example 4-20. Network configuration: LDAP client

<configure>
...
         <ldap>
             <start_ldapclient config:type="boolean">false</start_ldapclient>
             <ldap_domain>domain</ldap_domain>
             <ldap_address>192.168.1.1</ldap_domain>
         </ldap>
...
</configure>

	  

4.1.7.6. NFS

Batch operation of NFS Client module is not programmed in (nfs_write with options), but the already written routine, nfs_client_save can be used for auto-installation and /etc/fstab configuration.

Example 4-21. Network configuration: NFS

<configure>
...
         <nfs config:type="list">
           <entry>
             <server_path>server:/space</server_path>
             <mount_point>/space</mount_point>
             <nfs_options>default</nfs_options>
           </entry>
         </nfs>
...
</configure>

	  

4.1.7.7. Mail Configuration (Sendmail or Postfix)

For the mail configuration of the client the existing module for mail configuration available in the running system is used. This module enables very sophisticated mail configuration and should be used instead of editing the mail resource manually.

Example 4-22. Mail Configuration

<configure>
...
    <mail>
        <mta>sendmail</mta>
        <connection_type>permanent</connection_type>
        <local_domains config:type="list"></local_domains>
        <outgoing_mail_server></outgoing_mail_server>
        <from_header ></from_header>
        <masquerade_other_domains config:type="list"></masquerade_other_domains>
        <masquerade_users config:type="list"></masquerade_users>
        <fetchmail config:type="list"></fetchmail>
        <aliases config:type="list"></aliases>
        <merge_aliases></merge_aliases>
        <virtual_users config:type="list"></virtual_users>
    </mail>
...
</configure>

	    

4.1.8. Security settings

Using the features of this module, you will be able to change the local security settings on the target system. The local security settings include the boot configuration, login settings, password settings, user addition settings, and file permissions.

Configuring the security settings automatically corrosponds to the Custom Settings in the security module available in the running system which lets you create your own, customized configuration.

Example 4-23. Security configuration

Please see the reference for the meaning and the possible values of the settings in the ollowing example.

<configure>
...
   <security>
      <console_shutdown>ignore</console_shutdown>
      <cwd_in_root_path>no</cwd_in_root_path>
      <displaymanager_remote_access>no</displaymanager_remote_access>
      <fail_delay>3</fail_delay>
      <faillog_enab>yes</faillog_enab>
      <gid_max>60000</gid_max>
      <gid_min>101</gid_min>
      <kdm_shutdown>root</kdm_shutdown>
      <lastlog_enab>yes</lastlog_enab>
      <encryption>md5</encryption>
      <obscure_checks_enab>no</obscure_checks_enab>
      <pass_max_days>99999</pass_max_days>
      <pass_max_len>8</pass_max_len>
      <pass_min_days>1</pass_min_days>
      <pass_min_len>6</pass_min_len>
      <pass_warn_age>14</pass_warn_age>
      <passwd_use_cracklib>yes</passwd_use_cracklib>
      <permission_security>secure</permission_security>
      <run_updatedb_as>nobody</run_updatedb_as>
      <uid_max>60000</uid_max>
      <uid_min>500</uid_min>
  </security>
...
</configure>

	

4.1.8.1. Password Settings Options

Change various password settings. These settings are mainly stored in the /etc/login.defs file.

Use this resource to activate one of the encryption methods currently supported. If notset, DES is configured.

DES, the Linux default method, works in all network environments, but it restricts you to passwords no longer than eight characters. MD5 allows longer passwords, thus provides more security, but some network protocols don't support this, and you may have problems with NIS. Blowfish is also supported.

Additionally, you can setup the system to check for password plausibility and length etc.

4.1.8.2. Boot Settings

Use the security resource, you can change various boot settings.

  • How to interpret Ctrl + Alt + Del

    When someone at the console has pressed the CTRL + ALT + DEL key combination, the system usually reboots. Sometimes it is desirable to ignore this event, for example, when the system serves as both workstation and server.

  • Shutdown behavior of KDM

    Set who is allowed to shut down the machine from KDM.

4.1.8.3. Login Settings

Change various login settings. These settings are mainly stored in the '/etc/login.defs' file.

4.1.8.4. New user settings (useradd settings)

Set the minimum and maximum possible user ID and set the minimum and maximum possible group ID.

4.1.9. Users

The root user and at least one normal user can be added during install using data supplied in the control file. User data and passwords (encrypted or clear text) are part of the configure resource in the control file.

At least the root user should be configured during auto-installation, which will insure you will be able to login after installation is finished and of course it insure nobody else can login into the system (if password is not set).

The two users in the following example are added during system configuration.

Example 4-24. User configuration

<configure>
...
   <users config:type="list">
      <user>
         <username>root</username>
         <user_password>password</user_password>
         <encrypted config:type="boolean">true</encrypted>
         <forename/>
         <surname/>
      </user>
      <user>
         <username>nashif</username>
         <user_password>password</user_password>
         <encrypted config:type="boolean">true</encrypted>
         <forename>Anas</forename>
         <surname>Nashif</surname>	  	
      </user>
   </users>
...
</configure>

	

The last example shows the minimal information required for adding users. More options are available for a more customized user account management. The data in /etc/default/useradd is used to determine the home directory of the user to be created in addition to other parameters. Please see the resource reference section for more options.

4.1.10. Custom user scripts

By adding scripts to the auto-installation process you can customize the installation for your needs and take control in different stages of the installation.

In the auto-installation process, three types of scripts can be executed:

  • Pre-Install Scripts

    Executed before YaST2 does any real change of the system (Before partitioning and package installation)

  • Post-Install Scripts

    These scripts are executed after YaST2 has completed the installation and after it has booted the system the first time.

  • Chroot environment post-install scripts

    Chroot scripts are executed in the chroot environment before YaST2 boots for the first time and before the boot loader is installed.

All but the pre-install scripts can be written in either shell or perl script language. When added to the control file manually, the scripts have to be included in a CDATA element to avoid confusion with the file syntax and other tags defined in the control file.

Please see the resource reference for more options.

Example 4-25. Post script configuration


<scripts>
....
  <post-scripts config:type="list" >
   <script>
    <filename>post.sh</filename>
    <interpreter>shell</interpreter>
    <source>

<![CDATA[
#!/bin/sh
echo "Do something usefull"

]]>

    </source>
   </script>
  </post-scripts>

...
</scripts>

	

After installation is finished, the scripts and the output logs can be found in the directory /var/adm/autoinstall. The scripts are located in scripts and the output log of the scripts is located in the log directory.

The log is the output resulting when executing the shell scripts using the following command:

	  
	  /bin/sh -x <script_name> 2&> /var/adm/autoinstall/logs/<script_name>.log
	  
	

4.1.11. System variable (Sysconfig)

Using the sysconfig resource, you will be able to define configuration variables in the sysconfig repository (/etc/sysconfig) directly. Using the sysconfig variables, you will beable to fine-tune many system components and environment variables exactly to your needs.

Please consult the handbook for more details about the many configuration options available in /etc/sysconfig

The following example show how a variable can be set using the sysconfig resource.

To configure a variable in a sysconfig file, the following syntax is used:

Example 4-26. Sysconfig Configuration

  <sysconfig config:type="list" >
   <sysconfig_entry>
    <sysconfig_key>XNTPD_INITIAL_NTPDATE</sysconfig_key>
    <sysconfig_path>xntp</sysconfig_path>
    <sysconfig_value>ntp.host.com</sysconfig_value>
   </sysconfig_entry>
   <sysconfig_entry>
    <sysconfig_key>HTTP_PROXY</sysconfig_key>
    <sysconfig_path>proxy</sysconfig_path>
    <sysconfig_value>proxy.host.com:3128</sysconfig_value>
   </sysconfig_entry>
   <sysconfig_entry>
    <sysconfig_key>FTP_PROXY</sysconfig_key>
    <sysconfig_path>proxy</sysconfig_path>
    <sysconfig_value>proxy.host.com:3128</sysconfig_value>
   </sysconfig_entry>
  </sysconfig>
	    
	  

4.1.12. Adding complete configurations

For many applications and services you might have prepared a configuration file which should be copied in a complete form to some location in the installed system. This is for example if you are installing a web server and have a ready to go server configuration file (httpd.conf).

Using this resource, you can embbed the file into the control file by specifying the final path on the installed system. YaST2 will copy this file to the specified location.

Example 4-27. Dumping files into the installed system

  <files config:type="list">
      <config_file>
        <file_path>/etc/httpd/httpd.conf</file_path>
        <file_contents>

<![CDATA[
some content
]]>

       </file_contents>
     </config_file>
  </files>

	

4.1.13. Miscellaneous hardware and system components

In addition to the core component configuration, like network authentication and security, AutoYaST2 offers a wide range of hardware and system configuration which is available by default on any system installed manually and in an interactive way. For example, it is possible to configure printers, sound devices, TV cards and any other hardware components which have a module within YaST2.

Any new configuration options that will be added to YaST2 will be automatically available as an auto-installation resource.

4.1.13.1. Printer

Although Printer configuration, like other configurations can be done manually, it is recommended to use the Configuration System to create such a configuration because of the complexity and the range of options offered by such modules.

Using the configuration system will guarantee that the options provided are consistent. The following is an example of a configuration section which was created using the configuration system.

Example 4-28. Printer configuration

 <configure>
....
    <printer>
      <default>lp</default>
      <printcap config:type="list">
        <printcap_entry>
          <cups-state>void</cups-state>
          <ff config:type="boolean">true</ff>
          <info></info>
          <location></location>
          <lprng-state>changed</lprng-state>
          <name>lp</name>
          <options>
            <job-sheets>none,none</job-sheets>
          </options>
          <raw config:type="boolean">true</raw>
          <type>yast2</type>
          <uri>parallel:/dev/lp0</uri>
        </printcap_entry>
      </printcap>
    </printer>
....
 </configure>

	    

4.1.13.2. Sound devices

An example of sound configuration created using the configuration system is shown below.

Example 4-29. Sound configuration

 <configure>
....
    <sound>
      <autoinstall config:type="boolean">true</autoinstall>
      <modules_conf config:type="list">
        <module_conf>
          <alias>snd-card-0</alias>
          <model>M5451, ALI</model>
          <module>snd-ali5451</module>
          <options>
            <snd_enable>1</snd_enable>
            <snd_index>0</snd_index>
            <snd_pcm_channels>32</snd_pcm_channels>
          </options>
          <unique_key>uniq.virtual</unique_key>
        </module_conf>
      </modules_conf>
      <volume_settings config:type="list">
        <listentry>
          <Master config:type="integer">75</Master>
        </listentry>
      </volume_settings>
    </sound>

....
 </configure>