Article Table 1 jul2007.tar

GNU/Solaris: A Look at OpenSolaris Distributions

Peter Arremann

Even before Sun released Solaris under an open source license back in April 2005 [1], many blogs and news sites carried stories promising different OpenSolaris distributions to compete with Linux. Slashdot users even posted comments predicting the demise of the Linux kernel. Now, about 2 years after the official announcement from Sun, much of the buzz is gone, and it is time to assess the results of Sun's open source move. In this article, I'll examine how these OpenSolaris distributions compare to Linux for the average user.

Kernels and Distributions

To understand the different OpenSolaris distributions, it is important to understand the difference between kernels and distributions. Simply put, the kernel is the core of an operating system. It provides services like virtual memory management, access to hardware resources, and message passing between applications. These kernel resources are exposed to applications using several different APIs.

The main APIs of the kernel are very similar in all Unix-like operating systems for two main reasons. First, all Unix flavors share the same base in the original AT&T UNIX [2] code and, even with all the changes that have been made over the years, the basic APIs have stayed mostly unmodified. Second, several efforts, like POSIX and UNIX95, have worked to standardize newer APIs during the past two decades. In most cases, this makes it possible to change the kernel without major changes to the application. Linux, Solaris, HP-UX, and many other Unix and Unix-like operating systems can run the same applications after recompiling. Usually recompiling requires little or no changes to the original source code.

Advantages of an OpenSolaris Kernel

With the large number of well-known and well-supported Linux distributions available, using any kernel other than Linux may sound like a strange idea. However, the existence of the different BSD flavors proves that there is a place for alternatives that have unique features. The OpenSolaris kernel offers some capabilities that Linux does not (yet) have, and many other features are different enough from Linux to pique interest.

Containers are one of the biggest selling points for OpenSolaris. First introduced in Solaris 10, they allow the user to run several seemingly independent instances of the operating system on one server. Containers have lower overhead than their Linux counterparts (Xen, UML, and others) [3] and have the ability to share file systems easily.

ZFS, the Zetabyte File System, is a new file system that combines features of a traditional file system with those of a volume manager to provide high performance and very easy disk management. It handles RAID setups in software, provides on-the-fly data compression, and uses checksums for all data. All this is done while usually outperforming the old UFS file system on identical hardware.

DTrace is a dynamic tracing mechanism that provides administrators and developers with insight into what the operating system and applications are doing without their having to recompile with debug flags or to crash the application (or operating system) for core dump analysis. DTrace was designed for zero overhead when not in use and is considered safe enough for use on production systems.

Another major feature of the OpenSolaris kernel is the Fair Share Scheduler (FSS). It is designed to guarantee an application a minimum of CPU resources even on busy systems. The allocation is done through CPU shares and allows for greater flexibility. This is especially useful to ensure that programs inside one container do not hog CPU resources needed by other containers. Besides the features mentioned above, OpenSolaris offers several other new and advanced capabilities. A complete list is available on the OpenSolaris Web site [4].

Disadvantages of an OpenSolaris Kernel

Using the OpenSolaris kernel as the basis for your distribution also has disadvantages. The main issue -- something most OpenSolaris users find on their first installation attempts -- is the lack of drivers. While most server hardware works well, many desktop peripherals that are plug-and-play in Linux and other operating systems will not work with OpenSolaris. Graphics cards, 1394 Firewire, and USB devices are often unsupported. Many other components work only partially or perform more slowly than on Linux. On a positive note, most generic interfaces, like IDE and most Ethernet chips, work out of the box.

The second major issue is the number of users of OpenSolaris-based distributions. Because of the smaller user base, it is often more difficult to get support, and changes usually take place at a slower rate when compared to mainstream Linux distributions like Ubuntu. For experienced users and administrators, this is only a minor issue; but for people new to Solaris, this can pose a major issue for adoption.

OpenSolaris Licensing

All OpenSolaris source code is currently licensed under the Sun-developed Common Development and Distribution License [5]. The CDDL is based on the Mozilla Public License (MPL) and is an OSI-approved open source license. Like the GPL, the CDDL requires changes to the source to be released but it is more closed-source friendly. It allows for mixing code of different licenses in one project, explicitly handles patents ("patent peace"), and addresses other problems often encountered in commercial code bases.

Recently there have been rumors about adding the GPL Version 3 [6] as a second license option, but no decision has been made yet. Sun is hoping for more community participation and better interaction with open source projects by adopting the GPL.

The Candidates

The choice of OpenSolaris distributions currently consists of five flavors: The "official" OpenSolaris distribution from Sun known as Solaris Express [7], BeleniX [8], SchilliX [9], marTux [10], and Nexenta [11] (sometimes also called GNU/Solaris). These are complete distributions and don't require any other OS to be installed (see Table 1).

In addition to these full distributions, the Gentoo Alba Experiment [12] offers a sixth choice. The Alba Experiment is not a complete distribution but a port system that allows installation of open source software on an existing Solaris system to make the system more user friendly.

Another possible way to run Linux software on Solaris is using Sun's BrandZ [13]. It uses so-called "Branded Zones" to run unmodified Linux x86 binaries. This is done by emulating system calls and other OS infrastructure like the /proc file system. BrandZ is not included in this article because it is does not alter the native OpenSolaris setup but instead provides another virtual OS to run additional software not available for Solaris.

Test Hardware

BeleniX, SchilliX, and Nexenta are currently only available for x86-based hardware. Solaris Express and marTux also support Sparc systems. Support for additional platforms like PowerPC has been discussed in the past, but nothing has been completed yet.

To ensure a fair comparison, an x86 system was used to test the different distributions. To avoid driver issues all installations were performed inside VMWare Workstation 5.5.3. Not a single incompatibility or crash was encountered during the test. The host system used in this article was a Dual Opteron 265 with 8 GB RAM. Each guest OS was presented with 1 CPU, 2 GB RAM, and a 16-GB virtual disk. Only one guest OS was run at any point in time.

Solaris Express

Solaris Express is the OpenSolaris distribution created by Sun Microsystems. Solaris Express is not released under an open source license. Even with the large number of open source packages included in the default installation, the installer does not mention the CDDL or GPL directly but instead refers generically to some software licensed under various "open source licenses". Aside from being an OpenSolaris distribution, Solaris Express is also the preview release of the next version of the commercial Sun Solaris product.

Solaris Express is available as a free download, called "Solaris Express, Community Edition", for non-commercial use and as a $99 subscription that permits commercial use. The commercial version comes with online support and the ability to submit bug reports. The free version is updated more frequently but does not have any official support and bug reports are read only.

At the beginning of the installation on Intel-compatible hardware (this article is based on Build 56), the user is greeted with the Grub boot loader that Sun has been using since Solaris 10. The boot loader provides four choices. The first, "Solaris Express, Developer Edition", starts a simplified installer, while the second option, "Solaris Express", asks the full set of questions. The simplified installer assumes many settings, like DHCP for networking, and has a predefined package selection. Although this is a step in the right direction, selecting install options as part of the boot loader can be confusing to many novice users. This review is based on the second install option.

After the boot loader screen has disappeared, the similarities between Solaris Express and a Linux installation end. Sun has decided to stick with the same installer that Solaris has been using for many years. While this is great for experienced administrators, the installer is the reason for much of the criticism Solaris Express receives. Linux users accustomed to modern graphical installation methods will be disappointed by the basic text interface that provides very little output for the user during system initializes. Our test system took almost five minutes from power on until the graphical interface came up. This is much longer than any other OpenSolaris installer and can easily cause an impatient user to press the reset button.

The first screen of the graphical installer is a simple terminal emulator. A command-line program prompts the user to confirm that the graphical interface is properly configured. Then the program asks for the language to be used during the installation. After these questions are answered, the real installation program starts. It asks the usual questions about networking, time zones, and software installations but, compared to current Linux installers, it leaves a questionable impression because of several inconsistencies. For example, even if the user selects DHCP to configure the network interface, enabling DNS as name service requires the user to enter a static IP address for at least one DNS server. This is different from any other operating system and makes little sense since the information obtained from the DHCP server already includes DNS configuration settings.

Package selection is another area in which the Solaris installer is more difficult than it should be. Most Linux distributions offer a near endless list of packages grouped into categories like Web server and database server. Each category has a description and contains required and optional packages. The user simply selects the categories to enable large chunks of functionality on the system. Besides this well-organized list of packages, pre-defined profiles based on intended system usage make it easy even for beginners to install a useful system.

Solaris Express offers six installation profiles. Unfortunately, these profiles are hard to understand and will not make sense to most end users. It takes experience to know the difference between "Entire Solaris Software Group" and "Entire Solaris Software Group Plus OEM Support", especially since the installation sizes that the installer reports are identical. Besides being cryptic, these categories are not comparable to the typical selections of "Server" or "Development Workstation" that most Linux installers offer.

