Getting Started with OpenSolaris 2008.05 and VMware Fusion
Saturday May 17, 2008
OpenSolaris 2008.05 has been out for quite some time now. Unfortunately the release took place in the middle of examinations and therefore I could not give a good try. Anyways now I am over with all my examinations and I decided to give it a go. As usual I am on my Macbook Pro: 2.16Ghz Core2duo with 2 Gbs of RAM. Now I only had about 4 GB of free disk space on my hard disk so I had to empty some of the contents. I moved my old OpenSolaris (Build 72) VM to my external hard disk and it freed about 9 GBs. So now with 13 GBs at hand I started off with a new VMware Fusion (using version 1.1 build 62573) virtual machine. This is the configuration of my VM:
Guest OS: Solaris 10 64-bit
Memory: 800 Mb
Virtual Processors: 1
Hard Disk: 12 Gb (Virtual)
Network Adaptor configured to Share the host's internet connection (NAT)
System Sound Connected
CD/DVD using the OpenSolaris 2008.05 disk image (which is also in my hard disk)
So I booted off the disk and it quickly loaded the GRUB menu.

Without waiting I selected the default option: OpenSolaris 2008.05
It took about 2 mins and 5 secs to boot to the OpenSolaris GNOME Desktop (including the time to select the language and keyboard - negligible). It is the first distribution of OpenSolaris that I am using which does not require a login at start up. Even the beta releases of this operating system also required you to login before you reach your desktop.
First look:
1. Just as expected, the desktop resolution was preset to a very high 1280x1024. Although this resolution can fit into the Macbook Pro screen which has a resolution of 1440x900 but it is definitely disturbing when you are using it in the single window mode cause you cannot see the entire desktop at one time and you have to use the scrollers very often. Anyways I quickly changed the desktop resolution to 800x600, which made the virtual machine fit perfectly on the screen.

2. NWAM has seamlessly set up the network (NAT) with the host operating system and allocated an IP address. I checked out Firefox and the internet was working right out of the box.

3. The entire layout is very similar to Ubuntu (of course I knew this beforehand cause I had tried the Beta release as well).
4. The sound device was not recognized.

5. The system clock was not synchronized with the host operating system.

6. Also, there is no Thrash icon in the panel.
7. A new Window Selector at the top right corner.

Before checking on the other things, I decided to start installation of OpenSolaris to the Virtual Hard Disk. The Setup Icon is available right on the desktop (like you would find it in Ubuntu). Installation is a piece of cake. Extremely straightforward and keeps you out of the filesystem configuration unlike Ubuntu. I guess it uses the same Caiman Installer, but with some modifications to go with this new distribution. So what are the steps:
1. Welcome: A simple welcome screen which also links you to the release notes. Most of you would straight away press Next on this screen without reading anything.

2. Disk: Select the disk where you would like to install. You have the option of either partitioning the disk or using the whole disk. The Recommended disk size is 7 Gb and the minimum is 3 Gb. I decided to use my entire virtual disk.

3. Timezone: You can select the time zone from here. It gives you a very innovative method of selecting time zone. A map of the entire world is shown. You can use the magnifying glass to zoom and select city corresponding to your time zone.

4. Locale: Select your language support and also the locale specific data formats.

5. Users: Set the root password and a new user for yourself. You can also give a computer name here.

6. Installation: Recheck all your settings and hit install. The entire installation took about 23 mins and 30 secs on my laptop, which is much faster than the previous installations.


7. Finish: Once the installation completes you can review the installation log and reboot the computer to start the newly installed operating system.

Now while the installation was taking place I just went through some of the other features. First the terminal. The default shell now is bash, one of the best thing that could have happened. Which means now your command history can be seen through the up-arrow key, backspaces work perfectly etc.

A new device driver utility is present right at the desktop. It shows you details of the installed drivers and also the devices whose drivers are missing.

In case the drivers are missing, you can submit the information to hardware compatibility list.

The file browser looks same as before.

One point to note is that the installation really sucks your resources. Look at my CPU usage during this time:

Once the installation process completes, you can simply reboot the machine to boot into your newly installed operating system.
One major change you would find in the new GRUB menu is that there is no failsafe session available. The only option available is OpenSolaris 2008.05 snv_86_rc3 x86.

On selecting this option your booting process will most likely hang for about 3 minutes. This is because of the same old bug.
Now this distribution of Solaris has a ZFS root filesystem. You can see at the time of booting that the ZFS configurations are read and the ZFS filesystems are mounted.

The login screen is really simple. Unlike the earlier distributions of OpenSolaris this time you will find only 3 buttons. Options, Start Again and OK.

The Options allow you to select the language or the session. The available options in sessions are: GNOME, Run Xclient script, Failsafe GNOME, Failsafe Terminal. Note that unlike the previous distributions, there is no Common Desktop Environment.

Also you are not allowed to login into the root account.

