Project History
I installed Sun Ray Server Software 4.0 on an Ubuntu 8.04 desktop machine today. The computer, duke, was running Ubuntu 6.10 and SRSS 3.1 before I started. Both of these platforms are somewhat out of date now so it was a good opportunity to refresh our home computing set up. Also, the newer version of SRSS ships with an updated firmware which is uploaded to the Sun Rays upon boot making it even more appealing.
duke is used as our solitary server at home with both Maggie and I connecting via Sun Ray terminals on our desks. We’ve had this configuration for a fairly long time now and it’s worked really well. The SRSS software is a bit heavy for our needs I think, but the hardware we’re using can handle it.
duke also serves media content via Samba to XBMC running on the Xbox, so I didn’t want to have it out of commission for too long or we’d have not music, movies and television shows to entertain ourselves with.
Having done this kind of thing before, the plan was:
- Research the current state of SRSS and Ubuntu
- Backup the root partition (/home is stored on another partition and can be ignored)
- Install Ubuntu
- Install SRSS
- Get sound and Flash support working
- Take another system image
- Rejoice!
Research
I checked the usual haunts and found that some mailing list posts indicating that people had managed to wrangle SRSS 4 on top of Ubuntu 8.04. I had high expectations that I’d be able to do the same thing. I checked a few of the wiki articles but the Ubuntu one hasn’t been updated to cover SRSS 4 and the Debian one was riddled with Ubuntu notes, so that was going to serve as my base document.
Backup
I downloaded the SRSS software, the Ubuntu install ISO and the latest SysRescueCD. I wanted to backup the current working operating system incase 5PM rolled around and Maggie needed to use her Sun Ray.
Thankfully duke has five disks, one of which is dedicated to data backup. I booted the SysRescueCD, mounted the target partition and used Partimage to save /dev/sda1 (my root partition) as a single image. Partimage is an open source equivalent to Ghost and I’ve used it a lot in the past to take full-system backups before performing major operating system upgrades on our work servers. It works a treat and is fairly fast because it doesn’t copy empty space. My root partition is only about 4GB full so it took a minute and we were done.
Install Ubuntu
The Ubuntu installation is ridiculously easy. I was careful when installing to only mount (and not to format) /dev/sda2 as /home but other than that it was “click, click, click, done.”
As a good measure I enabled the universe and multiverse repositories, installed some useful packages like vim and openssh-server and then took another full system backup. If my SRSS install was botched for some reason I’d have a clean Ubuntu install from which to work back up from.
Installing SRSS
This was going to be the tricky part… or so I thought. I read through the installation wiki entry a few times before I started, just to familiarize myself with the process. I remember spending a few days installing and reinstalling SRSS in the past, and it was all because I was skim reading the instructions. Needless to say, I learnt my lesson.
Under Ubuntu you tend to do everything using sudo but I found it’s easiest to first become root, via:
mlambie@duke:~$ sudo su
I installed the necessary packages:
root@duke:~# aptitude install java-package sun-java5-jdk slapd libldap-2.4-2 ldap-utils \
dhcp3-server nscd gawk iputils-ping pdksh unzip alien liburi-perl libgdbm3 libx11-6 \
libfreetype6 libsasl2-2 libxt6 zlib1g gdm devscripts xkb-data-legacy apache2 \
tomcat5.5 libapache2-mod-jk atftpd
Unzipped and scp’d the SRSS software to my home directory, then used alien to convert the rpm packages to debs. alien gave me warnings about the scripts not being converted and I ignored them.
root@duke:~/srss_4.0# find . -name *.rpm | xargs alien -d
Remove the /usr/X11RC6/bin references in the sunwutu package and rebuild it:
root@duke:~/srss_4.0# SUNWUTU="`echo sunwutu_*`";
root@duke:~/srss_4.0# echo 'mv usr/X11R6/bin usr/; rmdir usr/X11R6' \
| deb-reversion -k bash "${SUNWUTU}" move Xnewt to /usr/bin && rm "${SUNWUTU}"
Then install all these newly generated debs:
root@duke:~/srss_4.0# dpkg -i sunw*deb
Install Java for SRSS (even though we installed Java via aptitude earlier). Patch a bunch of files (SUNWut, SUNWutref, SUNWkio), copy the zsunray-init file and update-rc.d and install Xkbinstall. It’s all in the wiki.
Backup the dhcpd.conf file because we’re gonna recreate it. Make some symlinks:
root@duke:~/srss_4.0# cd /usr/lib
root@duke:/usr/lib# ln -s libldap-2.4.so.2 libldap-2.3.so.0
root@duke:/usr/lib# ln -s liblber-2.4.so.2 liblber-2.3.so.0
root@duke:/usr/lib# /opt/SUNWut/lib/utctl.d/features/utcompatlinksctl enable
root@duke:/usr/lib# ldconfig
root@duke:/usr/lib# ln -s /etc/X11/rgb.txt /usr/lib/X11/rgb.txt
root@duke:/usr/lib# ln -s /usr/share/X11/XKeysymDB /usr/lib/X11/XKeysymDB
root@duke:/usr/lib# mkdir /var/dt
root@duke:/usr/lib# ln -s /opt/SUNWut/lib/libutdev.so.1 /usr/lib
root@duke:/usr/lib# ldconfig
Now you’re ready to configure utadm:
root@duke:~/srss_4.0# /opt/SUNWut/sbin/utadm
This can be a bit confusing if you’ve not done it before, but the key is to ensure you don’t screw up your existing network configuration.
Sound and Flash
Flash used to work in previous versions but the colours were not right. Reds and blues would appear where they weren’t meant to be and everyone looked like a Smurf. That’s been fixed now too.
Follow the instructions on the wiki, install the kernel modules and install esound and you’ll get tunes out the speakers. This sets an AUDIODEV variable which routes sound to esd.
I read two links about Flash on Sun Ray on Ubuntu. I compiled the libflashsupport.so object and installed the flashplugin-nonfree package. YouTube then played Flash with audio and I was delighted.
Finishing Up
All that was left to do was to gloat and take a final system image. I then added a few more users (Maggie and Jacob) and ensured they had the right UIDs and it was all done.
I also had to go into my keyboard preferences via System > Preferences > Keyboard Shortcuts to correct an issue with the left shift key being incorrectly mapped. I deleted all the bindings under the Desktop swivel and found that solved it.