Solaris 9 Installation Guide

Chapter 23 Preparing Custom JumpStart Installations (Tasks)

This chapter provides step-by-step instructions about how to prepare the systems at your site from which and on which you intend to install the Solaris 9 software by using the custom JumpStart installation method.

Task Map: Preparing Custom JumpStart Installations

Table 23–1 Task Map: Preparing Custom JumpStart Installations

Task 

Description 

For Instructions 

Decide how to upgrade the system if a previous version of the Solaris software is installed on the system 

If a previous release of Solaris is installed on the system, you need to determine how to upgrade the system. Ensure that you know what to do before and after you upgrade a system. Planning helps you to create your profiles, begin scripts, and finish scripts. 

Chapter 8, Upgrading the Solaris Operating Environment (Planning)

Create a JumpStart directory 

 

On a server

If you want to perform custom JumpStart installations on systems that are connected to a network, you must create a profile server. The profile server contains a JumpStart directory for the custom JumpStart files.  

Creating a Profile Server for Networked Systems

On a diskette

If you want to perform custom JumpStart installations on systems that are not connected to a network, you must create a profile diskette. A profile diskette contains the custom JumpStart files. 

Creating a Profile Diskette for Standalone Systems

Add rules to the rules file

After you decide how you want each group of systems or single systems to be installed, create a rule for each group that you want to install. Each rule distinguishes a group, based on one or more system attributes. The rule links each group to a profile.  

Creating the rules File

Create a profile for every rule 

A profile is a text file that defines how to install the Solaris software, for example, which software group to install on a system. Every rule specifies a profile to define how a system is to be installed with the Solaris software when the rule is matched. You usually create a different profile for every rule. However, the same profile can be used in more than one rule. 

Creating a Profile

(Optional) Test the profiles 

After you create a profile, use the pfinstall(1M) command to test the profile before you use the profile to install or upgrade a system.

Testing a Profile

Validate the rules file

The rules.ok file is a generated version of the rules file that the JumpStart program uses to match the system to be installed with a profile. You must use the check script to validate the rules file.

Validating the rules File

Creating a Profile Server for Networked Systems

When setting up custom JumpStart installations for systems on the network, you need to create a directory on a server that is called a JumpStart directory. The JumpStart directory contains all of the essential custom JumpStart files, for example, the rules file, rules.ok file, and profiles. You must save the JumpStart directory in the root (/) directory of the profile server.

The server that contains a JumpStart directory is called a profile server. A profile server can be the same system as an install server or a boot server, or the server can be a completely different server. A profile server can provide custom JumpStart files for different platforms. For example, an x86 server can provide custom JumpStart files for both SPARC systems and x86 systems.


Note –

After you create a profile server, you must allow systems to access the server. For detailed instructions, see To Allow All Systems Access to the Profile Server.


To Create a JumpStart Directory on a Server


Note –

