And Now, Something Completely Different

Solaris x86 is fast, scalable, and works on 64-bit processors.
If you’ve been reading this column over the past several months, you know that it’s surveyed a number of different Linux distributions in its ongoing quest to find open source desktop nirvana. The penguins we’ve seen include Fedora, SuSE, and any number of Debians.
This month, though, we’re going to get jiggy with everyone’s favorite new open source operating system… Solaris x86!
(I can just hear the publisher calling my voicemail now, saying in his best Mr. Spacely voice, “Unix? We don’t need no stinking Unix! This is LINUX Magazine!L-I-N-U-X! PERLOW, YOU’RE FIRED! ” But… But.… Mr Spacely, haven’t you heard?
Sun has started to release Solaris as open source, providing it for free to anyone who wants to use it for non-commercial purposes…)
That’s right people, Solaris is free. And just to clarify so that the GNUbies don’t get their panties in a bunch, that’s “free” with a lowercase “f,” as in free beer, not capital “F,” as in “Free” and released under a license compliant with the GNU Public License (GPL).
So why Solaris? Why should you bother with it? For starters, Solaris can run Linux ELF binaries natively via its JANUS technology. Solaris 10 is also a very high performance operating system, and because it’s based on the Unix System V kernel, its proven and rock solid. And while it pains me to say this, Solaris 10 is far more scalable than the Linux 2.6 kernel is now. Need a massive, high-avaliability Unix server with 72 UltraSPARC IV RISC processors and 288 GB of RAM? No problem (if you can afford a Sun Fire E25K, which costs$ 3.7 million with that very configuration.)
The Solaris 10 TCP/IP stack is also extremely fast, faster even than Linux’s — so it makes a really good network application server. Solaris 10 also has a very fast journaling file system, making it ideal for database use. And for those of you who work in research, finance, science, engineering, and mathematics, Solaris 10 can take full advantage of the 64-bit features of the AMD Opteron.
So, now that I’ve convinced you to give Solaris 10 x86 a spin, let’s go ahead and install it.

Downloading Solaris

Since Solaris x86 doesn’t support as much esoteric hardware as the Linux kernel does, and since Solaris’s driver support is nowhere near as comprehensive, begin by checking Sun’s Hardware Compatability List (HCL) to see if your system components are supported. The Solaris 9 HCL can be found at http://www.sun.com/bigadmin/hcl/data/sol/, and the Solaris 10 HCL can be found at http://www.sun.com/bigadmin/hcl/data/sx/. You may need to check both lists, as Solaris 10 pretty much supports everything listed for Solaris 9. (And by the time you read this, the two lists may have been consolidated into the Solaris 10 HCL.)
And while its list of supported devices isn’t nearly as extensive as Linux’s, Solaris 10 x86 is a major improvement over previous incarnations. Sun has invested an enormous amount of effort into this release. Chances are that if your personal computer or server is fairly standard, you shouldn’t have much of a problem. (Do keep in mind, however, that Solaris has been a server operating systemn for some time now. Your favorite Firewire coffee cup warmer probably isn’t supported, but all serious server-class hardware is.)
Once your hardware checks out, your next steps are to download the Solaris CD-ROM images and install the software on your system.
You can get the CD images from http://www.sun.com/software/solaris/solaris-express/get.jsp. If you don’t have an account with the Sun Download Center, register for an account before you try your download. (Accounts are free, too.)
There are four CD-ROM images distributed as zip files. If you’re downloading these from a Linux workstation, use unzip –d filename.zip to unpack them to full-size ISO files, and then burn them with your favorite CD burner program, like KDE’ s K3B.

Installing Solaris

