15.02 Implementing JumpStart


15.02 Implementing JumpStart

Exam Objective 6.5: Configure a JumpStart including implementing a JumpStart .server, editing the sysidcfg, rules and profile files, and establishing JumpStart software alternatives (setup, establishing alternatives, troubleshooting, and resolving problems).

In the previous section, we read about the different JumpStart elements that facilitate the automation as promised by the custom JumpStart method. You make the automatic magic happen by implementing these elements, which involves the following:

  • Writing the sysidcfg, rules, and profile files.

  • Checking the validity of the rules and profile files by running the check script.

  • Setting up servers such as install server, boot server, and configuration server.

Setting Up the sysidcfg File

Before anything can be installed on a machine, the boot process must be started. When a JumpStart client boots for the first time, it needs some information such as its host name and IP address before the installation can start. It's like: I would like to know who I am before you start installing things on me. That information is provided through the sysidcfg file.

The sysidcfg file pre-configures information, needed for installation, through a set of keyword-value pairs. You can pre-configure as much information as you want by specifying one or more keywords. Each group of machines that has unique configuration information must have its own sysidcfg file.

The syntax rules applied to writing keywords in the sysidcfg file are described here:

  • You can define keywords in any order.

  • The keywords are not case sensitive—for example, hostname and Hostname represent the same keyword.

  • The keyword values can be optionally enclosed in single quotes (') or double quotes (")

  • If a keyword appears multiple times in the file, only the first instance of the keyword is considered valid and used. The network_interface keyword is an exception to this rule, because a machine can have multiple network interfaces.

For example, the following keywords can be used for both SPARC and x86 machines:

  • name_service. The possible values are DNS, LDAP, NIS, NIS+, and NONE.

  • domain_name. The value is the name of the domain to which the machine belongs.

  • name_server. The value is the host name or the IP address of the name server used by the machine under installation.

  • root_password. To specify the root password. This is the encrypted password as it appears in the /etc/shadow file.

  • system_locale. To specify the language for installation.

  • time_server. To specify the time server.

The following keywords can be used only for x86-based machines:

  • monitor. Specifies the monitor type.

  • keyboard. Specifies the keyboard language.

  • display. Specifies the graphic card.

  • pointer. Specifies the pointing device.

The following is a sample sysidcfg file for a SPARC machine:

    system_locale=en_US    timezone=US/Pacific    timeserver=localhost    terminal=sun-cmd    name_service=NIS {domain_name=committee.senate.congress.com    name_server=connor(172.17.111.4)}    root_password=WesMtQWing    system_locale=C    security_policy=Kerberos    {default_realm=Yoursite.COM    admin_server=krbadmin.Yoursite.COM    kdc=kdcl.Yoursite.COM, kdc2.Yoursite.COM} 

This sysidcfg file is for a group of SPARC machines on which you want to install Solaris over the network. The host names, IP addresses, and netmasks of these systems have been pre-configured by editing the name service (discussed in Chapter 11). Because all the system configuration information has been pre-configured, an automated installation can be performed by using a custom JumpStart profile.

Where does the sysidcfg live and how do you send it to the JumpStart client? It can reside at one of the following places:

  • For installation over a network, the sysidcfg file can reside on a shared Network File System (NFS) directory (the JumpStart directory). You can tell its location to the JumpStart client by using the -p option with the add_install_client command, which we will explore later in this section.

  • For an installation on a machine locally, the sysidcfg file can reside on the root directory on a UFS or PCFS diskette in the machine's diskette drive, On an x86 machine, the sysidcfg file should reside on the Solaris Device Configuration Assistant (SDCA) diskette. Make sure the diskette is in the diskette drive when the machine boots.

So, you use the sysidcfg file to assign some system attributes to the machine or a group of machines. However, some installation questions and options have not yet been addressed. For example, what type of installation is to be performed—initial installation or upgrade? These questions are answered in a profile file.

Setting Up a Profile File

When the JumpStart program finds a rule that matches with the machine undergoing installation, the JumpStart program looks for the profile file specified in the rule. It is a text file that you create to tell the JumpStart program how to perform installations—for example, which installation group to install. In other words, it contains the responses that you would otherwise give by typing or clicking in an interactive installation. A profile file contains one or more profile keywords and their values. Each profile keyword is an answer to a question or a choice for an option related to how the Solaris software is to be installed on the machine. For example, the following profile keyword-value pair specifies that the JumpStart program is installing Solaris from scratch (initial installation) and not performing an upgrade:

    install_type initial_install 

The syntax rules for writing a profile file are described here:

  • You can give any name to a profile file. However, it is a good idea to give a meaningful name (e.g., eng_profile) for a file that contains the profile of the machine that belongs to the engineering group.

  • The first entry in the profile file must specify the install_type keyword.

  • There must be one keyword-value pair in one entry (line).

  • If a system that is being upgraded according to the profile contains more than one root (/) directory that can be upgraded, you must specify the root_device keyword in an entry.

  • If a line begins with the pound symbol (#), the entire line is treated as a comment and is ignored by JumpStart.

  • The file can have one or more blank lines.

On the Job 

Note that the profile keywords and their values are case sensitive, whereas the keywords in the sysidcfg file are not.

The following is an example of a profile file that specifies the installation type, the software group to install, the package to remove, and the remote file systems to mount:

    install_type initial_install    system_type standalone    partitioning default    filesys any 512 swap # SWAP specification    cluster SUNWCprog    package SUNWman delete 

The filesys entry specifies that the size of the SWAP area must be 512MB and it can be installed on any disk.

So, you have set up a profile for a machine (or a group of machines) that will tell the JumpStart program how to make an installation on that machine. But how does the JumpStart program running on the machine determine the name of the profile file that should be used to perform the installation? The answer is by reading the rules file (i.e., the rules.ok file, to be precise).

Setting Up the rules File

The JumpStart program performs installation on a machine according to the instructions in the profile file of the machine that is identified by the rules.ok file, which in turn is generated by the check script from the rules file.

The rules file is a text file that you write. The syntax for writing the rules file is described here:

  • The name of the file must be rules.

  • The file must contain one or more rules—that is, entries.

  • If a line begins with a pound symbol (#), the entire line is treated as a comment and is ignored by the JumpStart program.

  • If you want to continue a rule from one line to a new line, use the backward slash (\) at the end of the first line just before pressing Return.

  • The file can have one or more blank lines.

The syntax for an entry in the rules file is as shown here:

    <keyword-value pairs> <begin> <profile> <finish> 

The fields in the entry are described in Table 15-1.

Table 15-1: Fields in an entry of the rules file

Field in a rules File Entry

Description

<keyword-value pairs>

Specifies one or more keyword-value pair. If multiple pairs are specified, the pairs are separated by a double AND symbol (&&), and an exclamation point (!) is used to negate a pair.

<begin>

Specifies the name of an optional Bourne shell script to be executed before the installation begins. The hyphen (-) used instead of a name means no begin script exists. The begin scripts must reside in the JumpStart directory.

<finish>

Specifies the name of an optional Bourne shell script to be executed after the installation completes and before the machine is rebooted. The hyphen (-) used instead of a name means no finish script exists. The finish scripts must reside in the JumpStart directory.

<profile>

Specifies the name of the text file that defines how the Solaris software is to be installed on a machine whose system attributes match those in the rule. All profile files must be located in the JumpStart directory.

The <keyword-value pairs> and <profile> are the mandatory fields in an entry of the rules file. The following is an example of a rules file:

    hostname eng-11—eng_prof -    network 192.168.3.0 && !model\    'SUNW,Sun-Blade-100'-net_prof -    model SUNW,SPARCstation-LX—lx_prof complete 

    network 192.168.4.0 && karch i86pc setup x86__prof done    memsize 64-128 && arch i386—prog_prof -    any—generic_prof - 

There are six entries (mind the \ sign which means continue) in this file. The first entry instructs that if the host name of the machine is eng-11, the JumpStart installation should be performed on it according to the instructions in the eng_prof file. The second entry specifies that if the machine is connected to the subnet 192.168.3.0 and it's not a Sun-Blade0-100 machine, the JumpStart installation should be performed on it by using the profile in the net_prof file.

You create the sysidcfg file, rules file, and the profile files to automate the installation of Solaris software. But how will you make the Solaris software available for installation? The answer is by creating the install server.

Creating the Install Server

To make a machine the install server, you use the setup_install_server command to copy the images of the installation software to the local disk of the server machine. You can copy the images from either of the following media:

  • Solaris 10 Software CDs and the Solaris 10 Languages CD

  • Solaris 10 Operating System DVD

To convert the machine (SPARC or x86) into an install server, perform the following steps:

  1. Insert the Solaris 10 Software for <platformName> Platforms-1 CD in the CD-ROM drive attached to the server machine, where <platformName> is SPARC for the SPARC machine and x86 for the x86 machine.

  2. Make a directory on the server for the installation software by issuing the following command:

        mkdir -p /export/install/solaris_soft 

  3. Go to the tools directory on the CD by issuing the following command:

        cd /<cdMountPoint>/Solaris_10/Tools 

    The <cdMountPoint> specifies the mount point for the CD. For example, the actual command may look like the following:

        cd /cdrom/cdrom0/s2/Solaris_10/Tools 

  4. Set up the install server by issuing the following command:

        /setup_install_server/export/install/solaris_soft 

  5. Insert the Solaris 10 Software for <platformName> Platforms-2 CD in the CD-ROM drive attached to the server machine, where <platformName> is SPARC for the SPARC machine and x86 for the x86 machine.

  6. Go to the tools directory on the CD by issuing the following command:

        cd /<cdMountPoint>/Solaris_10/Tools 

    The <cdMountPoint> specifies the mount point for the CD.

  7. Copy the image from the CD to the disk:

        /add_to_install_server/export/install/solaris_soft 

  8. Repeat steps 5 through 7 for any CD that you want to copy to the disk for installation, such as the Solaris 10 Languages CD.

Follow the same procedure to copy the Solaris 10 DVD to the disk. Because there is only one DVD, it will involve only the following three commands:

    mkdir -p /export/install/solaris_soft    cd /<DVDMountPoint>/Solaris_10/Tools    ./setup_install_server /export/install/solaris__soft 

If the machines under installation need to be booted over the network, you must set up a boot server.

Creating the Boot Server

You can use a machine as a boot server for booting clients over the network. You can set up a machine to be a boot server by copying the boot image from the installation CD (or DVD) by using the following commands:

    cd /<mountPoint>/Solaris_10/Tools    ./setup_install_server -b /export/boot 

The <mountPoint> specifies the mount point for the installation CD or DVD. Now that you have the install server and the boot server set up, you need to set up the JumpStart directory to store the files that will facilitate automatic installation as promised by JumpStart.

Setting Up the JumpStart Directory

As you already know, the JumpStart directory contains files, such as rules file and profile files, required for a custom JumpStart installation of Solaris. You, the system administrator, are responsible for setting up this directory before the installation. You can start working on this by copying the sample directory from the Solaris 10 software image that you have already copied to the /export/install directory on the disk from the Solaris 10 Software-1 CD or the Solaris 10 Operating System DVD.

To accomplish this task, issue the following two commands on your server machine:

 mkdir /jumpstart cp -r /export/install/solaris_soft/Solaris_10/Misc/jumpstart_sample /jumpstart 

Now in the /jumpstart directory you can create or edit the rules file and the profile files for different JumpStart client machines or groups of machines. Obviously, you can move (or copy) these files to this directory if you have already created and prepared them elsewhere. After you set up the rules file and profile files, you must validate these files by running the check script on the server as shown here:

    cd /jumpstart    ./check 

If the check script does not detect any errors, it creates the rules.ok file. This is the file that will be read by the JumpStart program running on a client to find out the rule for the client machine and hence to find out the name of the profile file that contains the information to be used for installation.

Use the add_install_client command on the server to inform the server about the clients that can use network installation. The add_install_client command must be run from the install server's Solaris installation image that you copied to the server machine's disk.

 ./add_install_client [-c <serverName>:<path>] [-p <serverName>:<path>] <clientHostName> <clientPlatformGroup> 

The options are described here:

  • -c <serverName>:<path>. Specifies the path to the JumpStart directory: <serverName> specifies the host name or the IP address of the server on which the JumpStart directory resides, and <path> specifies the full path to the directory.

  • -p <serverName>:<path>. Specifies the path to the sysidcfg file: <serverName> specifies the host name or the IP address of the server on which the sysidcfg file resides, and <path> specifies the full path to the file.

  • <clientHostName>. The host name of a JumpStart client on which you want to install Solaris by using JumpStart. Ensure that the host name to IP address mapping is properly defined in DNS.

  • <clientPlatformGroup>. Specifies the platform group of the machines (or group of machines) that use the <serverName>—for example, sun4u for ultra 5 systems.

JumpStart offers automation for installing Solaris on multiple machines with identical software and configuration requirements. Note that in JumpStart the source for each installation is the install server and a set of files such as rules, sysidcfg, and profile files. If the sysidcfg file does not have all the required configuration information, the program will prompt you for the information. Furthermore, you can change the information in the files between any two installations.

Now consider a slightly different kind of requirement. You have installed Solaris on a machine and then you say, I want exactly the same system running on a number of other machines. In other words, you want to clone it on other machines. This is accomplished by using the flash archive method.




Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net