Instead of using interactive LiveCD or LiveUSB installers, it is possible to streamline and standardize your OpenIndiana installations using the Automated Installer media (CD/USB images). It is just another product made by the Distribution Constructor, and related technology is also available in Solaris 11.
This page details how the AI media can be created (optionally) and used to set up an installation server to automatically install OpenIndiana onto your networked computers with PXE boot capability with tools available on almost any platform (so that this described install server does not have to be running on Solaris-related OS).
Information on this page draws heavily on blog posts by Joshua M. Clulow and those of some brave people walking in his steps (Jason Matthews and "Rich" "rincebrain"):
Other documentation about Automated Installer is available on the internet, including these resources about older OpenSolaris and rival Solaris 11 (Express):
- http://docs.oracle.com/cd/E19963-01/html/820-6566 – Oracle Solaris 11 Express AI Guide (the post-OpenSolaris OSes ways had already diverged by then, but differences in this procedure should be minimal)
- http://notallmicrosoft.blogspot.com/2010/01/step-by-step-guide-to-install.html – Step-by-Step guide to Install OpenSolaris with Automated Installer (2009.06)
- http://notallmicrosoft.blogspot.com/2012/02/solaris-11-automated-installer-quick.html – Solaris 11 Automated Installer quick setup guide in a zone
This page is a work in progress, currently transferring content from blogs and revising the two-year-old info.
I (Jim Klimov) am not the author of the texts below, but I revised and commented some sentences as compared to original blog posts.
Original post by Joshua Clulow (17 October, 2010; oi_147, + new OI 151a3 updates)
OpenIndiana Automated Install Server
This is a draft set of steps for getting an automated install server configured on almost any platform using only Apache, DHCP and TFTP. It's very rough at this point but it functions well enough to PXE boot and install a copy of OpenIndiana (OI).
NOTE: The steps bellow assume all work is done in
rpool; change accordingly if you have other, perhaps larger, pools.
First up, you should make a directory
/export/install and get some scripts and configuration files:
If you don't have
git, you can grab a tarball of the repository at github's web interface.
If an OI bootable Automated Install (AI) ISO is not available, you can use the distro constructor to create your own. (NOTE: these are provided experimentally with oi_151a and in main download source with oi_151a3)
I've made a few modifications to the AI ISO build descriptor that comes with OpenIndiana. You should grab the
distro_const/ai_x86_image_JMC.xml file from the github repository and (on an OI host) run:
After a while you'll get a usable ISO in
/rpool/dc/media that you can use to set up the rest of your environment.
You should extract the contents of the ISO (either of your own construction or downloaded from some other source) into
/export/install/ai_image. Assuming your TFTP server is rooted in
/tftpboot, you'll want to:
You'll also want a local IPS repository containing the current OI packages. Fetch this 2GB tarball (for OI 151a3): oi_151a_prestable2_repo.tar.bz2. Extract it into
You can use
rsync to bring the repo seed files you got from the tarball up to date, thus:
TODO: Rewrite for (optional) use of pkg.depotd SMF service?
In order to simulate parts of the automated install server that ships with OI, I'm using a few CGI shell scripts. There are two
ksh scripts and a list of packages to be installed (
cgi-bin/PACKAGES_LIST) in the git repository which you can customize to your liking. I've also prepared some responses to the
/publisher/ methods of a real IPS repository server. As these responses are essentially static I'm just using regular text files.
Configure Apache (I used version 2.2 from
pkgsrc) on your system. You'll need two virtual hosts, each listening on a different port (e.g.
10000). These vhosts will map the various service URLs onto local repository content and the CGI scripts. They should be configured as per the sample in the git repo:
Make sure you set the correct URL to the IPS repository vhost in environment variable
cgi-bin/ai-manifest.ksh. This tells the AI client to use your new local repository instead of the one on the Internet. Unlike the public URL, yours will not end in
/dev if you've used the exact vhost configuration I've provided. Note that the additional
/legacy repository is, by all accounts, incredibly large and you don't really need many packages from it so I'm just using the public remote copy.
You should also create a GRUB
menu.lst from the example in the git repository using the IP address and port numbers of your Apache vhosts and put it in
Finally, configure DHCP (I use ISC
dhcpd) to answer your host's PXE requests. If you're also using ISC
dhcpd then something like this snippet should suffice (use your host name, MAC and IP addresses instead of those in the example):
With all this together you should be able to PXE boot a host with OI 151a3! Feedback and corrections welcome.
NB: Credit where it's due, I started with this page on the OpenIndiana Wiki.
Follow-up post by "rincebrain" (August 26, 2011; oi_148)
Using AI to do an unaided install on OpenIndiana b148
If you have any questions, comments, concerns, corrections, etc, feel free to email me. I'd love to know what I did horribly wrong. :)
So, I was looking into how to automatically install OpenIndiana on systems in a manner similar to the Kickstart mechanism for RHEL-alikes or Jumpstart for Solaris proper.
I received instructions that I should not go down this road unless I enjoyed pain and suffering.
I got it working anyway, so here's how so you can too (without having OpenIndiana or any Solaris system already running).
I started out with the instructions by Joshua found here. His instructions were very helpful, but ultimately, they were incomplete – whether this is because of differences in version or something else, I do not know.
Start out as his instructions do – make an
/export/install (or your favorite path; I'll refer to it as
$INSTALL_BASE from here on), and get the scripts:
(I forked his repository. At present, my changes are mostly cosmetic, though I changed the root password in the generated
ai_instance to be "
jack" as well. Feel free to pull his original repo instead; things may just require more tweaking.)
You're going to need:
- an Apache-like webserver (you need CGI support for the scripts in the above, and you'll ideally be using it to serve a local mirror of the OpenIndiana repo as well);
- A working DHCP setup with PXE capability, which includes...
- ...The ability to serve a couple of files over TFTP (I'm going to refer to the base of your TFTP path as
$TFTP_BASE– for me, that's
- About 4 GB for an OI local package repo, according to my current copy;
- An OpenIndiana Automated Installer CD (in Joshua's guide above, he explains how to make one; since then, OI has started providing prebuilt ones, so I used the b148 CD available here);
- The CGI scripts in this example use
/bin/ksh– you can probably use another shell with them with not too much work, but I didn't need to.
First, loopback-mount the OI AI CD you grabbed above somewhere – I'll use
$INSTALL_BASE/ai_image, like the guide I'm basing this on did, and copy the required boot files off into a convenient place to serve them (I used
As I said, you'd also probably like a local OI package repo – it'll save you a fair amount of time on install.
I'm making one at
$INSTALL_BASE/repo – again, feel free to change it and change instructions appropriately. :)
Configure Apache with vhost directives appropriately to serve this up – the example would be here, and that'll work if you've used all of the paths mentioned in this example.
Feel free to find and replace
/export/install with whatever you used for
$INSTALL_BASE instead, but be sure to do it consistently here and in PXEgrub (later).
Now the most customization you'll probably want to do – the Automated Installer manifest file.
Joshua has nicely provided a CGI script which serves up the manifest to our target machine. My modifications do a few things – they add
git to the default installed package list (NBD), make it
diff more cleanly against the stock example (which was helpful to me for debugging), and most importantly, in my opinion, makes it partition and install to the root disk:
As a warning: it forcibly nukes the partitions on the existing disk that it detects as the "boot disk" (caveat: some BIOSes lie, and you'll need to provide more explicit criteria – warning, the syntax on things that aren't just disk specification have changed, so that post's fuller examples won't work for you), and creates a single full-disk slice as root, which AI then defaults to using as the root for
rpool. You might want some other setup on your systems.
Configure your DHCP daemon like so (this is for ISC
dhcpd; if you use something else and have the correct syntax, share it, by all means):
And now all you need to do is boot the PXE-enabled target host, and wait!
Errata and oddities
- On the system I did this on (a Dell R815), the BMC would drop and entirely stop responding on the network once the OI kernel started.
Someone suggested this was fastreboot's fault, but this happens on a cold boot of the network install too, not just fastreboot.
- I did not figure out how to make it such that it would automagically reconfigure to NOT network install on reboot, so either manually force a PXEboot on the machine and have your root disk higher in boot order (ugh!) or edit the file it gets on PXE to produce a "boot to first hard drive" response (either PXEgrub with boot first hard drive chainloader, or just remove its PXE response entirely).
- If your webserver is not running correctly or your manifest is incorrect, and you have the console redirected using
console=, NO OTHER DISPLAYS WILL RECEIVE NOTIFICATION THAT IT FAILED - they will just print "
...................." and never progress to the "
OpenIndiana oi_148 ..." banner.
- My example configuration has
bootline, allowing you to remotely SSH in using
jack:jack– you probably want to disable this once you're sure the installation is working, or at least change the password. :)
Thanks to everyone in
#openindiana who put up with my uninformed questions and occasional ranting, and to Joshua Clulow for doing most of the hard work required. :)
Follow-up post by Jason Matthews (October 19, 2011; oi_151)
This post adds little new information except confirming that things still work as described for oi_151, and giving a screenshot of distro construction process.
Creating automated installer for OpenIndiana 151
Install the illumos Distribution Constructor package:
Get Joshua's XML manifest for AI:
Run the Distribution Constructor to create a disk image:
That's it, you have the ISO and USB image files.