• Aucun résultat trouvé

Ensure that root owns the rules.ok file and that the permissions are set to 64

PART II Using Custom JumpStart

4. Ensure that root owns the rules.ok file and that the permissions are set to 64

After you validate therulesfile, you can learn more about optional custom JumpStart features inChapter 5. You can learn about performing custom JumpStart installations inChapter 7.

See Also

CHAPTER

5

Using Optional Custom JumpStart Features (Tasks)

This chapter describes the optional features that are available to create additional custom JumpStart installation tools.

“Creating Begin Scripts” on page 77

“Creating Finish Scripts” on page 79

“Creating a Compressed Configuration File” on page 85

“Creating Disk Configuration Files” on page 86

“Using a Site-Specific Installation Program” on page 92

Note –Instructions in this chapter are valid for either a SPARC server or an x86 server that is being used to provide custom JumpStart files, called a profile server. A profile server can provide custom JumpStart files for different platform types. For example, a SPARC server can provide custom JumpStart files for both SPARC based systems and x86 based systems.

Creating Begin Scripts

A begin script is a user-defined Bourne shell script that you specify in therulesfile.

A begin script performs tasks before the Solaris software is installed on a system. You can use begin scripts only when using custom JumpStart to install the Solaris software.

Use a begin script to perform one of the following tasks:

Creating derived profiles

Backing up files before upgrading

Important Information About Begin Scripts

Do not specify something in the script that would prevent the mounting of file systems onto/aduring an initial or upgrade installation. If the JumpStart program cannot mount the file systems onto/a, an error occurs and installation fails.

During the installation, output from the begin script is deposited in

/tmp/begin.log. After the installation is completed, the log file is redirected to /var/sadm/system/logs/begin.log.

Ensure thatrootowns the begin script and that the permissions are set to 644.

You can use custom JumpStart environment variables in your begin scripts. For a list of environment variables, see“Custom JumpStart Environment Variables”

on page 165.

Save begin scripts in the JumpStart directory.

Creating Derived Profiles With a Begin Script

A derived profile is a profile that is dynamically created by a begin script during a custom JumpStart installation. Derived profiles are needed when you cannot set up therulesfile to match specific systems to a profile. For example, you might need to use derived profiles for identical system models that have different hardware components, such as systems that contain different frame buffers.

To set up a rule to use a derived profile, you must perform the following tasks:

Set the profile field to an equal sign (=) instead of a profile.

Set the begin field to a begin script that creates a derived profile that depends on the system on which you intend to install Solaris.

When a system matches a rule with the profile field equal to an equal sign (=), the begin script creates the derived profile that is used to install the Solaris software on the system.

The following is an example of a begin script that creates the same derived profile every time. You can write a begin script to create different derived profiles that depend on the evaluation of rules.

EXAMPLE 5–1Begin Script That Creates a Derived Profile

#!/bin/sh

echo "install_type initial_install" > ${SI_PROFILE}

echo "system_type standalone" >> ${SI_PROFILE}

echo "partitioning default" >> ${SI_PROFILE}

echo "cluster SUNWCprog" >> ${SI_PROFILE}

echo "package SUNWman delete" >> ${SI_PROFILE}

echo "package SUNWolman delete" >> ${SI_PROFILE}

echo "package SUNWxwman delete" >> ${SI_PROFILE}

Note –If a begin script is used to create a derived profile, ensure the script does not have any errors. A derived profile is not verified by thecheckscript because derived profiles are not created until the execution of the begin script.

Creating Finish Scripts

A finish script is a user-defined Bourne shell script that you specify in therulesfile.

A finish script performs tasks after the Solaris software is installed on a system, but before the system reboots. You can use finish scripts only when using custom JumpStart to install Solaris.

Tasks that you can perform with a finish script include the following:

Adding files

Adding individual packages or patches in addition to the ones that are installed in a particular software group

Customizing the root environment

Setting the system’s root password

Installing additional software

Important Information About Finish Scripts

The Solaris installation program mounts the system’s file systems on/a. The file systems remain mounted on/auntil the system reboots. You can use the finish script to add, change, or remove files from the newly installed file system hierarchy by modifying the file systems that are respective to/a.

During the installation, output from the finish script is deposited in

/tmp/finish.log. After the installation is completed, the log file is redirected to /var/sadm/system/logs/finish.log.

Ensure thatrootowns the finish script and that the permissions are set to 644.

You can use custom JumpStart environment variables in your finish scripts. For a list of environment variables, see“Custom JumpStart Environment Variables”

on page 165.

Save finish scripts in the JumpStart directory.

▼ To Add Files With a Finish Script

Through a finish script, you can add files from the JumpStart directory to an already installed system. You can add the files because the JumpStart directory is mounted on the directory that is specified by theSI_CONFIG_DIRvariable. The directory is set to /tmp/install_configby default.

Note –You can also replace files by copying files from the JumpStart directory to already existing files on the installed system.

1. Copy all of the files that you are adding to the installed system to the JumpStart