Solaris Advanced Installation Guide

Chapter 6 Preconfiguring System Configuration Information

The Solaris installation program needs to obtain configuration information about a system (such as the system's peripheral devices, host name, IP address, name service) before it can install the system. Before prompting the user for the configuration information, the installation program looks for the information in either the specified sysidcfg file or the name service databases (in that order).

This section describes how to preconfigure the information in a sysidcfg file or in the name service databases, so you can avoid being prompted for the information every time you install a system. For example, if you have a large number of systems and you don't want to be prompted for the time zone every time you install one of the systems, you can preconfigure the time zone and have it automatically set during each installation. Preconfiguring system configuration information is one of the most important steps to completely automate custom JumpStart installations.

Choose a Method for Preconfiguring

There are two ways to preconfigure system configuration information. You can add the information to:

Use Table 6-1 to determine which method to use to preconfigure system configuration information.

Table 6-1 Methods to Preconfigure System Configuration Information

If You Want to Preconfigure ... 

And Your Platform Is ... 

Can You Preconfigure With the sysidcfg File?

Can You Preconfigure With the Name Service?

Name service 

Domain name 

Name server 

All 

All 

All 

Yes 

Yes 

Yes 

Yes 

No 

No 

Network interface 

Host name 

IP address 

Netmask 

All 

All 

All 

All 

Yes 

Yes [Because this information is system specific, edit the name service rather than create a different sysidcfg file for each system.]

Yes1

Yes 

No 

Yes2

Yes2

No 

Root password 

All 

Yes 

No 

Language (locale) in which to display the install program and desktop 

All 

Yes 

Yes 

Terminal type 

All 

Yes 

No 

Time zone 

All 

Yes 

Yes [This information is automatically preconfigured if you've added clients using Solstice AdminSuiteTM Host Manager.]

Date and time 

All 

Yes 

Yes 

Monitor type 

x86 

Yes 

No 

Keyboard language, keyboard layout 

x86 

Yes 

No 

Graphics card, color depth, display resolution, screen size 

x86 

Yes 

No 

Pointing device, number of buttons, IRQ level 

x86 

Yes 

No 

Power ManagementTM (autoshutdown) [This system configuration information cannot be preconfigured through the sysidcfg file or the name service. See "Preconfiguring Power Management Information" for more details.]

SPARC 

No 

No 

Preconfiguring With the sysidcfg File

The sysidcfg file preconfigures the information through a set of keywords that specify the pieces of information you want to preconfigure. The keywords are described in Table 6-2. You can choose to provide one or more of the keywords to preconfigure as much information as you want.

Every system that requires different configuration information must have a different sysidcfg file. For example, you could use the same sysidcfg file to preconfigure the time zone for multiple systems if you wanted all the systems to have the same time zone. However, if you wanted to preconfigure a different root password for each of those systems, then each system would need to have its own sysidcfg file.

The sysidcfg file can reside on a shared NFS network directory or the root directory on a UFS or PCFS diskette in the system's diskette drive. If you put the sysidcfg file on a shared NFS network directory, you must use the -p option of the add_install_client command (when you set up the system to install over the network) to specify where the system can find the sysidcfg file when it installs.

If you put the sysidcfg file on a diskette, you must make sure the diskette is in the system's diskette drive when the system boots (on x86-based systems, the sysidcfg file should reside on the Configuration Assistant diskette). Also, if you are using a profile diskette, the sysidcfg file should reside on the profile diskette.


Note -

Only one sysidcfg file can reside in a directory or diskette. If you are creating more than one sysidcfg file, each file must reside in a different directory or diskette.


Syntax Rules

Syntax Rules 

For Example ... 

Keywords can be listed in any order. 

pointer=MS-S

display=ati {size=15-inch}

Keywords are not case sensitive. 

TIMEZONE=US/Central

terminal=PC Console

Values can optionally be enclosed in single (`) or double quotes ("). 

network_interface='none'

Only one instance of a keyword is valid; however, if you specify more than one keyword, only the first one will be used. 

network_interface=none

network_interface=le0

SPARC: Example sysidcfg File

The following example is a sysidcfg file for a group of SPARC-based systems. (The host names, IP addresses, and netmask of these systems have been preconfigured by editing the name service.) Because all the system configuration information has been preconfigured, an automated installation can be created by using a custom JumpStart profile.


system_locale=en_US
timezone=US/Central
terminal=sun-cmd
timeserver=localhost
name_service=NIS {domain_name=marquee.central.sun.com
                  name_server=connor(129.152.112.3)}
root_password=m4QPOWNY

x86: Example sysidcfg File

The following example is a sysidcfg file created for a group of x86-based systems that all have the same keyboard, graphics cards, and pointing devices. The device information (keyboard, display, and pointer)was obtained by running the kdmconfig -d command. In this example, users would see the prompt to select a language (system_locale) for displaying the rest of the Solaris installation program.


keyboard=ATKBD {layout=US-English}
display=ati {size=15-inch}
pointer=MS-S
timezone=US/Central
timeserver=connor
terminal=AT386
name_service=NIS {domain_name=marquee.central.sun.com
                  name_server=connor(129.152.112.3)}
root_password=URFUni9

How to Create a sysidcfg Configuration File

  1. Open a text file (it must be named sysidcfg) using the editor of your choice.


    Note -

    If you create multiple sysidcfg files, each one must be in a separate directory or diskette.


  2. Enter the sysidcfg keywords shown in Table 6-2 for the system configuration information you want to preconfigure.

    Table 6-2 sysidcfg Keywords

    Configuration Information 

    Platform 

    Keywords 

    Where to Find Values/Example 

    Name service, domain name, name server 

    All 

    name_service=NIS, NIS+, OTHER, NONE {domain_name=domain_name name_server=hostname(ip_address)}

    name_service=NIS {domain_name=chandy.West.Arp.COM name_server=timber(129.221.2.1)}


    Note -

    Choose only one value for name_service. Include either, both, or neither of thedomain_name and name_server keywords, as needed. If neither keyword is used, omit the curly braces {}.


    Network interface, host name, IP address, netmask 

    All 

    network_interface=NONE, PRIMARY, value {hostname=host_name ip_address=ip_address netmask=netmask}

    network_interface=le0 {hostname=feron ip_address=129.222.2.1 netmask=255.255.0.0}


    Note -

    Choose only one value for network_interface. Include any combination or none of thehostname, ip_address and netmask keywords, as needed. If none of these keywords is used, omit the curly braces {}.


    Root password 

    All 

    root_password=root_password

    Encrypted from /etc/shadow.

    Language in which to display the install program and desktop 

    All 

    system_locale=locale

    The /usr/lib/locale directory or Appendix E, Locale Values provides the valid locale values.

    Teminal type 

    All 

    terminal=terminal_type

    The subdirectories in the /usr/share/lib/terminfo directory provide the valid terminal values.

    Time zone 

    All 

    timezone=timezone

    The directories and files in the /usr/share/lib/zoneinfo directory provide the valid time zone values. The time zone value is the pathname relative to the /usr/share/lib/zoneinfo directory. For example, the time zone value for the Mountain Standard Time in the United States is US/Mountain; the time zone value for Japan is Japan.

    Time and date 

    All 

    timeserver=localhost, hostname, ip_address

    If you specify localhost as the time server, the system's time is assumed to be correct. If you specify the hostname or ip_address (if you are not running a name service) of a system, that system's time is used to set the time.

    Monitor type 

    x86 

    monitor=monitor_type

    Run kdmconfig -d filename; append output to sysidcfg file.

    Keyboard language, keyboard layout 

    x86 

    keyboard=keyboard_language {layout=value}

    Run kdmconfig -d filename; append output to sysidcfg file.

    Graphics card, color depth, display resolution, screen size 

    x86 

    display=graphics_card {size=screen_size depth=color_depth resolution=screen_resolution}

    Run kdmconfig -d filename; append output to sysidcfg file.

    Pointing device, number of buttons, IRQ level 

    x86 

    pointer=pointing_device {nbuttons=number_buttons irq=value}

    Run kdmconfig -d filename; append output to sysidcfg file.

  3. Save the sysidcfg file.

  4. Make the sysidcfg file available to clients through:

    • A shared NFS network directory (add_install_client command using the -p option)

    • The root directory on a PCFS or UFS diskette

Preconfiguring With the Name Service

Preconfiguring system configuration information by editing the name service (NIS or NIS+) is recommended for SPARC-based systems. The following table gives a high-level overview of what you need to do.

To Preconfigure ... 

You Must Edit and Populate These Name Service Databases... 

Host name and IP address 

hosts

Date and time 

hosts (specify the timehost alias next to the host name of the system that will provide the date and time for the systems being installed)

Time zone 

timezone

Netmask 

netmasks

The procedure to preconfigure the locale for a system is different for each name service. See "How to Preconfigure Locale Using NIS" or "How to Preconfigure Locale Using NIS+".

How to Preconfigure Locale Using NIS

  1. As root on the name server, edit the /var/yp/Makefile file.

    Add the following text after the other *.time entries.

    locale.time:  $(DIR)/locale
            -@if [ -f $(DIR)/locale ]; then \
                   sed -e "/^#/d" -e s/#.*$$// $(DIR)/locale \
                   | awk '{for (i = 2; i<=NF; i++) print $$i, $$0}' \
                   | $(MAKEDBM) - $(YPDBDIR)/$(DOM)/locale.byname; \
                   touch locale.time; \
                   echo "updated locale"; \
                   if [ ! $(NOPUSH) ]; then \
                           $(YPPUSH) locale.byname; \
                           echo "pushed locale"; \
                   else \
                   : ; \
                   fi \
            else \
                   echo "couldn't find $(DIR)/locale"; \
            fi
  2. Add locale to the line starting with the word all and add locale: locale.time on a new line.

    all: passwd group host ethers networks rpc services protocols netgroup 
    bootparams aliases \
    timezone locale
    locale: locale.time
    
  3. Create the file /etc/locale and make one entry for each domain or a specific system.

    locale   domain_name
    

    or

    locale   system_name
    

    For example, the following line specifies French to be the default language for the worknet.com domain:


    fr worknet.com

    For example, the following line specifies French Belgium to be the default locale for a system named sherlock:


    fr_BE sherlock 

    See Appendix E, Locale Values for a list of valid locale values.


    Note -

    Not all languages or locales are available on all Solaris CDs. The locale you select will be used for installation if it is on the Solaris CD.


  4. Make the maps.


    # cd /var/yp; make
    

Systems specified by domain or individually in the locale map are now set up to use the default locale. The default locale you've specified will be used during the installation and for the desktop after the system is rebooted.

How to Preconfigure Locale Using NIS+

This procedure assumes the NIS+ domain is set up. Setting up the NIS+ domain is documented in the Solaris Naming Administration Guide.

  1. Log in to a name server as root or as a user in the NIS+ admin group.

  2. Use the following nistbladm command to create the locale table.


    # nistbladm -D access=og=rmcd,nw=r -c locale_tbl name=SI,nogw= locale=,nogw= 
    comment=,nogw= locale.org_dir.`nisdefaults -d`
     
    
  3. Add an entry to the locale table by typing the following nistbladm command.


    # nistbladm -a name=domain_name locale=locale comment=comment 
    locale.org_dir.`nisdefaults -d`
    

    domain_name

    Is either the domain name or a specific system name for which you want to preconfigure a default locale. 

    locale

    Is the locale you want installed on the system and for displaying the desktop after the system is rebooted. See Appendix E, Locale Values for a list of valid locale values.

    comment

    Is the comment field. Use double quotation marks to begin and end comments that are longer than one word. 


    Note -

    Not all languages or locales are available on all Solaris CDs. The locale you select will be used for installation if it is on the Solaris CD.


Systems specified by domain or individually in the locale table are now set up to use the default locale. The default locale you've specified will be used during the installation and for the desktop after the system is rebooted.

Preconfiguring Power Management Information

The Power Management software provided by Solaris can be used to automatically save the state of a system and power it off after it is idle for 30 minutes. When you install the Solaris software on SPARC-based systems of the sun4u platform group (and any other systems that are compliant with Version 2 of the EPA's Energy Star guidelines), the Power Management software is installed by default, and you are prompted after the subsequent reboot to enable or disable the Power Management software.

If you are performing interactive installations, there is no way to preconfigure the Power Management Information and avoid the prompt. However, with custom JumpStart installations, you can preconfigure the Power Management information by using a finish script to create an /autoshutdown or /noautoshutdown file on the system. When the system reboots, the /autoshutdown file enables Power Management and the /noautoshutdown file disables Power Management.

For example, the following line in a finish script enables the Power Management software and avoids the prompt after the system reboots.

touch /a/autoshutdown

For more information about finish scripts, see "Creating Finish Scripts".