Transitioning From Oracle® Solaris 10 JumpStart to Oracle Solaris 11.2 Automated Installer

Exit Print View

Updated: July 2014
 
 

Rules and Profiles Conversion Using js2ai

This section shows using a single js2ai command to convert a JumpStart rules file and all the profile files referenced by that rules file. By default, each converted profile is output to a directory named AI_profile-filename. The rule to select that profile is output to that same directory as an AI criteria file.

Sample JumpStart Rules File and Profile Files

The following example uses the following rules file:

# The following rule matches only one system:

hostname sample_host    - fdisk.profile         -

# The following rule matches only one system:

hostaddress 10.6.68.127 - mirrorfilesys.profile -

# The following rule matches any system that is on the 924.222.43.0 network:

network 924.222.43.0    - rootdisk.profile      -

# The following rule matches all x86 systems:

arch i386               - mirrorpool.profile    -

The fdisk.profile file has the following content:

install_type initial_install
system_type server
root_device c1t0d0s0
usedisk c1t0d0
fdisk rootdisk solaris all
partitioning explicit
filesys rootdisk.s1 5000 swap
filesys rootdisk.s0 10000 /
cluster SUNWCall

The mirrorfilesys.profile file has the following content:

install_type initial_install
partitioning default
filesys mirror c6t0d0s0 c6t1d0s0 60048 /
cluster SUNWCuser

The mirrorpool.profile file has the following content:

install_type initial_install
partitioning default
pool newpool auto auto auto mirror any any
cluster SUNWCuser

The rootdisk.profile file has the following content:

install_type initial_install
partitioning explicit
filesys rootdisk.s0 15000 /
filesys rootdisk.s1 1000 swap
cluster SUNWCall

Using js2ai to Process a rules File With Associated Profiles

Use the following command to process this rules file. In the error report, validation errors are shown as a hyphen character because validation was not done. Validation is suppressed by the –S option.

# js2ai -rS
                                Process  Unsupported  Conversion  Validation
Name                  Warnings  Errors   Items        Errors      Errors
-------------------   --------  -------  -----------  ----------  ----------
rules                        0        0            1           0           -
fdisk.profile                0        0            2           0           -
mirrorfilesys.profile        0        0            2           0           -
mirrorpool.profile           0        0            1           1           -
rootdisk.profile             0        0            1           2           -

Conversion completed. One or more failures and/or warnings occurred.
For errors see js2ai.log
# cat js2ai.log
rules:line 3:UNSUPPORTED: unsupported keyword: hostname
fdisk.profile:line 2:UNSUPPORTED: unsupported value for 'system_type' specified: server
fdisk.profile:line 9:UNSUPPORTED: unsupported keyword: cluster
mirrorfilesys.profile:line 3:UNSUPPORTED: unsupported mount point of 'unnamed' specified,
mount points other than '/' and 'swap' are not supported
mirrorfilesys.profile:line 4:UNSUPPORTED: unsupported keyword: cluster
mirrorpool.profile:line 3:CONVERSION: unable to convert 'any' device to physical device. Replace 'any' 
with actual device name
mirrorpool.profile:line 4:UNSUPPORTED: unsupported keyword: cluster
rootdisk.profile:line 3:CONVERSION: unable to convert 'rootdisk.s0'.  Replace'rootdisk.' with actual
device name
rootdisk.profile:line 4:CONVERSION: unable to convert 'rootdisk.s1'.  Replace'rootdisk.' with actual
device name
rootdisk.profile:line 5:UNSUPPORTED: unsupported keyword: cluster

Output is stored in directories named AI_profile-filename. AI criteria files created from the JumpStart rules are named for the position of the rule in the rules file. AI manifests are named profile-filename.arch.xml, where arch is generic, x86, or sparc.

# ls AI_*
AI_fdisk.profile:
fdisk.profile.x86.xml

AI_mirrorfilesys.profile:
criteria-2.xml      mirrorfilesys.profile.generic.xml

AI_mirrorpool.profile:
criteria-2.xml      mirrorpool.profile.generic.xml

AI_rootdisk.profile:
criteria-3.xml      rootdisk.profile.generic.xml

Replacing the hostname Keyword

The log file reports that the JumpStart rule keyword hostname is not supported as an AI criteria keyword for selecting an AI manifest. The hostname keyword specifies which clients should use the fdisk.profile profile. Because hostname is not a supported keyword for selecting AI manifests, the new AI_fdisk.profile directory does not contain an AI criteria file.

You could fix this problem by changing hostname to hostaddress in the rules file.

You could also fix this problem by creating an AI criteria file that specifies a MAC address or IP address to identify the hostname system. For example, the following criteria file is equivalent to the JumpStart rule hostname sample_host if 0:14:4F:20:53:97 is the MAC address of sample_host:

<?xml version="1.0" encoding="utf-8"?>
<ai_criteria_manifest>
  <ai_criteria name="mac">
    <value>0:14:4F:20:53:97</value>
  </ai_criteria>
</ai_criteria_manifest>

To find the MAC address of a system, use the dladm command as described in the dladm(1M) man page.

For the JumpStart rule hostaddress 10.6.68.127, the js2ai command automatically created the AI criteria file AI_mirrorfilesys.profile/criteria-2.xml, replacing the JumpStart hostaddress keyword with the AI ipv4 keyword:

<?xml version="1.0" encoding="utf-8"?>
<ai_criteria_manifest>
  <ai_criteria name="ipv4">
    <value>
      10.6.68.127
    </value>
  </ai_criteria>
</ai_criteria_manifest>

For the JumpStart rule network 924.222.43.0, the js2ai command automatically created the AI criteria file AI_rootdisk.profile/criteria-3.xml, specifying a range of IP addresses based on the given network address:

<?xml version="1.0" encoding="utf-8"?>
<ai_criteria_manifest>
  <ai_criteria name="ipv4">
    <range>
      924.222.43.0 924.222.43.255
    </range>
  </ai_criteria>
</ai_criteria_manifest>

For the JumpStart rule arch i386, the js2ai command automatically created the AI criteria file AI_mirrorpool.profile/criteria-4.xml, replacing the JumpStart arch keyword with the AI cpu keyword:

<?xml version="1.0" encoding="utf-8"?>
<ai_criteria_manifest>
  <ai_criteria name="cpu">
    <value>
      i386
    </value>
  </ai_criteria>
</ai_criteria_manifest>

Fixing AI Manifest Files

The js2ai command often creates an AI manifest for each JumpStart profile even though errors are reported. This section describes how to address some common errors so that the output AI manifests are more complete.

Example 2-4  Fixing fdisk.profile Errors

The js2ai command showed the following errors for the fdisk.profile JumpStart profile:

fdisk.profile:line 2:UNSUPPORTED: unsupported value for 'system_type' specified: server
fdisk.profile:line 9:UNSUPPORTED: unsupported keyword: cluster

These two lines are ignored and do not affect the output AI manifest. You could delete these two lines if you want the conversion to avoid the error messages. The fdisk.profile file then has the following content:

install_type initial_install
root_device c1t0d0s0
usedisk c1t0d0
fdisk rootdisk solaris all
partitioning explicit
filesys rootdisk.s1 5000 swap
filesys rootdisk.s0 10000 /

Use the –p option of the js2ai command to process just this profile.

# js2ai -p fdisk.profile
Successfully completed conversion

The output AI manifest, AI_fdisk.profile/fdisk.profile.x86.xml, has the following content in the target stanza:

<target>
  <disk whole_disk="true">
    <disk_name name="c1t0d0" name_type="ctd"/>
    <partition action="create" name="1" part_type="191">
      <slice name="1" action="create" force="true" is_swap="true">
        <size val="5000mb"/>
      </slice>
      <slice name="0" action="create" force="true" in_zpool="rpool" in_vdev="rpool_vdev">
        <size val="10000mb"/>
      </slice>
     </partition>
  </disk>
  <logical noswap="false" nodump="true" >
    <zpool name="rpool" is_root="true">
      <vdev name="rpool_vdev" redundancy="none"/>
      <filesystem name="export" mountpoint="/export"/>
      <filesystem name="export/home"/>
      <be name="solaris"/>
    </zpool>
  </logical>
</target>

The software stanza is the same as in /usr/share/auto_install/manifest/default.xml because this profile does not contain any package specifications.

Example 2-5  Fixing mirrorfilesys.profile Errors

The js2ai command showed the following errors for the mirrorfilesys.profile JumpStart profile:

mirrorfilesys.profile:line 3:UNSUPPORTED: unsupported mount point of 'unnamed' specified,
mount points other than '/' and 'swap' are not supported
mirrorfilesys.profile:line 4:UNSUPPORTED: unsupported keyword: cluster

In a JumpStart profile file, you can omit the file-system parameter in the filesys mirror specification. In a js2ai conversion, you cannot omit the file-system parameter, which must have one of the following two values: / or swap.

Edit the mirrorfilesys.profile file to add “/” at the end of the filesys specification and to delete the cluster line. The mirrorfilesys.profile file then has the following content:

install_type initial_install
partitioning default
filesys mirror c6t0d0s0 c6t1d0s0 60048 /

Save the AI_mirrorfilesys.profile/criteria-2.xml file in another location. Then, use the –p option of the js2ai command to process just this profile.

# js2ai -p mirrorfilesys.profile
Successfully completed conversion

The AI_mirrorfilesys.profile directory contains two output AI manifests: mirrorfilesys.profile.sparc.xml and mirrorfilesys.profile.x86.xml. The only difference between these two AI manifests is that mirrorfilesys.profile.x86.xml contains two partition specifications. The mirrorfilesys.profile.x86.xml manifest has the following content in the target stanza:

<target>
  <disk>
    <disk_name name="c6t1d0" name_type="ctd"/>
    <partition action="create" name="1" part_type="191">
      <slice action="create" force="true" in_vdev="rpool_vdev" in_zpool="rpool" name="0">
        <size val="60048mb"/>
      </slice>
    </partition>
  </disk>
  <disk>
    <disk_name name="c6t0d0" name_type="ctd"/>
    <partition action="create" name="1" part_type="191">
      <slice action="create" force="true" in_vdev="rpool_vdev" in_zpool="rpool" name="0">
        <size val="60048mb"/>
      </slice>
    </partition>
  </disk>
  <logical noswap="false" nodump="false" >
    <zpool name="newpool" is_root="true">
      <vdev name="rpool_vdev" redundancy="mirror"/>
      <filesystem name="export" mountpoint="/export"/>
      <filesystem name="export/home">
      <be name="solaris">
    </zpool>
  </logical>
</target>

The software stanza is the same as in /usr/share/auto_install/manifest/default.xml because this profile does not contain any package specifications.

Example 2-6  Fixing mirrorpool.profile Errors

The js2ai command showed the following errors for the mirrorpool.profile JumpStart profile:

mirrorpool.profile:line 4:CONVERSION: unable to convert 'any' device to physical device.
Replace 'any' with actual device name
mirrorpool.profile:line 8:UNSUPPORTED: unsupported keyword: cluster

    Use either of the following two methods to fix these errors. Both of these fixes result in the same AI manifest output. See also How the any Device Is Translated.

  • Edit the mirrorpool.profile profile, replacing both any entries with physical device names. Also, delete the cluster line. The mirrorpool.profile file will then have content similar to the following:

    install_type initial_install
    partitioning default
    pool newpool auto auto auto mirror c6t0d0s0 c6t1d0s0
  • If you specify any instead of a physical device name in the vdev-list list in the pool specification, you must provide device information prior to the specification that includes the any parameter. Edit the mirrorpool.profile profile to add a usedisk specification before the pool specification. Also, delete the cluster line. The mirrorpool.profile file will then have content similar to the following:

    install_type initial_install
    partitioning default
    usedisk c6t0d0 c6t1d0
    pool newpool auto auto auto mirror any any