To get root privileges in your account you can use the command su on the terminal and then enter your root password.
Another change to notice at the login screen is that unlike the other distributions this one represents each character entered at the password screen with an asterix (*). Thus you can see the number of characters that the password contains.

Another hitch here is that unless you install the VMware Tools, the login screen will have a resolution of 1280x1024.
Once you login, your Solaris is Up and running, but to make it run properly I feel the following things have to be looked into at first:
1. Correcting the GRUB options in order to boot into 32-bit mode by default.
2. Installing VMware Tools
3. Correct the Network Issues.
4. Get the sound working.
Taking the first issue: You need to make a change in the GRUB menu in order to force Solaris to boot into the 32-bit mode. Note that since OpenSolaris is using a ZFS root, the menu.lst file has been moved to: /rpool/boot/grub/menu.lst
You can either correct the default entry by removing $ISADIR from the kernel and module path, or make a new entry with the following paths:
kernel$ /platform/i86pc/kernel/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/boot_archive

This should correct your booting issues. Make sure you make necessary changes in the title if you are adding a new entry so as to not get confused at the GRUB menu:

Installing VMware Tools poses a little bit of problem because you cannot login as a root. You can mount the disk image of the VMware Tools for Solaris (located at: /Library/Application Support/VMware Fusion/isoimages/solaris.iso). Extract the file vmware-solaris-tools.tar.gz and run the perl script vmware-install.pl
The installation will end with an error where it will be unable to copy a file /usr/lib/vmware-ttols/configurator/autostart-vmware-user.sh to /usr/dt/config/Xsession.d/9999.autostart-vmware-user.sh
This will have to be done manually, using the super-user priviledges. Once you create the necessary folder and copy the required file, run the perl script again and this time the installation would complete itself.
Once you restart your computer the changes will take effect. I have noticed only two major changes. Firstly the login screen will be of the correct size as mentioned in the start-up resolution (in my case I set it as 800x600). Also the time is now synchronized with the host machine.

Apart from these two changes no other effect took place eg drag and drop between host and guest etc. I guess the VMware Tools needs to be upgraded for this new distribution.
Now about the network issues. Strangely, in the installed system, the dns lookup was failing. So in Firefox when you put in the address http://www.google.co.in it reports a server not found error. Instead, if you put http://64.233.187.99 it will open up google properly.
This can be temporarily corrected by inserting this line in the file /etc/resolv.conf:
nameserver xxx.xxx.xxx.xxx
where xxx.xxx.xxx.xxx is the IP address of your Primary/Secondary DNS servers.
This setting will take effect on restarting the computer. Although for this session the browser would work properly, but not in the following sessions because NWAM removes the manual entries from the file /etc/resolv.conf
Unfortunately, I was unable to get a proper solution for this. You can turn off NWAM to preserve your entries. To turn off NWAM and start the default networking service do the following:
$ svcadm disable /network/physical:nwam
$ svcadm enable /network/physical:default
Now you can configure your network from the Network Settings at System > Administration > Network. You can also insert your DNS server addresses here.
Once you reboot your computer, you will get an error like this:

Pressing Log In Anyway logs you in, and doesn't seem to have any negative effect on your computer. You can work as usual and your browser will work perfectly.
But after a while I switched it back to the nwam and everything started working normally again. I haven't figured out why exactly it was giving a problem initially, but nevertheless the issue has resolved.
Note: Make sure you insert your proxy settings in case you are behind a proxy server. Go to System > Preference > Network Proxy for inserting the system-wide proxy settings. In Firefox you can enter your proxy settings at Edit > Preferences > Advanced > Network > Connection > Settings
Finally to get the sound working, download the Open System Sound driver from http://www.4front-tech.com/download.cgi. Get the driver for Solaris 10/11 (x86/AMD64). Once the package downloads, you can install it by using the pkgadd -d command. Restart the machine and issue the command osstest to test the sound. Your Volume icon at the top right would have also been enabled after this driver is installed.

Don't worry about the error shown at the end of the command osstest.
Ah, finally a near perfect system to start all your work.
I find that the new OpenSolaris 2008.05 is extremely simple and easy to use. It is aimed at desktop computers. It runs pretty well in VMware Fusion. Just that at times it freezes the computer (maybe there are some VMware bugs, I am not using the latest build of VMware). And definitely its quite a lot faster than the Community/Developer editions of OpenSolaris. The final installed Virtual Machine only takes about 2.72Gb, much lesser than the other distributions, although it lacks many packages eg OpenOffice.org which can be installed using the Package Manager (System > Administration > Package Manager). Additionally you have Compiz Fusion right out of the box.
I will give OpenSolaris 2008.05 a try on VirtualBox, maybe it will work even better than that, and hopefully have another blog entry describing my experience with that.











Although making the directory /usr/dt/config/Xsess...
Hey, thanks! I started reading your article thinki...
You are welcome... But do give it a try, OpenSolar...
After creating the /usr/dt/config/Xsession.d direc...
Hey Honglin, I didnot face any such error when I h...
This is great, keep up the great work.