JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11 Installation Man Pages     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

System Administration Commands

aimanifest(1M)

distro_const(1M)

installadm(1M)

js2ai(1M)

File Formats

js2ai

- Translate JumpStart rules and profiles for use with the Automated Installer (AI).

Synopsis

js2ai [-h | --version]
js2ai -r | -p profile_name [-d jumpstart_dir]
    [-D destination_dir] [-lSv]
js2ai -s [-d jumpstart_dir]
    [-D destination_dir] [-Sv]
js2ai -V manifest

Description

js2ai is a utility for converting Oracle Solaris 10 JumpStart rules, profile, and syscfg configuration files to a format compatible with Automated Installer (AI). This utility makes a “best effort” to translate those JumpStart keywords that can be translated to the AI context. While this conversion does not create a complete one-to-one equivalence with JumpStart, it does provide AI manifest and system configuration profile entries that can then be used as a template for creating a complete AI configuration setup based on information gathered from JumpStart configuration files.

Using js2ai, you can do the following:

Translating Rule Keywords

Table 1 JumpStart Rule Keywords Translation

JumpStart Rule Keyword
AI Criteria Keyword
arch
cpu
hostaddress
ipv4
karch
arch
memsize
mem
model
platform
network
ipv4

JumpStart rule keywords not supported by js2ai:

any             installed
disksize        osname
domainname      probe
hostname        totaldisk

Converting Profile Keywords

Table 2 JumpStart Profile Keywords

JumpStart Profile Keyword
Notes
boot_device
The rootdisk is set to the specified device if not previously set by the root_device keyword.
fdisk
The value of disk_name must be a device. A device of all is not supported. The fdisk type must be solaris. A size of 0 or delete is not supported.

If partitioning is default and the rootdisk has not been set, the first fdisk solaris partition encountered is used as the rootdisk.

filesys
The local and mirrored file systems are supported when the mount point specified is / or swap.

No validation of the size is performed. The size specified in the resulting AI manifest might need to be adjusted to achieve a successful installation with this manifest.

install_type
Only the value initial_install is supported.
locale
No translation is performed. Make sure the locale specified is supported in Oracle Solaris 11.
package
An attempt to convert the specified package to its Oracle Solaris 11 equivalent is performed. Specifying the location of the package is not supported. Package lookups can take a considerable amount of time. If your profiles contain a long list of packages, you might want to use the --local flag during the conversion process.
partitioning
Supported types are default and explicit. Unlike JumpStart, when partitioning default is specified, only the disks that js2ai knows about are used. If no disks are specified in any keywords, the generated profile tells AI to choose which disk to use.
pool
If a pool is specified in a profile, the ZFS root pool is created using the specified devices. The pool keyword supersedes all other keywords when determining which devices to use for the ZFS root pool.

No validation of the pool size, swap size, or dump size is performed. These sizes might need to be adjusted in the resulting AI manifest to achieve a successful installation with this manifest.

root_device
The rootdisk is set to the specified device.
system_type
Only the value standalone is supported.
usedisk
The specified device might be used to resolve the any or rootdisk device during the conversion. Any devices specified that are not used for this purpose are added to the ZFS root pool, when that pool is not mirrored.

JumpStart profile keywords not supported by js2ai:

archive_location       geo
backup_media           layout_constraint
bootenv                local_customization
client_arch            metabd
client_root            no_master_check
client_swap            no_content_check
cluster                num_clients
dontuse                patch
forced_deployment

How the System's Root Disk is Determined During Profile Translation

Since js2ai does not have access to the actual system a profile references during the profile translation process, js2ai attempts to determine what the root disk is during translation using a process that matches JumpStart as much as possible.

The js2ai tool performs the following steps to determine what device to use for the root disk.

Stage
Action
1
If the root_device keyword is specified in the profile, js2ai sets rootdisk to the device on which the slice resides.
2
If rootdisk is not set and the boot_device keyword is specified in the profile, js2ai sets rootdisk to the boot device.
3
If rootdisk is not set, partitioning default is specified, and a solaris fdisk entry is encountered, js2ai sets rootdisk to the specified disk_name.
4
If rootdisk is not set and a filesys cwtxdysz size / entry is specified in the profile, js2ai sets rootdisk to the cwtxdysz disk specified in the entry.
5
If rootdisk is not set and a usedisk disk_name entry is specified in the profile, js2ai sets rootdisk to the disk_name disk specified in the entry.
6
If rootdisk is not set and the following specification is encountered in the profile where size is not 0 or delete and disk_name is not all, then rootdisk is set to this disk_name.
fdisk disk_name solaris size
7
If rootdisk is not set, any occurrence where the device is specified as rootdisk generates a conversion error.