After the profile has been selected, it is possible to customize the package selection. Unfortunately, the installer does not include a lengthy description of each package, and many packages are split by file system location (root and usr) rather than functionality (runtime and development). For example, the transport layer encryption package OpenSSL, which is used by many programs, like OpenSSH, for encryption, spans several packages, one of which is described as "SUNWopensslr -- OpenSSL (root)" without any further explanation. This is virtually useless and does not provide any detail on contents or use of the package. Another annoyance of the package selection mechanism is that, while the installer can determine that some dependencies are not satisfied, it offers no way to automatically resolve them.

Once the package selection is complete, the installer formats the drives and begins to install the selected software packages. This process took 144 minutes during my test, which is excruciatingly slow -- even if you take into account the large installation size (around 4 GB). Luckily, most users rarely reload the operating system, and larger deployments can use JumpStart with flash archives to reduce the installation time to just over 36 minutes on the same hardware.

Outdated open source software used to be one of the biggest issues for Linux users on a Solaris system. Happily, Solaris Express b56 includes updates to many software packages and now contains mostly current releases. Firefox version 2.0 is installed, and the graphical environment JDS (Java Desktop System) is based on Gnome 2.16. StarOffice 8 is also included and is equivalent to OpenOffice 2.

Unfortunately, this update does not (yet) include new versions of many command-line utilities. Bash is still on version 3.00 instead of the current 3.2 release, and Perl is several bug fixes behind with version 5.8.4. The worst example, however, is MySQL. The package contains version 4.0.24 -- a release that is hopelessly outdated and has been out of support since September 2006. I hope Sun will do significant work in this area before the release of Solaris 11.

Besides including outdated command-line open source software, Sun gives preference to traditional Solaris tools over their usually more capable open source counterparts. While this preserves backward compatibility, it gives the command-line environment a very antiquated feel. As an example, Solaris Express users will not be able to enjoy easy on-the-fly gzip/bzip2 compression when running tar with the -z and -j options, even if both programs are included in the installation.

Another downside of Solaris used to be the lack of graphical utilities for systems administration. Just six months ago, this would have been the weakest point for Solaris Express, but the more recent builds contain huge improvements in this area. Most common tasks, such as adding users, changing network settings, and sharing folders, are now as easy as they are with Linux. Other tasks, like installing new software and disk management, do not have graphical tools yet, but Sun is definitely moving in the right direction.

Since Solaris 10, Sun also includes a graphical utility for updating software. This utility requires a registration and also asks for a service contract number. Without a service contract, the user is limited to security updates only and does not have full access to download all released updates. This sets Sun's offering apart from the other distributions and will likely put off many Linux users looking for an open source distribution.

SchilliX

SchilliX was the first OpenSolaris distribution. It was created by Jörg Schilling, who is probably best known for his excellent work on cdrecord. Version 0.1 became available just one week after the source code of OpenSolaris was released by Sun. This first release lacked most features considered standard in modern operating systems (e.g., graphics support), but it was bootable and a great proof of concept. Happily, much has changed since this first release.

The current version 0.5.2 (the project Web page still lists 0.5.1 as the most recent release) is a LiveCD distribution with optional hard-drive installation. This means that the system is ready to be used as soon as the system has booted from the 700-MB CD image. However, it also implies that any changes made to the system will vanish after a reboot. This is a great option for people who want to try out OpenSolaris, but it does not lend itself to development or any extended use.

The hard-disk installation is completely manual. The 15 required steps are well documented in the README.install file and are easily understandable to experienced Solaris admins. Users without Solaris experience, however, will either have to follow the examples verbatim and hope everything works or spend some time learning the difference between Solaris and Linux. It is a great learning experience but can be very frustrating.

After the system has booted, the user is greeted with a console login prompt. The only user pre-configured on the system is the root account without password. Once logged in, the user can start the X server with startx and will then be presented with a very simple twm setup. This setup allows basic work but, since no major applications like Firefox or OpenOffice are included, demanding users will be disappointed. Other OpenSource software, like bash, is at the same outdated 3.00.16 release that Solaris Express contains.

Along with the very minimal appearance of SchilliX comes a fairly slow release schedule and an almost complete lack of posts in both the forum and the mailing list. To make up for the lack of documentation, Schilling has co-authored a book on OpenSolaris called OpenSolaris für Anwender, Administratoren und Rechenzentren (OpenSolaris for users, administrators and data centers; ISBN 3540292365 -- currently available only in German). This book contains in-depth information on OpenSolaris (and Solaris 10) and easily rivals any documentation found on the Web sites of the other OpenSolaris distributions.

marTux