This procedure assumes that the system is running Volume Manager. If you are not using Volume Manager to manage discs, refer to System Administration Guide: Basic Administration for detailed information about managing removable media without Volume Manager.


  1. Log in as superuser on the server on which you want to create the JumpStart directory.

  2. Create the JumpStart directory anywhere on the server.


    # mkdir -m 755 jumpstart_dir_path
    

    In the command, jumpstart_dir_path is the absolute path of the JumpStart directory.

    For example, the following command creates a directory that is called jumpstart in the root (/) directory and sets the permissions to 755:


    # mkdir -m 755 /jumpstart
    
  3. Edit the /etc/dfs/dfstab file by adding the following entry.


    share -F nfs -o ro,anon=0 jumpstart_dir_path
    

    For example, the following entry shares the /jumpstart directory:


    share -F nfs -o ro,anon=0 /jumpstart
    
  4. Type shareall and press Enter.

  5. Determine if you want to copy examples of custom JumpStart files to your JumpStart directory.

    • If no, go to Step 8.

    • If yes, use the following decision table to determine what to do next.

    Example Locations 

    Instructions 

    The Solaris 9 DVD or the Solaris 9 Software 1 of 2 CD for your platform 

    Insert the Solaris 9 DVD or the Solaris 9 Software 1 of 2 CD into the server's CD-ROM drive. 

    Volume Manager automatically mounts the CD. 

    An image of the Solaris 9 DVD or the Solaris 9 Software 1 of 2 CD for your platform on a local disk

    Change directory to the location of the Solaris 9 DVD or the Solaris 9 Software 1 of 2 image. For example, type the following command: 


    cd /export/install

  6. Copy the example custom JumpStart files into the JumpStart directory on the profile server.


    # cp -r media_path/Solaris_9/Misc/jumpstart_sample/* jumpstart_dir_path
    

    media_path

    The path to the CD, DVD, or image on the local disk 

    jumpstart_dir_path

    The path on the profile server where you are placing the example custom JumpStart files 

    For example, the following command copies the jumpstart_sample directory into the /jumpstart directory on the profile server:

    • For SPARC systems:


      cp -r /cdrom/cdrom0/s0/Solaris_9/Misc/jumpstart_sample/* /jumpstart
      
    • For x86 systems:


      cp -r /cdrom/cdrom0/s2/Solaris_9/Misc/jumpstart_sample/* /jumpstart
      
  7. Update the example JumpStart files so that the files work in your environment.

  8. Ensure that root owns the JumpStart directory and that the permissions are set to 755.

  9. Allow systems on the network to access the profile server.

    For detailed instructions, see To Allow All Systems Access to the Profile Server.

To Allow All Systems Access to the Profile Server

When you create a profile server, you must ensure that systems can access the JumpStart directory on the profile server during a custom JumpStart installation. Use one of the following ways to ensure access:


Note –

The following procedure is not necessary if you save the JumpStart directory on a diskette or if you specify the location of the profile server when you boot the system.


The following procedure is valid only if you store network installation information in the /etc/bootparams file. You can also store network installation information in one of the following places:

  1. On the install or boot server, log in as superuser.

  2. Use a text editor to open /etc/bootparams.

  3. Add this entry.

    * install_config=server:jumpstart_dir_path
    

    A wildcard character that specifies that all systems have access 

    server

    The host name of the profile server where the JumpStart directory is located 

    jumpstart_dir_path

    The absolute path of the JumpStart directory 

    For example, the following entry allows all systems to access the /jumpstart directory on the profile server that is named sherlock:

    * install_config=sherlock:/jumpstart

    Caution – Caution –

    Use of this procedure might produce the following error message when an install client is booted:

    WARNING: getfile: RPC failed: error 5: (RPC Timed out).

    Booting From the Network, Error Messages contains details about this error message.


    All systems can now access the profile server.

Creating a Profile Diskette for Standalone Systems

A diskette that contains a JumpStart directory is called a profile diskette. A system that is not connected to the network does not have access to a profile server. As a result, you must create a JumpStart directory on a diskette if a system is not connected to a network. The system on which you create a profile diskette must have a diskette drive.

The JumpStart directory contains all of the essential custom JumpStart files, for example, the rules file, rules.ok file, and profiles. You must save the JumpStart directory in the root (/) directory of the profile diskette.

SPARC: To Create a Profile Diskette


Note –

This procedure assumes that the system is running Volume Manager. If you are not using Volume Manager to manage diskettes, CDs, and DVDs, refer to System Administration Guide: Basic Administration for detailed information about managing removable media without Volume Manager.


  1. Log in as superuser on a SPARC system to which a diskette drive is attached.

  2. Insert a blank diskette or a diskette that can be overwritten in the diskette drive.

  3. Mount the diskette.


    # volcheck
    
  4. Determine if the diskette contains a UNIX file system (UFS).

    Examine the contents of the file /etc/mnttab on the system for an entry such as the following:


    /vol/dev/diskette0/scrap  /floppy/scrap  ufs  suid,rw,largefiles,dev=1740008  927147040
    • If the entry exists, go to Step 7.

    • If the entry does not exist, go to the next step.

  5. Format the diskette.


    Caution – Caution –

    Formatting erases all data on the diskette.



    # fdformat -U
    
  6. Create a UFS on the diskette.


    # newfs /vol/dev/aliases/floppy0
    
  7. Determine if you want to copy examples of custom JumpStart files to your JumpStart directory.

    • If no, go to Step 10.

    • If yes, use the following decision table to determine what to do next.

    Example Locations 

    Instructions 

    The Solaris 9 SPARC Platform Edition DVD or the Solaris 9 Software 1 of 2 SPARC Platform Edition CD

    Insert the Solaris 9 SPARC Platform Edition DVD or the Solaris 9 Software 1 of 2 SPARC Platform Edition CD into the server's CD-ROM drive.

    Volume Manager automatically mounts the CD. 

    An image of the Solaris 9 SPARC Platform Edition DVD or the Solaris 9 Software 1 of 2 SPARC Platform Edition CD on a local disk

    Change the directory to the location of the Solaris 9 SPARC Platform Edition DVD or the Solaris 9 Software 1 of 2 SPARC Platform Edition CD image. For example, type the following command:


    cd /export/install
    

  8. Copy the example custom JumpStart files into the JumpStart directory on the profile diskette.


    # cp -r media_path/Solaris_9/Misc/jumpstart_sample/* jumpstart_dir_path
    

    media_path

    The path to the CD, DVD, or image on the local disk 

    jumpstart_dir_path

    The path to the profile diskette where you want to place the example custom JumpStart files 


    Note –

    You must place all custom JumpStart installation files in the root (/) directory on the diskette.


    For example, the following command copies the contents of jumpstart_sample on the Solaris 9 Software 1 of 2 SPARC Platform Edition CD to the root (/) directory on a profile diskette that is named scrap:


    cp -r /cdrom/sol_9_sparc/s0/Solaris_9/Misc/jumpstart_sample/* /floppy/scrap
    
  9. Update the example JumpStart files on the profile diskette so that the files work in your environment.

  10. Ensure that root owns the JumpStart directory and that permissions are set to 755.

  11. Eject the diskette.


    # eject floppy
    

    You have completed the creation of a profile diskette. You can now update the rules file and create profiles on the profile diskette to perform custom JumpStart installations. To continue, go to Creating the rules File.

x86: To Create a Profile Diskette


Note –

This procedure assumes that the system is running Volume Manager. If you are not using Volume Manager to manage diskettes, CDs, and DVDs, refer to System Administration Guide: Basic Administration for detailed information about managing removable media without Volume Manager.


  1. Log in as superuser on an x86 system to which a diskette drive is attached.

  2. Insert the Solaris 9 Device Configuration Assistant x86 Platform Edition diskette into the diskette drive (usually drive A). You use this diskette as the profile diskette.


    x86 only –

    You can access the boot diskette software by downloading and copying the software to a diskette from the Solaris Developer Connection at http://soldc.sun.com/support/drivers/dcs_diskettes.


  3. Mount the diskette.


    # volcheck
    
  4. Copy the image of the Solaris 9 Device Configuration Assistant to the system's hard disk.


    # dd if=/vol/dev/aliases/floppy0 of=boot_image
    

    In the command, boot_image is the name of the file into which you want to copy the image of the Solaris 9 Device Configuration Assistant. You can specify an absolute path name.

    For example, the following command copies the boot diskette to a file that is named boot_save:


    dd if=/vol/dev/aliases/floppy0 of=boot_save
    
  5. Eject the diskette by clicking Eject Disk in the File Manager window or by typing eject floppy on the command line.

  6. In the Removable Media Manager dialog box, click OK.

  7. Manually eject the Solaris 9 Device Configuration Assistant x86 Platform Edition diskette.

  8. Insert a blank diskette or a diskette that can be overwritten into the diskette drive.

  9. Mount the diskette.


    # volcheck
    
  10. Format the diskette.


    Caution – Caution –

    Formatting erases all data on the diskette.



    # fdformat -d -U
    
  11. Copy the Solaris 9 Device Configuration Assistant image from the system's hard disk to the formatted diskette.


    # dd if=boot_image of=/vol/dev/aliases/floppy0
    

    In the command, boot_image is the name of the file where you want to copy the image of the Solaris 9 Device Configuration Assistant. You can specify an absolute path name.

  12. Determine if you want to copy examples of custom JumpStart files to your JumpStart directory.

    • If no, go to Step 15.

    • If yes, use the following decision table to determine what to do next.

    Example Locations 

    Instructions 

    The Solaris 9 x86 Platform Edition DVD or the Solaris 9 Software 1 of 2 x86 Platform Edition CD

    Insert the Solaris 9 x86 Platform Edition DVD or the Solaris 9 Software 1 of 2 x86 Platform Edition CD into the server's CD-ROM drive.

    Volume Manager automatically mounts the CD. 

    An image of the Solaris 9 x86 Platform Edition DVD or the Solaris 9 Software 1 of 2 x86 Platform Edition CD on a local disk

    Change directory to the location of the Solaris 9 x86 Platform Edition DVD or the Solaris 9 Software 1 of 2 x86 Platform Edition CD image. For example, type the following:


    cd /export/install

  13. Copy the example custom JumpStart files into the JumpStart directory on the profile diskette.


    # cp -r media_path/Solaris_9/Misc/jumpstart_sample/* jumpstart_dir_path
    

    media_path

    The path to the CD, DVD, or image on the local disk 

    jumpstart_dir_path

    The path to the profile diskette where you want to place the example custom JumpStart files 


    Note –

    You must place all custom JumpStart installation files in the root (/) directory on the profile diskette.


    For example, the following command copies the contents of jumpstart_sample on the Solaris 9 Software 1 of 2 x86 Platform Edition CD to the root (/) directory on a profile diskette that is named scrap:


    cp -r /cdrom/sol_9_x86/s2/Solaris_9/Misc/jumpstart_sample/* /floppy/scrap
    
  14. Update the example JumpStart files on the profile diskette so that the files work in your environment.

  15. Ensure that root owns the JumpStart directory and that permissions are set to 755.

  16. Eject the diskette by clicking Eject Disk in the File Manager window or by typing eject floppy on the command line.

  17. In the Removable Media Manager dialog box, click OK.

  18. Manually eject the diskette.

You have completed the creation of a profile diskette. Now you can update the rules file and create profiles on the profile diskette to perform custom JumpStart installations. To continue, go to Creating the rules File.

Creating the rules File

The rules file is a text file that contains a rule for each group of systems on which you want to install the Solaris operating environment. Each rule distinguishes a group of systems that are based on one or more system attributes. Each rule also links each group to a profile. A profile is a text file that defines how the Solaris software is to be installed on each system in the group. For example, the following rule specifies that the JumpStart program use the information in the basic_prof profile to install any system with the sun4u platform group.

karch sun4u - basic_prof -

The rules file is used to create the rules.ok file, which is required for custom JumpStart installations.


Note –

If you set up the JumpStart directory by using the procedures in Creating a Profile Diskette for Standalone Systems or Creating a Profile Server for Networked Systems, an example rules file is already located in the JumpStart directory. The sample rules file contains documentation and some example rules. If you use the sample rules file, ensure that you comment out the example rules you do not intend to use.


Syntax of the rules File

The rules file must have the following attributes:

The rules file can contain any of the following:

To Create a rules File

  1. Use a text editor to create a text file that is named rules. Or, open the sample rules file in the JumpStart directory that you created.

  2. Add a rule in the rules file for each group of systems on which you want to install the Solaris software.

    For a list of rules file keywords and values, see Rule Keywords and Values.

    A rule within a rules file must adhere to the following syntax:

    [[!]]rule_keyword rule_value [[&& [[!]]rule_keyword rule_value]] ... begin  profile  finish
    
    Table 23–2 Syntax Elements of a Rule

    Element 

    Description 

    !

    A symbol that is used before a keyword to indicate negation. 

    rule_keyword

    A predefined lexical unit or word that describes a general system attribute, such as host name, hostname, or memory size, memsize. rule_keyword is used with the rule value to match a system with the same attribute to a profile. For the list of rule keywords, see Rule Keywords and Values.

    rule_value

    A value that provides the specific system attribute for the corresponding rule keyword. Rule values are described in Rule Keywords and Values.

    &&

    A symbol you must use to join rule keyword and rule value pairs in the same rule (a logical AND). During a custom JumpStart installation, a system must match every pair in the rule before the rule matches. 

    begin

    The name of an optional Bourne shell script that can be executed before the installation begins. If no begin script exists, you must type a minus sign (-) in this field. All begin scripts must be located in the JumpStart directory.  

    Information about how to create begin scripts is presented in Creating Begin Scripts.

    profile

    The name of a text file that defines how the Solaris software is to be installed on the system when a system matches the rule. The information in a profile consists of profile keywords and their corresponding profile values. All profiles must be located in the JumpStart directory. 


    Note –

    Optional ways to use the profile field are described in Using a Site-Specific Installation Program and Creating Derived Profiles With a Begin Script.


    finish

    The name of an optional Bourne shell script that can be executed after the installation is completed. If no finish script exists, you must type a minus sign (-) in this field. All finish scripts must be located in the JumpStart directory.  

    Information about how to create finish scripts is presented in Creating Finish Scripts.

    At the minimum, each rule must contain the following:

    • A keyword, a value, and a corresponding profile

    • A minus sign (-) in the begin and finish fields if no begin or finish scripts are specified

  3. Save the rules file in the JumpStart directory.

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

rules File Example

The following example shows several example rules in a rules file. Each line has a rule keyword and a valid value for that keyword. The JumpStart program scans the rules file from top to bottom.

When the JumpStart program matches a rule keyword and value with a known system, the JumpStart program installs the Solaris software that is specified by the profile that is listed in the profile field.


Example 23–1 rule File

 # rule keywords and rule values       begin script       profile       finish script
 # -----------------------------       ------------       --------      -------------
  hostname eng-11                      -                  basic_prof    -
  network 192.43.34.0 && !model \
 'SUNW,SPARCstation-20'2               -                  net_prof      -
  model SUNW,SPARCstation-LX3          -                  lx_prof       complete
  network 193.144.2.0 && karch i86pc  setup4              x86_prof       done
  memsize 64-128 && arch i3865         -                 prog_prof     -
  any6  -                              -                  generic_prof  -
  1. The rule matches if the system's host name is eng-1. The basic_prof profile is used to install the Solaris software on the system that matches the rule.

  2. The rule matches if the system is on subnet 192.43.34.0 and if the system is not a SPARCstationTM 20 (SUNW,SPARCstation-20). The net_prof profile is used to install the Solaris software on systems that match this rule. The rule also provides an example of rule wrap, which is defined in Syntax of the rules File.

  3. The rule matches if the system is a SPARCstation LX. The lx_prof profile and the complete finish script are used to install the Solaris software on systems that match this rule.

  4. The rule matches if the system is on subnet 193.144.2.0 and is an x86 based system. The setup begin script, the x86_prof profile, and the done finish script are used to install the Solaris software on systems that match the rule.

  5. The rule matches if the system has between 64 and 128 Mbytes of memory and is an x86 based system. The prog_prof profile is used to install the Solaris software on systems that match the rule.

  6. The rule matches any system that did not match the previous rules. The generic_prof profile is used to install the Solaris software on systems that match the rule. If any is used, it should always be the last rule in the rules file.


Creating a Profile

A profile is a text file that defines how to install the Solaris software on a system. A profile defines elements of the installation, for example, the software group to install. Every rule specifies a profile that defines how a system is to be installed. You can create different profiles for every rule or the same profile can be used in more than one rule.

A profile consists of one or more profile keywords and their values. Each profile keyword is a command that controls one aspect of how the JumpStart program is to install the Solaris software on a system. For example, the following profile keyword and value specify that the JumpStart program install the system as a server:

system_type  server

Note –

If you created the JumpStart directory by using the procedures that are presented in Creating a Profile Server for Networked Systems or Creating a Profile Diskette for Standalone Systems, sample profiles are already located in the JumpStart directory.


Syntax of Profiles

A profile must contain the following:

A profile can contain the following:

To Create a Profile

  1. Use a text editor to create a text file. Name the file descriptively. Or, open a sample profile in the JumpStart directory that you created.


    Note –

    Ensure that the name of the profile reflects how you intend to use the profile to install the Solaris software on a system. For example, you might name the profiles basic_install, eng_profile, or user_profile.


  2. Add profile keywords and values to the profile.

    For a list of profile keywords and values, see Profile Keywords and Values.


    Note –

    Profile keywords and their values are case sensitive.


  3. Save the profile in the JumpStart directory.

  4. Ensure that root owns the profile and that the permissions are set to 644.

  5. Test the profile (optional).

    Testing a Profile contains information about testing profiles.

Profile Examples

The following examples of profiles show how to use different profile keywords and profile values to control how the Solaris software is installed on a system. Profile Keywords and Values contains a description of profile keywords and values.


Example 23–2 Mounting Remote File Systems and Adding and Deleting Packages

 
# profile keywords        profile values
# -----------------       -----------------
  install_type            initial_install1
  system_type             standalone2
  partitioning            default3
  filesys                 any 512 swap   # specify size of /swap
  cluster                 SUNWCprog4
  package                 SUNWman delete5
  cluster                 SUNWCacc
  1. The install_type keyword is required in every profile.

  2. The system_type keyword defines that the system is to be installed as a standalone system.

  3. The file system slices are determined by the software to be installed with the value default. The size of swap is set to 512 Mbytes and is installed on any disk, value any.

  4. The Developer Solaris Software Group, SUNWCprog, is installed on the system.

  5. If the standard man pages are mounted from the file server, s_ref, on the network, the man page packages are not to be installed on the system. The packages that contain the System Accounting utilities are selected to be installed on the system.



Example 23–3 Specifying Where to Install File Systems

# profile keywords        profile values
# ----------------        -------------------
  install_type	          initial_install
  system_type             standalone 
  partitioning            explicit1
  filesys                 c0t0d0s0 auto /
  filesys                 c0t3d0s1 auto swap
  filesys                 any auto usr
  cluster                 SUNWCall2
  1. The file system slices are determined by the filesys keywords, value explicit. The size of root (/) is based on the selected software, value auto, and is installed on c0t0d0s0. The size of swap is set to the necessary size and is installed on c0t3d0s1. usr is based on the selected software and the installation program determines where usr is installed, based on the value any.

  2. The Entire Solaris Software Group, SUNWCall, is installed on the system.



Example 23–4 x86: Using the fdisk Keyword

# profile keywords      profile values
# ----------------      -------------------
  install_type          initial_install
  system_type           standalone

  fdisk                 c0t0d0 0x04 delete1
  fdisk                 c0t0d0 solaris maxfree2
  cluster               SUNWCall3
  cluster               SUNWCacc delete4
  1. All fdisk partitions of type DOSOS16 (04 hexadecimal) are deleted from the c0t0d0 disk.

  2. A Solaris fdisk partition is created on the largest contiguous free space on the c0t0d0 disk.

  3. The Entire Distribution software group, SUNWCall, is installed on the system.

  4. The system accounting utilities, SUNWCacc, are not to be installed on the system.



Example 23–5 Reallocating Disk Space for an Upgrade

# profile keywords         profile values
# ----------------         -------------------
  install_type             upgrade1 
  root_device              c0t3d0s22 
  backup_media             remote_filesystem timber:/export/scratch3
  layout_constraint        c0t3d0s2 changeable 1004
  layout_constraint        c0t3d0s4 changeable
  layout_constraint        c0t3d0s5 movable 
  package                  SUNWbcp delete5
  package                  SUNWxwman add6
  cluster                  SUNWCacc add   
  locale                   de7
  1. The profile upgrades a system by reallocating disk space. In this example, disk space must be reallocated because some file systems on the system did not have enough space for the upgrade.

  2. The root file system on c0t3d0s2 is upgraded.

  3. A remote system that is named timber is to be used to back up data during the disk space reallocation. For more backup-media keyword values, see backup_media Profile Keyword.

  4. The layout_constraint keywords designate that auto-layout can perform the following when auto-layout attempts to reallocate disk space for the upgrade.

    • Change slices 2 and 4. The slices can be moved to another location and the size can be changed.

    • Move slice 5. The slice can be moved to another location but its size cannot change.

  5. The binary compatibility package, SUNWbcp, is not installed on the system after the upgrade.

  6. The code ensures that the X Window System man pages and the System Accounting Utilities are to be installed if they are not already installed on the system. All packages already on the system are automatically upgraded.

  7. The German localization packages are to be installed on the system.



Example 23–6 Retrieving a Solaris Flash Archive From an HTTP Server

In the following example, the profile indicates that the custom JumpStart program retrieves the Solaris Flash archive from an HTTP server.

install_type  flash_install1
archive_location http installserver /flasharchive/solaris9archive2
partitioning explicit3
filesys c0t1d0s0 4000 /
filesys c0t1d0s1 512 swap
filesys c0t1d0s7 free /export/home
  1. The profile installs a Solaris Flash archive on the clone system. All files are overwritten as in an initial installation.

  2. The Solaris Flash archive is retrieved from an HTTP server.

  3. The file system slices are determined by the filesys keywords, value explicit. The size of root (/) is based on the selected software and is installed on c0t1d0s0. The size of swap is set to the necessary size and is installed on c0t1d0s1. /export/home is based on the selected software and is installed on c0t1d0s7.



Example 23–7 Retrieving a Solaris Flash Archive From an NFS Server

In the following example, the profile indicates that the custom JumpStart program retrieves the Solaris Flash archive from an NFS server. The flash_update keyword indicates that this is a differential archive. A differential archive installs only the differences between two system images.

install_type  flash_update1
archive_location nfs installserver:/export/solaris/flasharchive/solaris9archive2
no_master_check3
root_device c0t0d0s64
  1. The profile installs a Solaris Flash differential archive on the clone system. Only files that are specified by the archive are installed.

  2. The Solaris Flash archive is retrieved from an NFS server.

  3. The clone system is not checked for a valid system image. A valid system image would have been built from the original master system.

  4. Specifies that the root file system on c0t0d0s6 is to be updated.


Testing a Profile

After you create a profile, use the pfinstall(1M) command to test the profile. Test the profile before you use the profile to install or upgrade a system. Testing a profile is especially useful when you are creating upgrade profiles that reallocate disk space.

By looking at the installation output that is generated by pfinstall, you can quickly determine if a profile works as you intended. For example, use the profile to determine if a system has enough disk space to upgrade to a new release of the Solaris software before you perform the upgrade on that system.

pfinstall enables you to test a profile against the following:

To Create a Temporary Solaris 9 Environment to Test a Profile

To test a profile for a particular Solaris release successfully and accurately, you must test a profile within the Solaris environment of the same release. For example, if you want to test a Solaris 9 initial installation profile, run the pfinstall command on a system that is running Solaris 9.

You need to create a temporary installation environment if you are testing a profile under one of the following conditions:

  1. Boot a system from an image of one of the following:

    • Solaris 9 SPARC Platform Edition DVD

    • Solaris 9 x86 Platform Edition DVD

    • Solaris 9 Software 1 of 2 SPARC Platform Edition CD

    • Solaris 9 Software 1 of 2 x86 Platform Edition CD


    Note –

    If you want to test an upgrade profile, boot the system that you are upgrading.


  2. Respond to the system identification questions.

  3. Exit from the installation program.

    • If you are using the Solaris 9 DVD, type ! at the following prompt:


      Solaris Web Start will assist you in installing software for Solaris.
      <Press ENTER to continue> {"!" exits}
    • If you are using the Solaris 9 Software 1 of 2 CD, select the Solaris suninstall program as the program to install the Solaris 9 operating environment. On the first screen that is displayed, select Exit.

  4. Execute the pfinstall command from the shell. For details about using the pfinstall command, see Step 7 in To Test a Profile.

To Test a Profile

  1. Locate a system on which to test the profile that is the same type of platform, SPARC or x86, for which the profile was created.

    If you are testing an upgrade profile, you must test the profile on the actual system that you intend to upgrade.

  2. Use the following decision table to determine what to do next.

    Test Scenario 

    Instructions 

    Test an initial installation profile and have a system that is running the Solaris 9 software 

    Become superuser on the system and go to Step 5.

    Test an upgrade profile, or you do not have a system that is running Solaris 9 to test an initial installation profile  

    Create a temporary Solaris 9 environment to test the profile. For details, see To Create a Temporary Solaris 9 Environment to Test a Profile. Then, go to Step 3.

  3. Create a temporary mount point.


    # mkdir /tmp/mnt
    
  4. Mount the directory that contains the profile or profiles that you want to test.

    Mount Scenario 

    Typing Instructions 

    Mount a remote NFS file system for systems on the network 


    mount -F nfs server_name:path /tmp/mnt
    

    SPARC: Mount a UFS-formatted diskette 


    mount -F ufs /dev/diskette /tmp/mnt
    

    Mount a PCFS-formatted diskette 


    mount -F pcfs /dev/diskette /tmp/mnt
    

  5. To test the profile with a specific system memory size, set SYS_MEMSIZE to the specific memory size in Mbytes.


    # SYS_MEMSIZE=memory_size
    # export SYS_MEMSIZE
    

  6. Did you mount a directory in Step 4?

    • If yes, change the directory to /tmp/mnt.


      # cd /tmp/mnt
      

    • If no, change the directory to where the profile is located, which is usually the JumpStart directory.


      # cd jumpstart_dir_path
      

  7. Test the profile with the pfinstall(1M) command.


    # /usr/sbin/install.d/pfinstall -D:-d disk_config_file[[-c path]] profile
    

    Caution – Caution –

    You must include the -d or -D option. If you do not include one of these options, pfinstall uses the profile you specify to install the Solaris 9 software. All of the data on the system is overwritten.


    -D

    pfinstall uses the current system's disk configuration to test the profile. You must use the -D option to test an upgrade profile.

    -d disk_config_file

    pfinstall uses the disk configuration file, disk_config_file, to test the profile. If disk_config_file is not located in the directory where pfinstall is run, you must specify the path.

    For instructions on how to create a disk configuration file, see Creating Disk Configuration Files.

     


    Note –

    You cannot use the -d disk_config_file option with an upgrade profile, install_type upgrade. You must always test an upgrade profile against a system's disk configuration, that is, you must use the -D option.


    -c path

    The path to the Solaris 9 software image. You use this option, for example, if the system is using Volume Manager to mount the Solaris 9 Software 1 of 2 CD for your platform. 


    Note –

    The -c option is not required if you booted from a Solaris 9 DVD or a Solaris 9 Software 1 of 2 CD image for your platform. The DVD or CD image is mounted on /cdrom as part of the booting process.


    profile

    The name of the profile to test. If profile is not in the directory where pfinstall is being run, you must specify the path.

Profile Test Examples

The following example shows how to use pfinstall to test a profile that is named basic_prof. The profile is tested against the disk configuration on a system on which the Solaris 9 software is installed. The basic_prof profile is located in the /jumpstart directory, and the path to the Solaris 9 Software 1 of 2 SPARC Platform Edition CD or Solaris 9 Software 1 of 2 x86 Platform Edition CD image is specified because Volume Manager is being used.


Example 23–8 Profile Test Using a Solaris 9 System


# cd /jumpstart
# /usr/sbin/install.d/pfinstall -D -c /cdrom/pathname basic_prof

The following example shows how to use pfinstall to test the profile that is named basic_prof on a Solaris 9 system. The test is performed against the 535_test disk configuration file. The test checks for 64 Mbytes of system memory. This example uses a Solaris 9 Software 1 of 2 SPARC Platform Edition CD or Solaris 9 Software 1 of 2 x86 Platform Edition CD image that is located in the /export/install directory.


Example 23–9 Profile Test Using a Disk Configuration File


# SYS_MEMSIZE=64
# export SYS_MEMSIZE
# /usr/sbin/install.d/pfinstall -d 535_test -c /export/install basic_prof

Validating the rules File

Before you can use a profile and rules file, you must run the check script to validate that the files are set up correctly. If all rules and profiles are correctly set up, the rules.ok file is created, which is required by the custom JumpStart installation software to match a system to a profile.

Table 23–3 describes what the check script does.

Table 23–3 What Happens When You Use the check Script

Stage 

Description 

The rules file is checked for syntax.

 

check verifies that the rule keywords are legitimate and that the begin, class, and finish fields are specified for each rule. The begin and finish fields can consist of a minus sign (-) instead of a file name.

If no errors are found in the rules file, each profile that is specified in the rules is checked for syntax.

If no errors are found, check creates the rules.ok file from the rules file, removes all comments and blank lines, retains all rules, and adds the following comment line at the end:

# version=2 checksum=num

To Validate the rules File

  1. Ensure that the check script is located in the JumpStart directory.


    Note –

    The check script is in the Solaris_9/Misc/jumpstart_sample directory on the Solaris 9 DVD or on the Solaris 9 Software 1 of 2 CD.


  2. Change the directory to the JumpStart directory.

  3. Run the check script to validate the rules file:


    $ ./check [[-p path -r file_name]]

    -p path

    Validates the rules by using the check script from the Solaris 9 software image instead of the check script from the system you are using. path is the image on a local disk or a mounted Solaris 9 DVD or a Solaris 9 Software 1 of 2 CD.

    Use this option to run the most recent version of check if your system is running a previous version of Solaris.

    -r file_name

    Specifies a rules file other than the one that is named rules. Using this option, you can test the validity of a rule before you integrate the rule into the rules file.

    As the check script runs, the script reports the checking of the validity of the rules file and each profile. If no errors are encountered, the script reports: The custom JumpStart configuration is ok.

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

After you validate the rules file, you can learn more about optional custom JumpStart features in Chapter 24, Using Optional Custom JumpStart Features (Tasks). You can learn about performing custom JumpStart installations in Chapter 26, Performing a Custom JumpStart Installation (Tasks).