My experiences installing Sun Ray Server Software 4.0 on Ubuntu 8.04

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.

17 Comments so far

  1. Stephen on June 28th, 2008

    Howdy, great post. I was wondering what model of Sun Ray thin clients you were using. I would like to set my kids up with a couple of these.

    Take care,

    Stephen

  2. mlambie on June 28th, 2008

    Hi Stephen,

    Thanks for the kind words. I hope the article is useful to you if you end up going down that path. I’m using a few Sun Ray 150’s that I bought ages ago.

    I’ve got a dozen sitting on a shelf in the broom closet if you want any and are near Perth :)

  3. Stephen on June 28th, 2008

    Hi Matt,

    Great I will keep a look out for those on eBay here in the US, unless Perth is near Portland, Oregon - :)

    I am thinking those would make some handy slide show counsels for my wife’s photo studio also. I will let you know if anything interesting comes from it.

    Have a great weekend on the other side of the globe!

  4. mlambie on June 28th, 2008

    Not close at all :)

    I had one of the Sun Rays acting as a photo slideshow for a while but the 150s have a bit of a chunky frame to them so it wasn’t very pretty to look at.

    Good luck with your Sun Ray adventures.

  5. Dave P on July 7th, 2008

    Which version of SunRay 4 did you use?

    The distro for Redhat or Suse?

    Thanx

  6. mlambie on July 8th, 2008

    From memory I used the generic tar.gz file. It has a bunch of RPMs that you convert to DEBs with alien.

  7. John Swensen on July 8th, 2008

    I get everything done, but at the end when I do a utrestart after utadm, I get the following error:
    find: /var/opt/SUNWut/tokens: No such file or directory
    Is this a problem, or can I ignore it. I’m assuming it is a problem, because my thin clients can’t see the server.

  8. John Swensen on July 9th, 2008

    I wish my efforts to get his installed were going as easy as you made it sound. I get everything set up and keep getting a 27D OTD and for the life of me can’t figure out how to get past it.

  9. mlambie on July 10th, 2008

    John: Did you follow the wiki entry? I checked and I’ve got that directory, and I’m guessing it was created during the installation of the alien-created debs (though that’s just a guess).

    This link might help you with the 27D issue.

  10. Tom hawboldt on August 26th, 2008

    I get past the 27d fine but then the sunrays hang on the dhcp screen. They are given an IP but then just stop at that point. Any ideas?

  11. Zach on August 26th, 2008
  12. Greg Grensteiner on September 24th, 2008

    I did this with the wiki for ubuntu-unstable and I was left with an unbuntu with no keyboard support. This happened after I installed the new gdm and rebooted.

  13. Erik on September 24th, 2008

    I tried SRSS4.0 and Ubuntu 8.04 with a Sun Ray 2 recently. I got it working but the overall experience can unfortunately be summarized as really slow. The hardware I used was a P4 2.4 GHz with 2 GB ram. Shouldn’t this be sufficient for one user? The LAN is OK also..

    I know for sure (from using other sun ray-environments) that it can be a lot better regarding this “sluggish behaviour”, but what can I try to speed things up? Sun’s documentation isn’t really helpful on this…

  14. Gary on October 25th, 2008

    What flavor of Ubuntu 8.04 did you use? (Desktop or Server; if Desktop — regular (gnome) Ubuntu? KUbuntu? EdUbuntu? Xubuntu?)

    (btw, thanks for sharing your experience)

  15. mlambie on October 26th, 2008

    @Erik: That hardware should be fine. The more RAM the better, I found, and don’t forget that there are serious hardware limitations with the SunRays. They’re *just* dumb terminals.

    @Gary: I used plain ol’ regular Gnome Ubuntu.

  16. xvart on April 22nd, 2009

    I’m doing battle with this install, I have an upgraded version of etch/lenny 5.0.1, 2.6.26-2-686, every time the sun scripts run I get this rubbish “/opt\\n/SUNWut/lib/compatlinks” as they have used ksh I have no idea how to fix, I have hacked but this is probably not the best solution, any thoughts???

  17. Tom on September 16th, 2009

    I also followed the wiki and get the following error:
    root# /opt/SUNWut/sbin/utrestart
    A warm restart has been initiated… messages will be logged to /var/opt/SUNWut/log/messages.
    ERROR: ld.so: object ‘libfakeroot-sysv.so’ from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object ‘libfakeroot-sysv.so’ from LD_PRELOAD cannot be preloaded: ignored.
    ERROR: ld.so: object ‘libfakeroot-sysv.so’ from LD_PRELOAD cannot be preloaded: ignored.
    find: `/var/opt/SUNWut/tokens’: No such file or directory

    Does anyone has an idea on how to fix this?

Leave a Reply