Testing class files

After you create a class file, you can use the pfinstall command to test it. Testing a class file is sometimes called a “dry run” installation. By looking at the installation output generated by pfinstall, you can quickly determine whether a class file will do what you expect. For example, you can determine whether a system has enough disk space to upgrade to a new release of Solaris before you actually perform the upgrade.

To test a class file for a particular Solaris release, you must test it within the Solaris environment of the same release. For example, if you want to test a class file for Solaris 9, you have to run the pfinstall command on a system running Solaris 9.

To test the class file, change to the JumpStart directory that contains the class file and type the following:

/usr/sbin/install.d/pfinstall –d 

or

/usr/sbin/install.d/pfinstall –D 

Caution

Without the -d or -D option, pfinstall actually installs the Solaris software on the system by using the specified class file, and the data on the system is overwritten.


Here is the syntax for pfinstall:

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

The pfinstall options are described in Table 7.18.

Table 7.18. pfinstall Options
Option Description
-D Tells pfinstall to use the current system’s disk configuration to test the class file against.
-d <disk_config> Tells pfinstall to use a disk configuration file, <disk_config>, to test the class file against. If the <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 class file (an install-type upgrade). You must always test an upgrade class file against a system’s disk configuration using the -D option. A disk configuration file represents a disk’s structure. It describes a disk’s bytes per sector, flags, and slices. See the example following this table for how to create the <disk_config> file.
-c <path> Specifies the path to the Solaris CD-ROM image. This is required if the Solaris CD-ROM is not mounted on /cdrom. For example, use this option if the system is using Volume Manager to mount the Solaris CD-ROM.
<profile> Specifies the name of the class file to test. If the class file is not in the directory where pfinstall is being run, you must specify the path.

You can create a <disk_config> file by issuing the following command:

prtvtoc /dev/rdsk/<device_name> > <disk_config> 

/dev/rdsk/<device_name> is the device name of the system’s disk. <device_name> must be in the form c?t?d?s2 or c?d?s2. <disk_config> is the name of the disk configuration file.

Note

c?t?d?s2 designates a specific target for a SCSI disk, and c?d?s2 designates a non-SCSI disk.


Here’s an example:

prtvtoc /dev/rdsk/c0t3d0s2 >test 

The file named test created by this example would be your <disk_config> file, and it would look like this:

* /dev/rdsk/c0t3d0s2 partition map 
* 
* Dimensions: 
*     512 bytes/sector 
*     126 sectors/track 
*       4 tracks/cylinder 
*     504 sectors/cylinder 
*    4106 cylinders 
*    4104 accessible cylinders 
* 
* Flags: 
*    1: unmountable 
*   10: read-only 
* 
*                      First   Sector Last 
* Partition    Tag     Flags   Sector   Count    Sector   Mount Directory 
       0       2       00      0        268632   268631   / 
       1       3       01      268632   193032   461663 
       2       5       00      0        2068416  2068415 
       3       0       00      461664   152712    614375  /export 
       4       0       00      614376   141624    755999  /export/swap 
       6       4       00      756000   1312416   068415  /usr 

Note

If you want to test installing Solaris software on multiple disks, concatenate single disk configuration files and save the output to a new file.


The following example tests the ultra_class class file against the disk configuration on a Solaris 9 system on which pfinstall is being run. The ultra_class class file is located in the /export/jumpstart directory, and the path to the Solaris CD-ROM image is specified because Volume Management is being used.

In addition, if you want to test the class file for a system with a specific system memory size, set SYS_MEMSIZE to the specific memory size in MB, as follows:

SYS_MEMSIZE=memory_size 
export SYS_MEMSIZE 
cd /export/jumpstart 
/usr/sbin/install.d/pfinstall -D -c /cdrom/cdrom0/s0 ultra_class 

The system tests the class file and displays several pages of results. Look for the following message, which indicates that the test was successful:

Installation complete 
Test run complete. Exit status 0. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset