|If anything on this page looks "too old" to you, check the "last edited" date above and be reassured that this page is still accurate and should still be followed exactly.|
SmartOS is self hosting. Make sure you are running the latest release of SmartOS to do your builds. If you're on a build from before the fake subset was killed – April 2013, there is a high likelihood the build will fail. Please update your platform.
SmartOS is built in a zone. Use the smartos multiarch 13.3.1 zone image (UUID 4aec529c-55f9-11e3-868e-a37707fcbe86)
Do not use any other zone image.
Import the zone image:
Your zone will need sufficient memory, space, space in tmpfs, and access to the ufs, pcfs, and tmpfs drivers. Below are some settings to make sure to include in your zone's json specification (make sure to set up a NIC as well... see How to create a zone ( OS virtualized machine ) in SmartOS for further details).
We recommend that you give your zone at least 2-4 Gb of DRAM and at least 25 Gb of disk space. These are lower bounds and you'll find that the build goes much faster if you are able to throw more memory to the zone. More memory allows more jobs to be run in parallel.
Use vmadm to create your zone, then you can use zlogin to log in.
You should generally be working on, and building, the software as an unprivileged user -- that is, a non-root user. Some of the steps of the configure script, and of the live image creation, require root privileges. The SmartOS build process will use pfexec(1) to obtain root privileges just for the commands that need them.
Configure your non-root user account to be able to escalate privileges to root with the usermod(1M) tool:
SmartOS requires the illumos kernel source tree and a couple more repositories (kvm, ...) as well as various compilation tools to build. The following steps download the various source trees and binaries required for the build:
The configure script requires root privileges for a limited subset of its operation. Earlier, this document describes using usermod to grant those privileges to your build user account.
If any git clone operation launched by configure hangs, it can be interrupted with Ctrl-C and configure can be restarted (it will pick up at the last unfinished step). After configure finishes successfully, the build zone is ready for the build. One can make a snapshot of the build zone at this point and rollback later if the build fails for any reason.
|Building on an "underpowered" system|
If your system doesn't actually have a lot of RAM or CPU, the build will automatically throttle down the number of concurrent jobs which are run. If you'd like to manually control it, for example, you know that you can run more, than you should set the following environment variable to the maximum number of jobs you'd be willing to run:
You are now ready to build.
Good luck! Build times for SmartOS on various hardware configurations should be similar to the build times for the illumos kernel itself which can be found in the illumos wiki, plus of course the time required to build the SmartOS-specific parts.
The default output of the SmartOS build is a platform file which is suitable for PXE booting. However, a bootable CD-ROM ISO image or a bootable USB key can also be generated. To generate those run one of the following Makefile targets: