Solaris Advanced Installation Guide

Testing a Profile

After you create a profile, you can use the pfinstall(1M) command to test the profile and see if it does what you want before using it to install or upgrade a system (called a "dry run" installation). This is especially useful when you are creating upgrade profiles that reallocate disk space.

By looking at the installation output generated by pfinstall, you can quickly find out if a profile is going to do what you expect and if the installation is going to be successful. For example, you can see if a system will have enough disk space to upgrade to a new release of Solaris before you actually perform the upgrade on the system.

Ways to Test a Profile

pfinstall enables you to test a profile against:

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

So, on a system running Solaris 7, you can test Solaris 7 initial installation profiles. However, if you want to test a Solaris 7 upgrade profile on a system running a previous version of Solaris, or if you don't have a Solaris 7 system installed yet to test Solaris 7 initial installation profiles, you have to boot a system from a Solaris 7 CD image and temporarily create a Solaris 7 install environment. Then, you can run pfinstall in the Solaris 7 install environment to test the profiles you've created.

Creating a temporary Solaris 7 install environment involves booting a system from a Solaris 7 CD image (just as you would to install), answering any system identification questions, choosing the Solaris interactive installation program, and exiting out of the first screen that's presented. Then, from the shell, you can execute the pfinstall command.

How to Test a Profile

  1. Locate a system to test the profile that has the same platform type (x86 or SPARC) for which the profile was created.

    If you are testing an upgrade profile, you must use the system that you are going to upgrade.

  2. Determine the next step based on your situation.

    If You ... 

    Then ... 

    Need to test an initial installation profile and have a system running Solaris 7  

    Become superuser on the system and go to Step 9.

    Need to test an upgrade profile, or you don't have a system running Solaris 7 to test an initial installation profile  

    Go to Step 3.

  3. Boot the system from a Solaris 7 image (just as you would to install), which can be located in the system's local CD-ROM or on an install server.

    See Chapter 2, Performing an Interactive Installation for details on booting.


    Note -

    If you are testing an upgrade profile, boot the system that you are going to upgrade.


  4. Answer the system identification questions, if prompted.

  5. If you are presented with a choice of installation options, choose the Solaris Interactive Installation program.

  6. Exit from the first screen of the Solaris Interactive Installation program.

    After the Solaris Interactive Installation program exits, a shell prompt is displayed.

  7. Create a temporary mount point.


    # mkdir /tmp/mnt
    
  8. Mount the directory that contains the profile(s) you want to test.

    If You Want To ... 

    Then Type ... 

    Mount a remote NFS file system (for systems on the network) 


    mount -F nfs server_name:path /tmp/mnt
    

    Mount a UFS-formatted diskette 


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

    Mount a PCFS-formatted diskette 


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

  9. 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
    
  10. Change directory to where the profile resides, which is usually the JumpStart directory.

    If you mounted a directory in Step 8, change directory to /tmp/mnt.


    # cd jumpstart_dir_path
    
  11. Test the profile with the pfinstall -d or pfinstall -D command.


    Caution - Caution -

    Without the -d or -D option, pfinstall performs an actual installation of the Solaris software on the system by using the specified profile, and the data on the system is overwritten.



    # /usr/sbin/install.d/pfinstall -D | -d disk_config [-c path] profile
    

    -D

    Tells pfinstall to use the current system's disk configuration to test the profile.

    -d disk_config

    Tells pfinstall to use a disk configuration file, disk_config, to test the profile. If disk_config file is not in the directory where pfinstall is run, you must specify the path.

    This option cannot be used with an upgrade profile (install-type upgrade). You must always test an upgrade profile against a system's disk configuration (-D option).

    -c path

    Is the path to the Solaris CD image. This is required if the Solaris CD is not mounted on /cdrom. For example, use this option if the system is using Volume Management to mount the Solaris CD.


    Note -

    This option is not required if you have booted from a Solaris CD image, because the Solaris CD image is mounted on /cdrom as part of the booting process.


    profile

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

Where to Go Next

You have completed testing the profile. To continue, see "Validating the rules File".

Example-Testing a Profile

The following example tests the basic_prof profile against the disk configuration on a Solaris 7 system where pfinstall is being run. The basic_prof profile is located in the /jumpstart directory and the path to the Solaris CD image is specified because Volume Management is being used.



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

The following example tests the basic_prof profile against the 535_test disk configuration file and 64 Mbytes of system memory. This example uses a Solaris CD image located in the /export/install directory, and pfinstall is being run on a Solaris 7 system.



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