Save the AI_mirrorpool.profile/criteria-4.xml file in another location. Then, use the –p option of the js2ai command to process just this profile.

# js2ai -p mirrorpool.profile
Successfully completed conversion

The AI_mirrorpool.profile directory contains two output AI manifests: mirrorpool.profile.sparc.xml and mirrorpool.profile.x86.xml. The only difference between these two AI manifests is that mirrorpool.profile.x86.xml contains two partition specifications. The mirrorpool.profile.x86.xml manifest has the following content in the target stanza:

<target>
  <disk>
    <disk_name name="c6t1d0" name_type="ctd"/>
    <partition action="create" name="1" part_type="191">
      <slice action="create" force="true" in_vdev="rpool_vdev" in_zpool="newpool" name="0"/>
    </partition>
  </disk>
  <disk>
    <disk_name name="c6t0d0" name_type="ctd"/>
    <partition action="create" name="1" part_type="191">
      <slice action="create" force="true" in_vdev="rpool_vdev" in_zpool="newpool" name="0"/>
    </partition>
  </disk>
  <logical noswap="false" nodump="true">
    <zpool name="rpool" is_root="true">
      <vdev name="rpool_vdev" redundancy="mirror"/>
      <filesystem name="export" mountpoint="/export"/>
      <filesystem name="export/home">
      <be name="solaris">
    </zpool>
  </logical>
</target>

The software stanza is the same as in /usr/share/auto_install/manifest/default.xml because this profile does not contain any package specifications.

Example 2-7  Fixing rootdisk.profile Errors

The js2ai command showed the following errors for the rootdisk.profile JumpStart profile:

rootdisk.profile:line 3:CONVERSION: unable to convert 'rootdisk.s0'.
Replace'rootdisk.' with actual device name
rootdisk.profile:line 4:CONVERSION: unable to convert 'rootdisk.s1'.
Replace'rootdisk.' with actual device name
rootdisk.profile:line 5:UNSUPPORTED: unsupported keyword: cluster

    Use either of the following two methods to fix these errors. Both of these fixes result in the same AI manifest output.

  • Edit the rootdisk.profile profile, replacing rootdisk. with c0t0d0. Also, delete the cluster line. The rootdisk.profile file then has the following content:

    install_type initial_install
    partitioning explicit
    filesys c0t0d0s0 15000 /
    filesys c0t0d0s1 1000 swap
  • Edit the rootdisk.profile profile to add a root_device specification and to delete the cluster line. The rootdisk.profile file then has the following content:

    install_type initial_install
    partitioning explicit
    root_device c0t0d0s0
    filesys rootdisk.s0 15000 /
    filesys rootdisk.s1 1000 swap

Save the AI_rootdisk.profile/criteria-3.xml file in another location. Then use the –p option of the js2ai command to process just this profile.

# js2ai -p rootdisk.profile
Successfully completed conversion

The AI_rootdisk.profile directory contains two output AI manifests: rootdisk.profile.sparc.xml and rootdisk.profile.x86.xml. The only difference between these two AI manifests is that rootdisk.profile.x86.xml contains a partition specification. The rootdisk.profile.x86.xml manifest has the following content in the target stanza:

<target>
  <disk>
    <disk_name name="c0t0d0" name_type="ctd"/>
    <partition action="create" name="1" part_type="191">
      <slice action="create" force="true" in_vdev="rpool_vdev" in_zpool="rpool" name="0">
        <size val="15000mb"/>
      </slice>
      <slice action="create" force="true" is_swap="true" name="1">
        <size val="1000mb"/>
      </slice>
    </partition>
  </disk>
  <logical noswap="false" nodump="true" noswap="false">
    <zpool name="rpool" is_root="true" >
      <vdev name="rpool_vdev" redundancy="none"/>
      <filesystem name="export" mountpoint="/export"/>
      <filesystem name="export/home">
      <be name="solaris">
    </zpool>
  </logical>
</target>

The software stanza is the same as in /usr/share/auto_install/manifest/default.xml because this profile does not contain any package specifications.