Just over 7 minutes to install a text-oriented, headless server OpenSolaris system from scratch?


This is the next installment in my effort to establish anefficient development and test environment for experimental OpenSolarisbase installation profiles. In this entry I address how to hook aheavily reduced form of the OpenSolaris development package repositoryinto an Automated Installer environment to produce text-oriented, headless server installs of OpenSolaris. Using a local copy of the package repository significantly reduces the time to perform an initial installation. Using a reduced form of the repository means that less time is spent setting up the environment because only those packages that are necessary are copied from the development repository.


Prior topics in this series:

Recap of the Automated Install Environment

See the prior topics above for details. Essentially, I have an AI install server running in a headless server, JeOS-based OpenSolaris installation within a VirtualBox VM. A heavily reduced subset of the OpenSolaris development package repository was established in the installer server to greatly speed up the initial installation process. A custom AI manifest represents an experimental base install profile for OpenSolaris by specifying only those features needed to establish a text-oriented, network-capable and bootable system. Packaging tools are included in the base installation such that further packages can be installed on an as-needed basis. Empty VirtualBox VM images are created and network booted to install the base profile from the install server.


Modifications to Use the Local Repository

It's pretty simple. First, the reference to the package repository in the custom AI manifest needs to be updated to point to the repository running on the install server rather than to http://pkg.opensolaris.org/dev. Second, after an installation completes, the newly installed client needs to be updated to use the http://pkg.opensolaris.org/dev repository such that ongoing add-ons and updates occur against the fully populated repository. Otherwise, all of the steps described in the Initial Experiments with Base Installation Profile still apply.

Update Custom AI Manifest

On the install server, I modified the AI manifest by replacing the current repository URL:





With the URL of the local repository. For example:




Where 192.168.3.50 is the private address of my install server.

Once the custom AI manifest was modified, I updated the copy used by AI:



$ pfexec /usr/sbin/installadm add -m osol-base-ai-manifest-dev.xml -n 1002-125-x86 Set Up an Install Client VM and Boot It

As described in the earlier posts mentioned above, I set up a new install client and booted it. On the install client, I monitored /tmp/install_log to ensure that the install client is using the repository specified above rather than the remote repository.

In my environment on a MacBook Pro 2.5 GHz with 4 GB RAM using VirtualBox 3.0.8, it took 2 minutes to load the install application over the network and start it and 5 minutes to perform the actual installation.


Reset the Publisher's Origin URL

As part of the post installation steps prior to rebooting the newly installed client, I reset the repository URL.

First, I remounted the newly created boot environment:



# beadm mount opensolaris /a

Next, I reset the origin URL of the image located under /a:


# pkg -R /a set-publisher -O http://pkg.opensolaris.org/dev opensolaris.org

Finally, I rebooted the install client, logged in and made sure that basic operations worked as expected. For example, the following command listed all packages available in the http://pkg.opensolaris.org/dev repository, 1,949 packages, and just 99 packages currently installed:


$ pkg list -aH | wc

1949 7796 152036

$ pkg list -H | wc

99 396 7722

Next Steps

Since the ultimate goal of this series of experiments is to establish a metapackage representing the experimental base installation profile, the next step is to develop the manifest for the metapackage and publish it to the local repository. Then the custom AI manifest can be greatly simplified by replacing most of the references to packages with a single reference to the base installation profile metapackage. Only driver-oriented packages required for VirtualBox will be left in the custom AI manifest.




More...