Rutgers, The State University of New Jersey
OFFICE OF INFORMATION TECHNOLOGY | TECHNICAL DIRECTOR'S WEB PAGE
 

Open Solaris

Open Solaris is a test bed for new features in Solaris. Features are often moved from there into Solaris 10. It will also be the basis for Solaris 11.

For real information, see http://opensolaris.org . However I found that it took awhile to get myself oriented, so this contains notes of things I consider particularly useful.

There are two major versions: Open Solaris and Solaris Express Community Edition (SXCE). They use the same code, but Open Solaris is purely open source, and SXCE has some propietary features. While the kernel is the same, OpenSolaris is now using ZFS for its default file system, and a new package manager. This document will talk about Open Solaris, not SXCE, on the assumption that if you want to see the newest code, you'll want the new package manager and the new file system.

Open Solaris also seems to be better documented. Sun is doing major releases about twice a year. In contrast, SXCE has new versions every week or two.

Major differences from traditional Solaris

Open Solaris has many differences from Solaris 9. It could in theory be used more or less the way you use Solaris 9. However I can't imagine why you'd want to.

About half the differences are also present in Solaris 10. For those features, see my Solaris 10 document.

Here are some other major differences:

ZFS

The default file system is ZFS. This changes system administration significantly. ZFS has two levels: a "pool" and a "file system." A pool is roughly speaking a physical disk (or collection of them if you're doing RAID, mirroring, etc). A file system is almost like a directory. Unless you set a quota, all file systems coming from a single pool have access to all the space in the pool. When you create a filesystem, by default it gets mounted, so "zfs create" really has much of the feel of "mkdir."

In the default setup, there will be a single pool, called "rpool." rpool/ROOT/opensolaris will be mounted as root. rpool/export will be mounted as /export. And there will be rpool/export/home, and rpool/export/home/USER, where USER is the user you create for yourself when you install it.

ZFS is designed so you can have a separate file system for each user. Because quotas can only be set for a file system, if you want to use quotas you have to do that. File systems are supposed to be low overhead. The main problem with having a separate file system per user is that "df" becomes almost unusable. Every zfs file system that is mounted shows in "df." (Note that you don't need to list them in vfstab. ZFS automatically does the mounts for you.) One nice thing is that having a separate file system makes it easy to see how much space each user has. I use it for user home directories and major projects. Of course unless you use a quota, every user can still use all the free space in the pool.

Two immediate changes from ZFS:

Roles

By default, root is not a user, but a "role". Roles appear in /etc/passwd, and seem to be pretty much users that can't be logged in to. Instead you use "su" to take on the root role. However su has been hacked so that you have to be an administrator to use it. (I believe the critical item is to have "roles=root" in your entry in /etc/user_attr.)

Roles are maintained with roleadd, roledel and roleadm (much like useradd, etc), although you can of course always edit /etc/user_attr. /etc/user_attr specifies privileges for users and roles, and also specifies that a given thing is a role rather than a user. See "man user_attr" for the format.

It is possible to make root go back to being a normal user.

If you are an administrator, you can use "pfexec" to execute a command as root. This isn't like su: it doesn't ask for a password.

Package system

One of the biggest changes is the creation of a package management system, "pkg". There is a repository of packages that has a pretty good collection.

Use "pkg list -a" to see all available packages. Without the -a it shows you just the ones installed.

As root, do "pkg install PACKAGE" to install a package.

You should look at the documentation at opensolaris.org about doing a version upgrade with pkg.

Most of the package are fairly obvious if you look at the listing from pkg list -a. A couple of non-obvious ones: Apache is spelled apch, e.g. "SUNWapch22" for Apache 2.2, and to get the compilers you probably want "sunstudioexpress." My favorites, such as tcsh and emacs, are available.

Random stuff

To make the system boot without the splash page hiding what is going on: "bootadm set-menu default=1" This assumes the default menu options. You might want to do "bootadm list-menu" first to make sure the option you want is actually 1.

To disable the GUI login (presumably for servers): "svcadm disable gdm".

If you have a e1000g Ethernet interface, and it hangs, see http://defect.opensolaris.org/bz/show_bug.cgi?id=5259 and http://defect.opensolaris.org/bz/show_bug.cgi?id=2178. If you're at the console you can do ifconfig -unplumb and ifconfig -plumb, followed by setting the IP address and mask, and "up". If you're remote, just wait. It will eventually come back. I've tried the workaround, and it seems to fix it. The new driver in 104 doesn't. Add the following to /kernel/drv/e1000g.conf. I put it at the end of the file, but it shouldn't matter.

tx_hcksum_enable=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
lso_enable=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
BACK TO TOP

For more information, contact hedrick@rutgers.edu.
Last updated: Sunday, 04-Jan-2009 15:56:38 EST
© 2009 Rutgers, The State University of New Jersey. All rights reserved.