MarTux is an OpenSolaris LiveDVD distribution with a minimalist approach. The project Web page consists of a Web server-generated index with links to the DVD images and a few text files. The longest text file -- almost 200 lines -- describes the features of marTux and includes instructions for network and X configuration. The file begins with "Welcome to a real OpenSolaris based open UNIX distro. This is not linUX. This is real UNIX. Join in!"

As the readme suggests, the distribution definitely feels like going back to the roots of Unix. Instead of seeing a graphical user interface, the user is greeted by a console prompt. After logging in, the user must accept a Java license agreement. At this time, it is best to configure a network interface by hand using ifconfig or the /bin/net-up script. This is necessary because the marTux DVD does not contain some important libraries -- including the Sun Studio C++ runtime. Without these libraries, most sophisticated applications are not usable and will refuse to start because of unresolved symbols.

After the missing libraries are installed, X can be started using the xauto command for automatic configuration or xnoauto if a manual configuration is required. The automatic configuration did not work inside VMware, and a manual configuration was required.

Once X is running, marTux makes as inconsistent an impression as Solaris Express. Some of the included software, like PHP 5.1.6, was the latest release at the time marTux 0.2 was created, while other software, like Firefox 1.0.6, was more than a year behind.

The hard-drive installation in marTux is completely manual. The user needs to partition the drive, create file systems, install boot blocks, and then copy the contents of the DVD to the hard drive. This is cumbersome but works well enough. After a hard-drive installation, the C++ libraries must be reinstalled to create a functional environment.

Despite the early stage of development, marTux also has some promising features. It includes some patches named "Ultra1-revival" that allow marTux to run on any UltraSPARC 1 system as long as 256 MB of memory are installed. No other OpenSolaris version currently supports this old CPU type. MarTux is also the only Live image for SPARC currently available.

BeleniX

BeleniX is the result of the work of five Indian software developers. It is another LiveCD distribution, with all the advantages and disadvantages that come with that. In addition to the LiveCD, BeleniX offers a USB installation for thumb drives with more than 1 GB and a customization toolkit. As of the writing of this article, the current BeleniX release is 0.5.1, which was released November 15, 2006, and was based on OpenSolaris build 52. Version 0.5.1 was also re-released on February 2, 2007 as a DVD version. It is still based on the same kernel but includes additional applications.

Booting BeleniX is very simple. The user is prompted for keyboard settings and then asked whether XCFE or KDE should be started. Then, without asking the user to log in, the graphical user interface starts, and a very well pre-configured environment is presented to the user. The pre-installed software is very modern and includes Firefox 2, Koffice 1.6, and the Gimp 2.2.10. OpenOffice 2.1 and Java SE 6 are only included in the DVD release.

Under the hood, Belinix uses most OpenSolaris features, including the service management framework SMF and the container capabilities. Other than the administration utilities integrated in the KDE Control Center, no graphical configuration tools have been included, requiring the user to edit configurations files by hand. I hope the next release of BeleniX will include the improvements Sun recently made in Build 56.

The original OpenSolaris utilities have not been replaced by their OpenSource counterparts. This results in the same outdated feel that the command-line Solaris Express has. Aside from these two disadvantages, BeleniX comes close to its goal of an open-source-friendly, OpenSolaris distribution that unites the best from the Solaris and Linux ecosystems.

Nexenta

Nexenta, sometimes also called GNU/Solaris, comes closest to the idea of a Linux distribution based on the Solaris kernel. It is available in LiveCD and installer CD variants. The current version is alpha 6, based on OpenSolaris Build 50, and it comes as one 700-MB CD ISO image.

Nexenta uses Ubuntu's installer, packaging, and distribution method. With a few exceptions (like disk partitioning) the installer looks identical to Ubuntu Edgy Eft. When accepting the defaults, Nexenta creates a small UFS root partition and uses ZFS for the remaining disk space. This setup nicely displays the capabilities and flexibility of ZFS because the user is not required to allocate disk space during the installation but can defer that task until the system is running and all software has been installed and configured.

It took about 75 minutes for the installation to complete on our test hardware. After the reboot and a few more questions about the network configuration, the user is presented with the very modern look and feel of Gnome 2.14. All important desktop programs, like OpenOffice and the Gimp, are available. Everything works just like a regular Ubuntu installation, and the Nexenta installer is the easiest installer in this review.

Even the command line makes a very modern impression. Without the need to keep backward compatibility, the standard OpenSolaris command-line utilities have been replaced with their open source counterparts. Only the differences in file system layout and missing files in /proc and /sys make it obvious that this not your average Linux box.

If an application is not available on the distribution CD, Nexenta can install software from any apt repository. The Nexenta repository currently contains more than twelve thousand packages and includes virtually all software that is available for Ubuntu Linux. Only some administration utilities and all kernel-intrusive software are currently missing.

The Alba Experiment

Unlike the other five choices, the Alba Experiment is not an installable distribution and relies on having Solaris 10 or a recent Solaris Express build installed. The Gentoo package management system portage is then used to install the open source software. Many of the programs installed this way will override the default Solaris utilities, giving the user an almost complete Linux look and feel on the command line as well as in X.

The most important step for a successful Alba installation is to make sure that enough disk space is available. A default Solaris Express installation creates a minimally sized root partition and uses the remaining disk space for home directories (/export/home). This does not leave enough disk space for the portage tree and all required software. Compilation of large packages, such as OpenOffice, takes a lot of disk space. The easiest solution is to simply add several gigabytes to the root partition. Our tests showed that 6 GB should be sufficient. If you want a more complex setup (i.e., to use multiple drives), create a separate /usr/ partition with at least 2 GB free and /opt with a minimum of 1 GB available disk space.

Another obstacle is that a lot of Sun-packaged open source software is included in all but the most stripped-down installation profiles. These packages later interfere with the installation of the Gentoo stage1.5 package. The easiest way to solve this is to select the core image profile and only add wget to the predefined package list. This should create an operating system image that allows installation of the Gentoo package without conflicts. If pkgadd of the stage1.5 package still shows conflicts on your installation, it will only show file names but not which package owns this file. To determine the package that needs to be removed, check the file /var/sadm/install/contents.

Other than the dependencies mentioned, the installation is fairly easy if you are familiar with the Gentoo portage system. The instructions on the Gentoo wiki page are very helpful and straightforward. The only piece of information missing in the documentation is that the portage tree must be extracted with gnu tar (Solaris tar will create @LongLink files). Gnu tar, just like the subversion client, can be downloaded from the sunfreeware [14] Web site.

Conclusion

While none of the solutions are ready for production use, the OpenSolaris distributions show how competitive a Solaris-based environment can be. Nexenta comes especially close to its goal of replacing the Linux kernel without losing the functionality that most users expect. A great installer, plenty of available packages, and the use of ZFS are just some of the advantages. Overall, Nexenta is not only the most integrated and polished solution, but it also uses some of the unique Solaris features better than Sun's own product. If you are looking to switch to an OpenSolaris distribution today, Nexenta is your best choice.

BeleniX comes in as a close second for usability, but the lack of a modern installer currently limits its use. The customization toolkit and USB installation, however, open up some very interesting possibilities.

The biggest surprise in this review was Solaris Express itself. While the installer shows its age and can't compare to Nexenta, the recent updates fix many of the issues that kept Linux users from switching in the past. Users that only use the GUI will be very pleased, and I hope by the time Solaris 11 is released that the remaining software will be updated as well.

References

1. OpenSolaris Press Kit -- http://www.sun.com/aboutsun/media/presskits/osbc/index.html

2. Unix Development History -- http://www.levenez.com/unix/history.html

3. Solaris on Xen FAQ -- http://www.opensolaris.org/os/community/xen/solaris-on-xen-faq/

4. OpenSolaris Project -- http://www.opensolaris.org

5. OpenSolaris License -- http://www.opensolaris.org/os/licensing/opensolaris_license/

6. Shankland, Stephen. February, 2007. "Sun looks to GPL v3 for Java, Solaris" CNET News.com -- http://www.zdnet.com.au/news/software/soa/Sun_looks_to_GPL_v3_ \
for_Java_Solaris/0,130061733,339273561,00.htm

7. Solaris Express Program -- http://www.sun.com/software/solaris/solaris-express/

8. BeleniX -- http://www.genunix.org/distributions/belenix_site/

9. Schillix -- http://schillix.berlios.de/

10. MarTux -- http://www.martux.org/

11. Nexenta Operating System -- http://www.gnusolaris.org/gswiki

12. Alba Experiment -- http://gentoo-wiki.com/Alba_Experiment

13. OpenSolaris Community: BrandZ -- http://www.opensolaris.org/os/community/brandz/

14. Freeware for Solaris -- http://www.sunfreeware.com

Peter Arremann has been working with Unix and Open Source software for more than a decade. These days he works at Verizon on system administration, automation of software development processes, and the company's Open Source standards. He can be reached at: loony@loonybin.org.