Once you’ve burned the ISO images to CDs, pop the first Solaris x86 CD into your PC, restart, and boot from the CD. When the system boots again, you’ll get several installation choices.
If you’re a Solaris x86 newbie or, like me, are real rusty on Solaris and SunOS installation, pick the first choice, the Interactive Installer. The Interactive Installer boots with a GUI, auto-detects all of your hardware, and asks you to configure your network, timezone, geographic locale, and authentication medium. For the latter, if your computer is a dedicated box or if you aren’t authenticating against a dedicated NIS or Kerberos server, choose “None.”
The Interactive Installer then lets you to pick optional software components from a list, which is not much different from a typical Linux install with Red Hat or SuSE or even the latest Debian. If you’re new to Solaris, accept all of the defaults, add the Entire or Developer configuration, choose the default filesystem partitioning layout, and then let the installer rip. A full Solaris install is pretty hefty — over 3 GB — so if you are going to share Solaris with another operating system on the same drive, allocate at least 20 GB of unused free space on the drive just for playing around with it.
The filesystem layout of Solaris, shown in Table One, isn’t unlike your typical Linux distribution.
TABLE ONE: The filesystem layout of Solaris 10 is very similar to that of Linux
Directory Contents
/tmp Contains temporary files that are deleted at boot
/proc Contains information on all active processes
/swap Contains virtual memory space that improves performance by moving the unused segments of programs (or data) from memory to disk.
/opt Contains optional third-party software and applications
/export/home Contains users’ home directories
/var Contains system log files and spooling files
/usr Contains the commands and programs for (user space) system usage and administration
/ Contains the kernel and device drivers
Of course, as you delve into Solaris, you’re likely to discover some small differences. For example, on Linux, you use a type 83 swap partition. However, in Solaris, swap is not mounted per se, as you can see from the output of the swap command:
$ swap –l
swapfile dev swaplo blocks free
/dev/dsk/c1t0d0s1 30,65 8 1045808 1045808
On Solaris, it appears as a device entry.
Perhaps the most significant difference is how Solaris handles home directories. In Linux, the home directory tree is located at /home, and root’s home directory is /root. However, in Solaris, the home directory tree is located within /export/home, and root’ s home directory is /. The latter is bad, because left as-is, / fills with all sorts of shell and preference files.
If you want to make Solaris look more like Linux and avoid cruft in /, become root and create a symbolic link to /export/home named /home.
# cd /
# ln –s /export/home/ home
Next, create a top level directory called /root, and alter the /etc/passwd file to change root’ s home home directory from / to /root. Here’s what the edited line for root might look like:
Do not change root’ s default shell, which is /sbin/sh. Changing root’s shell can cause system-wide problems. (If you want to run bash as root, simply type bash after logging in.
After editing /etc/passwd, log out and log back in, and presto, the environment is set up just like Linux. Well, not quite. Solaris is pretty spartan by default, and if you didn’t install its quaint GNOME 2.x- based Java Desktop System, there probably isn’t much in the way of useful software on the box besides CDE (shown in Figure One), StarOffice 7, and Mozilla 1.x. But that’s easy enough to rectify.
FIGURE ONE: The Solaris CDE desktop

Blast Off with Blastwave

If you’re going to use Solaris as a desktop machine, you’ll likely want all of the luxuries you’re accustomed to in Linux, such as KDE, GNOME, Firefox, Evolution, GAIM, and more. But you can’t get that stuff from the Solaris CDs or from Sun. Instead, you’re forced to get them from third parties or built the code from scratch yourself.
Thankfully, a bunch of stalwart, dedicated developers at Blastwave (http://blastwave.org) make open source for Solaris as easy as typing just a few keystrokes. Blastwave has a huge repository of open source software that they’ve ported to Solaris, and they provide a network-aware script called pkg-get that downloads and installs software for you, including any required dependencies.
The first thing you want to do is download the pkg-get package file from http://www.blastwave.org/pkg_get.pkg. As Solaris has Mozilla 1.x installed by default, type mozilla from a console prompt (right click on the CDE desktop and choose “New Terminal Window”), visit the pkg_get URL, and save the file to /root.
Next, download the wget utility from http://www.blastwave.org/wget-i386.bin, and save it to /root as well. Now create a directory /root/bin, rename wget-i386.bin to just wget, copy wget to /root/bin, and add /root/bin to your PATH with the commands:
# PATH=/opt/csw/bin:/root/bin:$PATH
# export PATH
Next, install the pkg-get package file. Go to the command-line and type:
# pkgadd –d pkg_get.pkg
To share all of the Blastwave goodies with the other users of your Solaris machine, you can modify the default PATH to include /opt/csw/bin, the directory that contains pkg-get and all of the binaries that pkg-get installs. To modify the default PATH, edit /etc/default/login as well as /etc/default/su Those files have environment variables for PATH and SUPATH, respectively.
To create new users, you can use either the command-line useradd tool or use the Solaris Management Console (smc) GUI. smc is shown in Figure Two.
FIGURE TWO: The Solaris Management Console, or smc

After you’ve completed these steps, log out, log back in to CDE as root, and fire up a console terminal. If you see the following output after typing pkg-get, everything is working.
# pkg-get
pkg-get SCCS rev 2.48
from http://www.bolthole.com/solaris/
pkg-get is used to install free software packages
Need one of ’install’, ’upgrade’, ’available’,’compare’
’-i|install’ installs a package
’-u|upgrade’ upgrades already installed packages if possible
’-a|available’ lists the known available packages
’-c|compare’ shows installed package versions vs available
Optional modifiers:
’-d|download’ just download the package, not install
’-D|describe’ describe available packages, or search for one
’-U|updatecatalog’ updates download site inventory
’-f’ dont ask any questions: force default behaviour
Normally used with an override admin file
See /var/pkg-get/admin-fullauto
’-s ftp://site/dir’ temporarily override site to get from
By default, pkg-get uses a primary mirror at ibiblio.org, but you can check the list of mirrors at http://www.blastwave.org/mirrors.php and choose one that close to you. The configuration file for pkg-get is located (appropriately) at /opt/csw/etc/pkg-get.conf.
The wget binary that you dropped into /root/bin earlier was really a very simple version of wget and serves no useful purpose other than bootstrapping the Blastwave install. Thus, you must issue the following command from a terminal prompt to get the real wget package onto your system:
# PATH=/root/bin:$PATH; export PATH; pkg-get –i wget
That command installs the full wget package, with support for OpenSSL. You can now delete /root/bin/wget.
Finally, run…
# pkg-get –U
… to update the package database on your system. Now, it’s party time. Issue the following command from the console:
# pkg-get install kde_gcc gnome firefox gaim evolution 
After pkg-get updates (you may be prompted a few times during the process to answer yes), log out of CDE. In the “Session” menu of the login screen, you should now be able to choose from KDE or GNOME as your graphical session.
After choosing KDE or GNOME, you’ll likely have to create an icon and application link for Firefox, Evolution and GAIM, because those packages aren’t integrated by default with either KDE or GNOME.
For example, in KDE, simply right-click on the desktop, and select “Create New,” “File”, “Link To Application.” Firefox is installed in /opt/csw/bin/firefox. Obviously, with /opt/csw/bin/ in your $PATH, you can also launch Firefox by simply typing firefox. GAIM and Evolution are launched with gaim and evolution, respectively.
There’s a lot more software that can be installed with pkg-get. Browse the Blastwave web site to find other things are of interest to you. Blastwave also offers its own step-by-step download instructions at http://www.blastwave.org/howto.html. And if you find their software useful, I suggest that you send a donation of whatever amount seems reasonable. Or, better yet, buy one of their DVDs.
And a final pointer: If you need OpenOffice.org and Mozilla Thunderbird, go to http://www.openoffice.org and http://www.mozilla.org and download the pre-built Solaris versions directly from those sites. Blastwave didn’t have them avalaible as the magazine went to press.
Blastwave is a fast and responsive site. Feel free to drop an email to director Dennis Clarke at
dclarke@blastwave.org if you need help. See you next month!

Jason Perlow risked his karma for this column. You can reach Jason at class="emailaddress">jperlow@linux-mag.com.

Comments are closed.