How the any Device Is Translated During Profile Translation

The js2ai tool performs the following steps to determine what device to use when the any keyword is specified.

Stage
Action
1
If the any device is specified and the keyword action specified (non-mirrored pool, or filesys with a / mount point), the any device is set to rootdisk if rootdisk is set.
2
If the any device has not been translated and a usedisk statement exists in the profile, the any device is set to the device specified by the usedisk statement.
3
If the any device has not been translated and the action where the any device is specified causes the ZFS root pool to be created, AI chooses the device. This is not applicable when a mirrored pool is specified.

How the ZFS Root Pool is Determined During Profile Translation

The js2ai tool performs the following steps to determine what device to use for the ZFS root pool. Once the ZFS root pool is determined, subsequent definitions encountered are flagged as errors if they conflict with the ZFS root pool that has already been determined.

Stage
Action
1
If the profile specifies the pool keyword, js2ai sets the ZFS root pool to the devices specified by the pool keyword.
2
If the ZFS root pool has not been determined and the profile specifies a filesys with a mount point of /, the ZFS root pool is created using the devices specified.
3
If the ZFS root pool has not been determined and all keywords in the profile have been processed, and if rootdisk is set, the ZFS root pool is created using the rootdisk device.
4
If the ZFS root pool has not been determined and the partition type is default, AI chooses the device to use for the ZFS root pool.
5
If the ZFS root pool has not been determined and no errors have occurred during processing, AI chooses the device to use for the ZFS root pool.
6
If the ZFS root pool is not a mirrored pool and one or more usedisk devices that were specified have not been used for a rootdisk or any device translation, those disks are added to the ZFS root pool.

Converting sysidcfg Keywords

Table 3 JumpStart sysidcfg Keywords

sysidcfg Keyword
Notes
keyboard
No translation is performed. Make sure the keyboard specified in the sysidcfg file is supported in Oracle Solaris 11.
name_service
Supports values None, DNS, NIS, and LDAP. NIS+ name services are translated as NIS.
network_interface
Only a single interface is supported. Limited support for PRIMARY. Only the first interface encountered in the sysidcfg file is processed.
root_password
No translation is necessary.
security_policy
Supports value: None
service_profile
Supports value: limited_net
system_locale
No translation is performed. Make sure the locale specified in the sysidcfg file is supported in Oracle Solaris 11.
terminal
No translation is performed. Make sure the terminal type specified in the sysidcfg file is supported in Oracle Solaris 11.
timeserver
Supports value: localhost
timezone
No translation is necessary.

JumpStart sysidcfg keywords not supported by js2ai:

nfs4_domain

Options

The js2ai command has the following options. The use of these options is illustrated in the “Examples” section.

-h, --help

Show the usage help message.

--version

Show the version number of the js2ai utility.

-d jumpstart_dir, --dir jumpstart_dir

Specify the location of the rules and profile files or the sysidcfg file.

-D destination_dir, --dest destination_dir

Specify the location for the output files.

-l, --local

When searching for Image Packaging System (IPS) equivalents for the package keyword value in a JumpStart profile, search the IPS packages installed on the host system rather than the packages in an IPS package repository.

-p profile_name, --profile profile_name

Convert the specified JumpStart profile and generate a manifest for the profile processed. In this case, no criteria file is needed or generated.

-r, --rule

Convert rules and associated profiles and generate a manifest for each profile processed.

-s, --sysidcfg

Process the sysidcfg file and output the results to sc_profile.xml.

-S, --skip

Skip validation.

-v, --verbose

Provide details on the actions that occurred during processing.

-V filename

Validate the specified AI manifest file or SMF system configuration profile file. AI criteria validation is not supported.

Error Report

The js2ai tool generates an error report when one or more errors occurs during the conversion.

# js2ai -r
                    Process  Unsupported  Conversion  Validation
Name      Warnings  Errors   Items        Errors      Errors
--------  --------  -------  -----------  ----------  ----------
rules            0        0            2           0           -
profile1         0        0            0           2           1

Conversion completed. One or more failures occurred.
For errors see ./js2ai.log

The report contains one entry for each file in which js2ai encountered an error. To generate an error report even when no errors occur, specify -v or --verbose.

The report tells you what type of errors occurred in what files. Five error types are defined: Warnings, Process Errors, Unsupported Items, Conversion Errors, and Validation Errors.

Warnings

Items in these messages are not required to be corrected. For example, you might receive a warning message that information such as host name or root password was not provided, and default values will be used.

Process Errors

These errors refer to problems that prevent js2ai from processing a file or a line within the file. Process errors typically occur when the file has a syntax error.

Unsupported Items

These items refer to a line that js2ai does not support. Changing the value associated with a keyword might eliminate this error.

Conversion Errors

These errors refer to a condition that prevents js2ai from processing a line. These errors should be manually corrected, or the offending lines should be removed from the file.

Validation Errors

These errors refer to the errors that occurred when the generated manifest was validated against the schema definition used by AI. These errors must to be corrected before the manifest can be used by AI.

The js2ai.log file indicates what error occurred on what line.

# cat js2ai.log
rules: line 4: unsupported keyword: disksize
rules: line 4: unsupported keyword: installed
net924_sun4c: line 4: unsupported keyword: cluster
net924_sun4c: line 5: unsupported keyword: num_clients
net924_sun4c: line 6: unsupported keyword: client_swap
net924_sun4c: line 7: unsupported keyword: client_arch
upgrade: line 1: unsupported value for 'install_type' specified: upgrade

If a validation error of the manifest occurs, the js2ai.log file contains a pointer to the log file that contains the validation errors, as shown in the following example:

Validation Errors:
    profile1: manifest validation of
    ./AI_profile1/profile1.xml failed.
    For details see ./AI_profile1/profile_validation.log

Conversion Strategy

Recommended Strategy for Rule and Profile Conversion

A one-to-one conversion between JumpStart and AI does not exist. The following steps provide a general procedure for performing the conversion.

  1. The js2ai utility attempts to flag any errors it encounters, but js2ai assumes the rules, profiles, and sysidcfg files that are being converted are valid.

  2. Copy the JumpStart configuration directory of rules, profile, and syscfg configuration files to an Oracle Solaris 11 system that has the install/installadm package installed.

  3. In the JumpStart configuration directory that you copied to the Oracle Solaris 11 system in step 2, run the js2ai conversion tool.

    # js2ai -rS

    This command performs a conversion operation on the rules file and the profiles referenced by the rules file. Each profile referenced in the rules file is processed against the AI client provisioning manifest, /usr/share/auto_install/manifest/default.xml. This step creates a directory named AI_profile_name for each profile specified in the JumpStart rules file. The AI_profile_name directory contains one or more AI manifests for the translated profile in the form profile_name${arch}.xml. See the “Files” section for more information.

    The -S option skips the validation sequence. Validation is done in step 5.

  4. If the message “Successfully completed conversion” is output, skip to step 5. Otherwise, examine the js2ai.log file and follow these steps:

    1. Correct any process errors.

    2. Remove any lines from the rules and profile files that are listed as Unsupported Items.

    3. Examine the conversion errors and correct the errors if possible. Otherwise, remove the lines that are causing the errors.

    4. Examine any warning messages and make sure no corrections are necessary.

    5. Repeat step 3 until no processing errors, unsupported items, and conversion errors are reported.

  5. Rerun js2ai without the -S option.

    # js2ai -r

    If any validation errors occur for any of the processed profiles, the resulting AI manifest must be manually corrected. Examine the js2ai.log file for details of the failure. See the AI documentation for information about AI manifests.

  6. Convert any sysidcfg files that are associated with this JumpStart configuration.

    For each sysidcfg file, execute the following command:

    # js2ai -sS -d sysidcfg_dir

    For each sysidcfg file processed, this step creates an AI system configuration profile file named sc_profile.xml in the directory where the js2ai command was invoked. Use the -D option to specify a different directory for the sc_profile.xml file.

  7. If the message “Successfully completed conversion” is output, skip to step 8. Otherwise, examine the js2ai.log file and follow these steps:

    1. Correct any process errors.

    2. Remove any lines from the sysidcfg file that are listed as unsupported items.

    3. Examine the conversion errors and correct the errors if possible. Otherwise, remove the lines that are causing the errors.

    4. Examine any warning messages and make sure no corrections are necessary.

    5. Repeat step 6 until no processing errors, unsupported items, and conversion errors are reported.

  8. Rerun js2ai without the -S option.

    # js2ai -s -d sysidcfg_dir

    If any validation errors occur for any of the processed sysidcfg files, the resulting AI system configuration profile must be manually corrected. Examine the js2ai.log file for details of the failure. See the AI documentation for information about system configuration profiles.

  9. The js2ai conversion process is complete. Perform a manual verification of the resulting criteria, AI manifest, and system configuration profile files. The disk space requirements for an Oracle Solaris 11 installation are different from the disk space required for an Oracle Solaris 10 installation. Make sure the disk space allocated in your AI manifests meets the requirements of Oracle Solaris 11.

  10. Configure AI to use the newly generated files. Add the newly generated criteria, AI manifest, and system configuration profile files to an existing AI install service.

    Use the installadm command with the create-manifest subcommand to add each AI manifest with criteria for selecting that manifest. Each client can use only one AI manifest.

    # installadm create-manifest -n ai_service_name \
    -f manifest_file -m manifest_name \
    -C criteria_file

    Use the create-profile subcommand to add each profile with criteria for selecting that configuration profile. Each client can use one or more system configuration profiles.

    # installadm create-profile -n ai_service_name \
    -f profile_file -p profile_name \
    -C criteria_file

    See the AI documentation and the installadm(1M) man page for information about configuring AI install services.

