Solaris Advanced Installation Guide

x86: How to Create Disk Configuration Files

Disk configuration files enable you to use pfinstall from a single system to test profiles against different disk configurations. Follow this procedure to create single and multiple disk configuration files for an x86 based system:

  1. Locate an x86 based system with a disk that you want to test.

  2. Become root.

  3. Create part of the single disk configuration file by saving the output of the fdisk command to a file:


    # fdisk -R -W disk_config -h /dev/rdsk/device_name
    

    disk_config

    Is the name of a disk configuration file. 

    /dev/rdsk/device_name

    Is the device name of the fdisk layout of the entire disk. device_name must be in the form cwtxdyp0 or cxdyp0.

  4. Append the output of the prtvtoc command to the disk configuration file:


    # 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 cwtxdys2 or cxdys2.

    disk_config

    Is the name of the disk configuration file. 

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


    # cat disk_file1 disk_file2 > multi_disk_config
    

    The new file becomes the multiple disk configuration file. For example:



    # cat 104_disk2 104_disk3 104_disk5 > multi_disk_test
    

  6. If you've created a multiple disk configuration file, and the target numbers in the disk device names are not unique, you must edit this file and make them unique.

    For example, if you concatenated two disk configuration files together that each had target numbers of t0, you would have to change the second target number to t2 as shown:


    * /dev/rdsk/c0t0d0p0 default fdisk table
    ...
    * /dev/rdsk/c0t2d0p0 default fdisk table

Where to Go Next

You have completed creating disk configuration files for an x86 based system. To use disk configuration files to test profiles, see "Testing a Profile".

Example

The following example creates a single disk configuration file, 500_test, on an x86 based system with a 500-Mbyte disk.

First, you would save the output of the fdisk command to a file named 500_test:



# fdisk -R -W 500_test -h /dev/rdsk/c0t0d0p0

The 500_test file would look like this:


 * /dev/rdsk/c0t0d0p0 default fdisk table
* Dimensions:
*     512 bytes/sector
*      94 sectors/track
*      15 tracks/cylinder
*    1455 cylinders
*
*  HBA Dimensions:
*     512 bytes/sector
*      94 sectors/track
*      15 tracks/cylinder
*    1455 cylinders
*
* systid:
*  1:    DOSOS12
*  2:    PCIXOS
*  4:    DOSOS16
*  5:    EXTDOS
*  6:    DOSBIG
*  86:   DOSDATA
*  98:   OTHEROS
*  99:   UNIXOS
* 130:   SUNIXOS
*
* Id  Act Bhead Bsect   Bcyl  Ehead  Esect  Ecyl Rsect  Numsect
 130  128 44    3       0     46    30     1001 1410   2050140

Second, you would append the output of the prtvtoc command to the 500_test file:



# prtvtoc /dev/rdsk/c0t0d0s2 >> 500_test

The 500_test file is now a complete disk configuration file:


* /dev/rdsk/c0t0d0p0 default fdisk table	
* Dimensions:
*     512 bytes/sector
*      94 sectors/track
*      15 tracks/cylinder
*    1455 cylinders
*
*  HBA Dimensions:
*     512 bytes/sector
*      94 sectors/track
*      15 tracks/cylinder
*    1455 cylinders
*
* systid:
*  1:    DOSOS12
*  2:    PCIXOS
*  4:    DOSOS16
*  5:    EXTDOS
*  6:    DOSBIG
*  86:   DOSDATA
*  98:   OTHEROS
*  99:   UNIXOS
*  130:  SUNIXOS
*
* Id  Act Bhead Bsect Bcyl  Ehead  Esec  Ecyl Rsect  Numsect
 130  128 44    3     0     46    30    1001 1410   2050140
* /dev/rdsk/c0t0d0s2 partition map
*
* Dimensions:
*      512 bytes/sector
*       94 sectors/track
*       15 tracks/cylinder
*     1110 sectors/cylinder
*     1454 cylinders
*     1452 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*                          First    Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       2      5    01       1410   2045910   2047319
       7      6    00       4230   2043090   2047319  /space
       8      1    01          0      1410     1409
       9      9    01       1410      2820     422987