Command Summary: Basic Operations with the Automated Installer

In Oracle Solaris 11

by Ginny Henningsen

This article summarizes the commands that control the Automated Installer in Oracle Solaris 11, and shows you how to perform basic operations with them.

Published June 2012

To help system administrators get up to speed quickly using the Automated Installer (AI) in Oracle Solaris 11, we collected a summary of commonly used IPS commands in the Installation and Deployment Cheat Sheet for Oracle Solaris 11. This article expands on that cheat sheet by reviewing basic concepts of the Automated Installer and showing you how to perform basic operations with those commands.

About the Automated Installer

To reduce the overhead of deploying Oracle Solaris-based systems and software, Oracle engineers redesigned automated installation in the Oracle Solaris 11 release. Oracle Solaris 11 introduces a new network-based Automated Installer (AI) that resolves software package dependencies, provides greater provisioning flexibility, and performs hands-free installations on SPARC and x86 systems.  This article describes how to perform its basic operations:

  • How to Create an Installation Service
  • How to Create Manifests
  • How to Crate System Configuration Profiles
  • How to Troubleshoot the Installation
  • How to Migrate from Jumpstart
  • How to Create a Boot Environment
Have some favorite sysadmin commands of your own that you'd like to share?   Become an OTN member and get paid for publishing your article on OTN.

Overview of the Automated Installation Process

AI leverages software package repositories on the network to install multiple network client types. The AI installation process consists of these basic administrative steps:

  1. Setting up an Oracle Solaris 11 system as an AI server
  2. Creating an installation service (including AI boot images, installation manifests, and system configuration profiles) to automate client installation
  3. Testing the installation service on a client
  4. Running the installation service in production

Prerequisites for AI installations:

  • All clients must be able to access a DHCP server. DHCP typically provides client networking information (IP address, subnet mask, router, and DNS server) and the location of the AI install server. Although DHCP is used to identify the system initially, it is also possible to use AI without having a DHCP infrastructure in place.
  • All clients must be able to access the AI install server. The AI install server and the DHCP server can be the same machine or two different machines. The AI install server must have a static IP address, a default route, and the installation tools package installed. (The command pkg list installadm confirms whether installation tools are already installed.)
  • All clients must be able to access an Image Packaging System (IPS) software package repository, either the Oracle package repository or a local software repository.

Figure 1 is a simplified view of the AI boot process. When the client boots over the network, it gets its network configuration and the location of the install server from the DHCP server. The install server provides an AI boot image to the client. When the client boots, the install service looks for a manifest or script that matches the client's criteria. (A derived manifest script, or simply a "script," can query a running AI client and build a custom manifest based on the answers.) When a matching manifest or script is found, the client is installed according to those specifications. If no match is found, a default manifest or script is used.

Figure 1 - The Automated Installation Process

Figure 1. The AI Process

System configuration profiles provide the ability to fine-tune systems during hands-free installations. The profiles complement manifests and typically contain specifications for postinstallation (configuring system variables such as username, user password, time zone, host name, and IP address). System configuration profiles are processed by the Oracle Solaris Service Management Facility (SMF) after OS package installation when the client first boots.

For details on setting up an installation service, see the OTN article "How to Set Up Automated Installation Services for Oracle Solaris 11" (also written by Isaac Rozenfeld) and Installing Oracle Solaris 11 Systems from the Oracle Solaris documentation set.

How to Create an Installation Service

The installadm command creates, lists, and configures installation services, including the definition of client-matching criteria. The create-service subcommand is used to define an installation service. The following sample command creates a service using a downloaded ISO file, specifying x86-based DHCP clients that start at address and a total count of 10 addresses.

# installadm create-service -n s11x86 -i -c 10  \
-s /path/to/solaris-11-1111-ai-x86.iso

The list subcommand lists defined installation services, for example:
$ installadm list 
Service Name     Alias Of         Status  Arch  Image Path  
------------     --------         ------  ----  ----------  
default-i386     sol-11-i386-svc  on      x86   /export/images/soli386 
default-sparc    sol-11-sparc-svc on      Sparc /export/images/solsparc 
sol-11-i386-svc  -                on      x86   /export/images/soli386 
sol-11-sparc-svc -                on      Sparc /export/images/solsparc

With the -m option, the list subcommand displays available AI manifests for each service:

# installadm list -m -n my-service
Manifest      Status    Criteria
--------      ------    --------
manifest2               arch = i86pc
                        mem  = 4096 MB - unbounded
sparc_setup             arch = sun4v
new_default   Default   (Ignored: mem = 2048 MB - 4095 MB)
orig_default  Inactive  None

In the above example, four manifests are defined for the installation service my-service:

  • A nondefault manifest (manifest2) with architecture and memory-related criteria
  • A nondefault script (sparc_setup) with architecture criteria
  • A default manifest (new_default) with criteria that are ignored
  • A nondefault manifest (orig_default) that is marked inactive because it has no criteria

AI manifests are stored in XML and easily customized. The first command below exports the default installation manifest associated with the s11x86 service. After you edit the exported manifest file, use the update-manifest subcommand to update the manifest associated with the service:

# installadm export -n s11x86 -m orig_default > manifest.xml

[Edit manifest.xml.]

# installadm update-manifest -n s11x86 -m orig_default -f manifest.xml

An AI manifest can specify configuration information for creating zones using the following XML syntax to specify a zone configuration file:

<configuration type="zone" name="zone1" 
source="http://xyz/zone1/config.txt" />

Alternatively, a local file can be specified this way:

<configuration type="zone" name="zone1"
source="file:///net/server/zone2/config.txt" />

How to Create Manifests

The create-manifest subcommand allows you to specify criteria (for example, architecture, memory size, MAC address, and so on) that determine which manifest or script should be selected for an installation client. Manifests can include information such as a target device, partition information, a software package list, and other parameters.

The following create-manifest example adds the manifest /export/mf.xml to the service svc1. The service svc1 will then be used to install clients that match the criterion of a MAC address equaling aa:bb:cc:dd:ee:ff.

# installadm create-manifest -f /export/mf.xml -n svc1 \
-c MAC="aa:bb:cc:dd:ee:ff"

The following example creates a manifest called s11 that will be applied for installing zone1 or zone2:

# installadm create-manifest -n s11 -f /tmp/zmanifest.xml  \
-c zonename="zone1 zone2"

How to Create System Configuration Profiles

The installadm list -p option displays system configuration profiles that are available on the install server:

# installadm list -p
Service Name Profile
------------ -------
sparc2       myprofile.xml              
svc0817      profile3
svc0819      profile4.xml              

The create-profile subcommand defines system configuration profiles. The following example constructs a profile called s11 that will be applied during the installation of zone1.

# installadm create-profile -n s11 -f /tmp/zprofile1.xml  \
-c zonename="zone1"

You can interactively create a system configuration profile and save it for subsequent installations:

# sysconfig create-profile -o sc-profile.xml

Use the following command to validate a system configuration profile against the default x86 installation service. Validation is an especially good idea if you have modified a system configuration profile.

# installadm validate -n default-i386 -P profile.xml

How to Troubleshoot the Installation

If the client can successfully boot and download installation files, you'll see a message like this:

Automated Installation started
The progress of the Automated Installation will be output to the console 
Detailed logging is in the logfile at /system/volatile/install_log 
Press RETURN to get a login prompt at any time.

To monitor progress, log in to the client as root with the password solaris, bearing in mind that there might be a delay in log updates once IPS package installation begins.

If a client installation fails, there are a number of log files to inspect. First, check the client's installation log file, /system/volatile/install_log, for messages. The AI manifest used for the client is in /system/volatile/ai.xml (or manifest.xml, in the case of a derived manifest script).

System configuration profiles are in /system/volatile/profile/*. Additional log files are tracked on the AI server in the /var/ai/image-server/logs directory.

Debugging flags can also be activated on client systems. For SPARC clients, use the Open Boot Prom (OBP) install_debug boot argument:

ok> boot net:dhcp - install install_debug

On x86 client systems that use GRUB, add install_debug=enable to the kernel line boot entry.

Refer to the following man pages: installadm(1M), ai_manifest(4), aimanifest(1M), and sysconfig(1M).

How to Migrate from JumpStart

Oracle provides the js2ai utility to help convert Oracle Solaris 10 JumpStart rules, profile, and sysidcfg files to a format compatible with Oracle Solaris 11 Automated Installer. The utility makes a best effort to translate JumpStart keywords, producing XML syntax for AI manifest and system configuration profiles that you can further customize. The tool attempts to map the following:

  • JumpStart rules to AI criteria
  • JumpStart profiles to AI manifests
  • sysidcfg files to system configuration profiles

The following command converts an entire JumpStart directory under /export/jumpstart, translating the sysidcfg file into a system configuration profile and generating AI manifests for the rules and each associated profile:

# js2ai -r -d /export/jumpstart

See the Transitioning From Oracle Solaris 10 JumpStart to Oracle Solaris 11 Automated Installer manual and the js2ai(1M) man page.

How to Create a Boot Environment

A boot environment (BE) is an individual bootable instance of the Oracle Solaris 11 operating system. It's always a good practice to create a BE before updating a system.  If anything goes wrong with the update, you can roll back to the prior BE.  Here is an example of creating a BE named solaris-05032012:

# beadm create solaris-05032012

If necessary, it can be activated as the active BE at the next reboot:

# beadm activate solaris-05032012

See Also

Here are some additional resources:

About the Author

Ginny Henningsen has worked for the last 15 years as a freelance writer developing technical collateral and documentation for high-tech companies. Prior to that, Ginny worked for Sun Microsystems, Inc. as a Systems Engineer in King of Prussia, PA and Milwaukee, WI. Ginny has a BA from Carnegie-Mellon University and a MSCS from Villanova University.

Revision 1.0, 06/15/2012

See sysadmin-related content for all Oracle technologies by following OTN Systems on Facebook and Twitter.