Examples

Example 1 Processing a JumpStart Configuration

The following command processes the JumpStart rules and profiles in the current directory. The output is also placed in this directory.

# js2ai -r

Example 2 Processing a Specific JumpStart Directory

The following command processes the JumpStart rules and profiles from the specified directory and places the output files in the same directory.

# js2ai -r -d /export/jumpstart

For more information about the output files, see Example 4 and the “Files” section.

Example 3 Processing a Profile in a Specific JumpStart Directory and Separate Destination Directory

The following command processes the JumpStart rules and profile files from the /export/jumpstart directory and places the output files in /export/output.

# js2ai -p profile1 -d /export/jumpstart -D /export/output

Example 4 Example Input and the Resulting Output for a Specified Rule and Its Profile

Rule:

arch sparc && karch sun4u && \
    model 'SUNW,Serverblade1'  -   profile    -

Profile:

install_type    initial_install
pool mypool auto auto auto c1t0d0s0

Conversion command:

# js2ai -r -d /jumpstart -D /tmp/output

Output files:

/tmp/output/AI_profile/profile.x86.xml
/tmp/output/AI_profile/profile.sparc.xml
/tmp/output/AI_profile/criteria-1.xml

Two manifest files are created, one for SPARC and one for x86, even though the rules file specifies the CPU type as SPARC. During the conversion process, rules and profiles are processed independently of one another.

Example 5 Adding Generated Files to an AI Install Service

This example adds the manifest and criteria to an existing service, using the files generated in Example 4.

Files:

/tmp/output/AI_profile/profile.sparc.xml
/tmp/output/AI_profile/criteria-1.xml

installadm command:

# installadm create-manifest -n svc-name \
-f /tmp/output/AI_profile/profile.sparc.xml \
-m sparc_profile \
-C /tmp/output/AI_profile/criteria-1.xml

Example 6 Processing a sysidcfg File

The following command processes the sysidcfg file in the current directory and outputs the resulting SMF system configuration profile as sc_profile.xml in the same directory.

# js2ai -s

Exit Status

The following exit values are returned:

0

All the files were processed successfully.

>0

An error occurred.

Files

output_directory/AI_${profile_name}

Directory that contains all the corresponding files that have been translated to the new AI syntax associated with the profile.

output_directory/AI_${profile_name}.${arch}.xml

The manifest file created as a result of translating the profile. ${arch} can be one of these three values: sparc, x86, or generic. A manifest file that is in the form ${profile_name}.generic.xml can be used to install both x86 and SPARC systems.

output_directory/AI_${profile_name}/criteria-rule_number.xml

The criteria-rule_number.xml file produced corresponds to the rule in the rules file, and the rule_number is the rule number based on its position in the rules file. This criteria file can then be used with the -C option to the installadm command.

Since more than one rule can specify the same profile, more than one criteria file can exist in each directory, but only one instance of the ${profile_name}.${arch}.xml file should exist in each output directory.


Note - If the -p option is used, no criteria file is produced for the profile that is processed. Criteria files are only generated when used with the -r option.


output_directory/js2ai.err

This file contains a stack trace of an unexpected condition that occurred during processing. This file is not typically created.

output_directory/js2ai.log

This file contains a log of the files processed and any errors found during processing.

output_directory/sc_profile.xml

This file is the SMF system configuration profile that is generated when the -s option is used to convert a sysidcfg file.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
install/js2ai
Interface Stability
Uncommitted

See Also

installadm(1M), pkg(1)

Transitioning From Oracle Solaris 10 JumpStart to Oracle Solaris 11 Automated Installer

Part III, Installing Using an Install Server, in Installing Oracle Solaris 11 Systems