UbuntuOnSunRay

Differences between revisions 27 and 28
Revision 27 as of 2005-11-11 07:06:43
Size: 21081
Editor: mail
Comment:
Revision 28 as of 2005-11-13 23:46:09
Size: 21077
Editor: mail
Comment:
Deletions are marked like this. Additions are marked like this.
Line 72: Line 72:
ncampbell@naaman:~$ sudo apt-get install ldap-utils nscd gawk iputils-ping pdksh unzip alien libdb3-util libx11-6 xlibs atftpd wdm build-essential linux-headers-`uname -r` gcc-3.4 java-package java-common fakeroot ncampbell@naaman:~$ sudo apt-get install ldap-utils nscd gawk iputils-ping pdksh unzip alien libdb3-util libx11-6 xlibs atftpd build-essential linux-headers-`uname -r` gcc-3.4 java-package java-common fakeroot

An annotated, step-by-step guide to running Ubuntu on the SunRay thin-client architecture by Naaman Campbell.


Adapted from the [http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/ SunRay Debian] guide, more specifically, the 3.1 Final guide and various postings on the [http://www.filibeto.org/mailman/listinfo/sunray-users/ SunRay Users Mailing List].

WORK IN PROGRESS - CURRENTLY IN TESTING PHASE - INCOMPLETE DOCUMENT

TableOfContents

Introduction

[http://www.sun.com/sunray/sunray1/index.xml SunRay Thin-Clients] are a definate competitor in the business desktop arena providing an attractive alternative to the Citrix/Windows thin-client solution. Prior to SunRay 3.x, SunRay was only available on Solaris, however the release of 3.x SunRay Server Software (SRSS) allowed for the deployment onto Linux-based servers.

Sun's officially supported Linux distributions only included the following commercially-available distributions - RedHat Enterprise, SUSE and Sun's own Java Desktop System (SUSE-based). Many thanks have already been given to the pioneering work carried out by Michael Gernoth & Thomas Glanzmann for providing their tools and guide on how to run SunRay on Debian Sarge. From the SunRay Debian guide, users have managed to successfully run SunRay on other distributions such as Fedora Core 3 and Ubuntu.

After successfully setting up Ubuntu to run SRSS 3.1, I wish to provide an easier-to-follow, Ubuntu-tailored version of the SunRay Debian guide. The guide outlines the configuration of a SunRay LAN interconnect w/o failover on a base Breezy Badger installation. Failover may be covered in future revisions of this guide.

Pre-Installation Foreword

It is recommended that all DNS, LDAP and IP address settings are finalised, prior to the installation of the SunRay Server Software. SRSS alters many network-related settings and may require reinstallation if these settings are changed later on.

Packages

The following packages are to be installed:

  • ldap-utils
    • SRSS utilises an LDAP server to store configuration info
  • dhcp3-server
    • SunRays require a DHCP server to be assigned an address along with SunRay-specific options

  • nscd
    • SRSS uses nscd to lookup info such as passwd and hosts
  • pdksh
    • SRSS requires the use of the Korn shell
  • alien
    • converts Sun's supplied RPMs to a superior package format - deb
  • atftpd
    • allows SRSS to serve firmware to SunRay thin-clients via TFTP

  • build-essential
    • necessary for the compiling of audio modules
  • linux-headers-uname -r

    • necessary for the compiling of audio modules
  • gcc-3.4
    • necessary for the compiling of audio modules
  • apache
    • runs the web-based SunRay Configuration pages

  • java-package
    • provides a wrapper package for Sun's self-extracting binary
  • java-common
    • sets up Java environment
  • fakeroot
    • allows regular users to create packages
  • gawk
    • SRSS requires the use of gawk in scripts
  • iputils-ping
    • for pinging stuff..
  • libraries: libdb3-util libx11-6 xlibs

Additional repositories, including multiverse, are required to obtain these packages (see AddingRepositoriesHowto).

Install Commands

ncampbell@naaman:~$ sudo apt-get install ldap-utils nscd gawk iputils-ping pdksh unzip alien libdb3-util libx11-6 xlibs atftpd build-essential linux-headers-`uname -r` gcc-3.4 java-package java-common fakeroot

ncampbell@naaman:~$ sudo apt-get install apache

ncampbell@naaman:~$ sudo apt-get install dhcp3-server

Additional Downloads

Along with the SRSS zipfile from Sun, other software required includes Java, SRSS Debian Patch, scripts, SASL libraries, example DHCP configuration file, audio source zipfile and the audio source patch. Apart from the SRSS zipfile and Java, all the remaining downloads are provided via the Debian SunRay guide. To keep things tidy, create a SunRay directory to save the additional files to.

The SRSS zipfile requires logging in to the Sun and can be found at - [http://www.sun.com/download/products.xml?id=43138999 SunRay Server Software 3.1]. It is also recommended to download the Install Guide as well from the same page.

The remaining downloads are retrievable via wget. The following changes to the wget configuration file (/etc/wgetrc) are necessary for a proxied network:

http_proxy = http://username:password@proxy.domain.com:3128
ftp_proxy = http://username:password@proxy.domain.com:3128

use_proxy = on

Manual Downloads

ncampbell@naaman:~/SunRay$ wget -O jre-1_5_0_05-linux-i586.bin http://jdl.sun.com/webapps/download/AutoDL?BundleId=10274

ncampbell@naaman:~/SunRay$ wget http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/sray31fcs-debian.patch http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/zsunray-init http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/libsasl7_1.5.28-6.4_i386.deb http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/xkbinstall http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/dhcpd.conf.example http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/10SUNWut http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/makefiles-2.6.tar.gz http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/SUNWut-modules-2.6.patch

Conversion and Installation

Extract and convert the SRSS Linux packages to deb format.

ncampbell@naaman:~/SunRay$ unzip srss_3.1.zip
ncampbell@naaman:~/SunRay$ mkdir srsspkgs
ncampbell@naaman:~/SunRay$ cd srsspkgs
ncampbell@naaman:~/SunRay/srsspkgs$ for i in ../srss_3.1/Sun_Ray_Core_Services_3.1/Linux/Packages/* ../srss_3.1/Sun_Ray_Data_Store_2.1/Linux/Packages/* ../srss_3.1/GDM_2.4.4.7.1/Linux/Packages/* ../srss_3.1/Docs/Linux/Packages/*; do
  fakeroot alien -d $i
done

Install the resultant deb packages.

ncampbell@naaman:~/SunRay/srsspkgs$ sudo dpkg -i sunw*deb

Patch SUNWut Package

Change the following command accordingly.

ncampbell@naaman:~/SunRay/srsspkgs$ cd / && sudo patch -p0 < /home/ncampbell/SunRay/sray31fcs-debian.patch
ncampbell@naaman:~/SunRay/srsspkgs$ cd ~/SunRay

Establish Init Scripts

ncampbell@naaman:~/SunRay$ sudo cp zsunray-init /etc/init.d/.
ncampbell@naaman:~/SunRay$ sudo chmod 755 /etc/init.d/zsunray-init
ncampbell@naaman:~/SunRay$ sudo update-rc.d zsunray-init defaults 99 20

Java Installation

Instructions are adapted from the RestrictedFormats page.

ncampbell@naaman:~/SunRay$ chmod +x jre-1_5_0_05-linux-i586.bin
ncampbell@naaman:~/SunRay$ fakeroot make-jpkg jre-1_5_0_05-linux-i586.bin
ncampbell@naaman:~/SunRay$ sudo dpkg -i sun-j2re1.5_1.5.0+update05_i386.deb

Change the default Java to Sun Java (option 3):

ncampbell@naaman:~/SunRay$ sudo update-alternatives --config java

Setup SRSS Java environment:

ncampbell@naaman:~/SunRay$ sudo ln -s /usr/lib/j2re1.5-sun /etc/opt/SUNWut/jre

GNU Database Setup

Link libgdbm.so.2 to libgdbm.so.3 as a workaround for SRSS.

ncampbell@naaman:~/SunRay$ sudo ln -s /usr/lib/libgdbm.so.3 /usr/lib/libgdbm.so.2

HMAC-MD5 Encryption Installation

ncampbell@naaman:~/SunRay$ sudo dpkg -i libsasl7_1.5.28-6.4_i386.deb

Sun Keyboard Support

Install xkbinstall script:

ncampbell@naaman:~/SunRay$ sudo /bin/sh xkbinstall

The right shift key on a Sun Type6 USB keyboard doesn't work by default in Gnome. It appears to be a conflict with the default Keyboard Shortcuts (System -> Preferences -> Keyboard Shortcuts) and is fixed by removing all references to the <shift> key. However, after removing all references to the <shift> key, the issue still remained and was fixed by removing all entries in Keyboard Shortcuts. The following shortcuts were reinstated:

(coming soon)

To set these shortcuts globally, log all users out and log into a console (CTRL+ALT+1) - this step can be left until later. After logging in, execute the following gconftool-2 commands:

(coming soon)

SunRay LAN Interconnect Setup

Prior to setting up the SunRay LAN Interconnect, a few 'Ubunturisations' need to be made..

* DHCP

  •   ncampbell@naaman:~/SunRay$ sudo mkdir /etc/sysconfig
      ncampbell@naaman:~/SunRay$ sudo ln -s /etc/dhcp3/dhcpd.conf /etc/sysconfig/dhcpd
      ncampbell@naaman:~/SunRay$ sudo ln -s /etc/dhcp3/dhcpd.conf /etc/dhcpd.conf

* getent

  • Change the following line in /opt/SUNWut/sbin/utadm:
      # get the intf's symbolic name
      INTF_NAME=`getent hosts ${INTF_IPA} | awk '{print $2}'`;
      ncampbell@naaman:~/SunRay$ sudo vi /opt/SUNWut/sbin/utadm
    
        # get the intf's symbolic name
        INTF_NAME=`getent hosts | grep -w ${INTF_IPA} | awk '{print $2}'`;

Install the SunRay LAN Interconnect (it is handy to have a filled-out Worksheet from the SRSS Install Guide for this step):

ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utadm -A 192.168.1.0
  Selected values for subnetwork "192.168.1.0"
    net mask:           255.255.255.0
    no IP addresses offered
    auth server list:   192.168.1.101
    firmware server:    192.168.1.101
  Accept as is? ([Y]/N):  N
  new netmask: [255.255.255.0]
        You have specified a netmask different than the class
        based netmask for this subnet.
        Do you want to keep this netmask?  ([Y]/N):  Y
  Do you want to offer IP addresses for this subnet? (Y/[N]):  Y
  new first Sun Ray address: [192.168.1.4] 192.168.1.185
  number of Sun Ray addresses to allocate: [70] 15
  auth server list:     192.168.1.101
To read auth server list from file, enter file name:
Auth server IP address (enter <CR> to end list):
If no server in the auth server list responds,
should an auth server be located by broadcasting on the network? ([Y]/N):  N
  new firmware server: [192.168.1.101 ]
  new router: [192.168.1.1] 192.168.1.30
  Selected values for subnetwork "192.168.1.0"
    net mask:           255.255.255.0
    first unit address: 192.168.1.185
    last unit address:  192.168.1.199
    auth server list:   192.168.1.101
    firmware server:    192.168.1.101
    router:             192.168.1.30
  Accept as is? ([Y]/N):  Y
### successfully setup "/etc/opt/SUNWut/net/netmasks" file
Error: host name for 192.168.1.101 not found
### Error: unable to start dhcp services.
    Please restart dhcp manually after utadm has completed.

Installing the SRSS LAN Interconnect does not turn on LAN connections on Ubuntu and is enabled by the following:

ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utadm -L on
ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utrestart

SRSS Administration Setup

Setup SRSS Administration and allow remote connections:

ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utconfig

Configuration of Sun Ray server Software

This script automates the configuration of the Sun Ray server software
and related software products.  Before proceeding, you should have read
the Sun Ray server 3.1 Installation Guide and filled out the Configuration
Worksheet.  This script will prompt you for the values you filled out on
the Worksheet.  For your convenience, default values (where applicable)
are shown in brackets.

Continue ([y]/n)?
Enter Sun Ray admin password:
Re-enter Sun Ray admin password:

Configure Sun Ray Web Administration? ([y]/n)?

Warning: Apache is not installed on this system.
Configuration parameters will be stored in the file
/etc/opt/SUNWut/http/apache.conf.  Please refer to the Installation Guide to
complete configuration of Apache.
Enter port number [1660]:
Enter CGI username [utwww]:
Enable remote server administration? (y/[n])? y

Configure Controlled Access Mode? (y/[n])?

Configure this server for a failover group? (y/[n])?

About to configure the following software products:

Sun Ray Data Store 2.1
    Hostname: naaman
    Sun Ray root entry: o=utdata
    Sun Ray root name: utdata
    Sun Ray utdata admin password: (not shown)
    SRDS 'rootdn': cn=admin,o=utdata

Apache Web Server Not installed
    Apache Web Server port number: 1660
    Remote server administration: yes
    CGI username: utwww

Sun Ray server 3.1
    Failover group: no
    Controlled Access Mode: no

Continue ([y]/n)?

Updating Sun Ray Data Store schema ...

Updating Sun Ray Data Store ACL's ...

Creating Sun Ray Data Store Datastore ...

Restarting Sun Ray Data Store ...
Starting Sun Ray Data Store daemon .
Thu Nov 10 13:33 : utdsd starting

Loading Sun Ray Data Store ...

Executing '/usr/bin/ldapadd -h naaman -x -p 7012 -D cn=admin,o=utdata' ...
adding new entry "o=utdata"

adding new entry "o=v1,o=utdata"

adding new entry "utname=naaman,o=v1,o=utdata"

adding new entry "utname=desktops,utname=naaman,o=v1,o=utdata"

adding new entry "utname=users,utname=naaman,o=v1,o=utdata"

adding new entry "utname=logicalTokens,utname=naaman,o=v1,o=utdata"

adding new entry "utname=rawTokens,utname=naaman,o=v1,o=utdata"

adding new entry "utname=multihead,utname=naaman,o=v1,o=utdata"

adding new entry "utname=container,utname=naaman,o=v1,o=utdata"

adding new entry "utname=properties,utname=naaman,o=v1,o=utdata"

adding new entry "cn=utadmin,utname=naaman,o=v1,o=utdata"

adding new entry "utname=smartCards,utname=naaman,o=v1,o=utdata"

adding new entry "utordername=probeorder,utname=smartCards,utname=naaman,o=v1,o=utdata"

adding new entry "utname=policy,utname=naaman,o=v1,o=utdata"

adding new entry "utname=resDefs,utname=naaman,o=v1,o=utdata"

adding new entry "utname=prefs,utname=naaman,o=v1,o=utdata"

adding new entry "utPrefType=resolution,utname=prefs,utname=naaman,o=v1,o=utdata"

adding new entry "utPrefClass=advisory,utPrefType=resolution,utname=prefs,utname=naaman,o=v1,o=utdata"


Added 18 new LDAP entries.

Creating Sun Ray server Configuration ...
Adding user account for 'utwww' (ut admin web server cgi user) ...

The Admin GUI has not been configured.
Your parameters have been stored in a
temporary file.
no crontab for root

Unique "/etc/opt/SUNWut/gmSignature" has been generated.

Restarting Sun Ray Data Store ...
Stopping Sun Ray Data Store daemon
.Sun Ray Data Store daemon stopped
Starting Sun Ray Data Store daemon .
Thu Nov 10 13:33 : utdsd starting
Adding user admin ...
User(s) added successfully!

***********************************************************
The current policy has been modified.  You must restart the
authentication manager to activate the changes.
***********************************************************


Configuration of Sun Ray server has completed.  Please check
the log file, /var/log/SUNWut/utconfig.2005_11_10_13:24:57.log, for errors.

If the SunRay server is not being used to serve web pages, save the following httpd.conf into the /etc/apache directory: attachment:httpd.conf

Restart the apache server after changes to the configurations:

ncampbell@naaman:~/SunRay$ sudo /etc/init.d/apache restart

Start SunRay Service

ncampbell@naaman:~/SunRay$ sudo /etc/init.d/zsunray-init start

Test the SRSS Administration setup by viewing http://localhost:1660 in a browser.

DHCP Server Configuration

Adjust dhcpd.conf.example to suit network configuration:

ncampbell@naaman:~/SunRay$ vi dhcpd.conf.example

# Example SunRay dhcpd.conf
# IP of SunRay server: 192.168.1.101
# IP-Range for SunRays: 192.168.1.185-192.168.1.199
# SunRay firmware version: 3.0_51,REV=2004.11.10.16.18

#Sun Ray
option space SunRay;
option SunRay.AuthSrvr  code 21 = ip-address;
option SunRay.AuthSrvr  192.168.1.101;
option SunRay.FWSrvr    code 31 = ip-address;
option SunRay.FWSrvr    192.168.1.101;
option SunRay.NewTVer   code 23 = text;
option SunRay.NewTVer   "3.0_51,REV=2004.11.10.16.18";
option SunRay.Intf      code 33 = text;
option SunRay.Intf      "eth2";
option SunRay.LogHost   code 24 = ip-address;
option SunRay.LogHost   192.168.1.101;
option SunRay.LogKern   code 25 = integer 8;
option SunRay.LogKern   6;
option SunRay.LogNet    code 26 = integer 8;
option SunRay.LogNet    6;
option SunRay.LogUSB    code 27 = integer 8;
option SunRay.LogUSB    6;
option SunRay.LogVid    code 28 = integer 8;
option SunRay.LogVid    6;
option SunRay.LogAppl   code 29 = integer 8;
option SunRay.LogAppl   6;

group
{
        vendor-option-space SunRay;
        subnet 192.168.1.0 netmask 255.255.255.0 {
                default-lease-time 720000;
                max-lease-time 1440000;
                authoritative;
                option routers 192.168.1.30;
                range 192.168.1.185 192.168.1.199; 
        }
}

Replace current dhcpd configuration file with SunRay-customised file and restart the dhcpd service:

ncampbell@naaman:~/SunRay$ sudo cp dhcpd.conf.example /etc/dhcp3/dhcpd.conf
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/dhcp3-server restart

XF86 Compatibility

Because Ubuntu uses x.org instead of X11, the following workaround is required:

ncampbell@naaman:~/SunRay$ sudo ln -s /etc/X11/xorg.conf /etc/X11/XF86Config

SunRay Variables

To get SunRay variables added to the user's environment on login, add the 10SUNWut script into the Xsession directory:

ncampbell@naaman:~/SunRay$ sudo cp 10SUNWut /etc/X11/Xsession.d/.

GDM Setup

Preparing gdm for use with SunRay requires alteration of the SunRay gdm files and gdm.conf. Save attachment:gdm.conf and attachment:xmgr-gdm.tar to the SunRay directory.

Extract xmgr-gdm to /opt/SUNWut/lib/xmgr:

ncampbell@naaman:~/SunRay$ cd /opt/SUNWut/lib/xmgr
ncampbell@naaman:/opt/SUNWut/lib/xmgr$ sudo tar xvf ~/SunRay/xmgr-gdm.tar
ncampbell@naaman:/opt/SUNWut/lib/xmgr$ cd ~/SunRay

Install new gdm.conf file:

ncampbell@naaman:~/SunRay$ sudo cp /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf.preSunRay
ncampbell@naaman:~/SunRay$ sudo cp gdm.conf /etc/X11/gdm/.

Restart gdm and SRSS:

ncampbell@naaman:~/SunRay$ sudo /etc/init.d/gdm stop
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/gdm start
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/zsunray-init stop
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/zsunray-init start

Thanks again to Michael Gernoth and Thomas Glanzmann for their help with this issue.

Audio Configuration

The SunRay audio device files need to be compiled to run on a 2.6 kernel.

ncampbell@naaman:~/SunRay$ cd /usr/src/SUNWut
ncampbell@naaman:/usr/src/SUNWut$ sudo tar zxvf ~/SunRay/makefiles-2.6.tar.gz
ncampbell@naaman:/usr/src/SUNWut$ sudo patch -p0 < ~/SunRay/SUNWut-modules-2.6.patch
ncampbell@naaman:/usr/src/SUNWut$ sudo make -C /usr/src/SUNWut/utadem all
ncampbell@naaman:/usr/src/SUNWut$ sudo make -C /usr/src/SUNWut/utio all
ncampbell@naaman:/usr/src/SUNWut$ sudo mkdir -p /lib/modules/`uname -r`/misc
ncampbell@naaman:/usr/src/SUNWut$ sudo cp /usr/src/SUNWut/ut{adem,io}/*.ko /lib/modules/`uname -r`/misc/.
ncampbell@naaman:/usr/src/SUNWut$ sudo depmod -a

The SunRay X properties script does not account for xprop being located in /usr/bin. Change the following line in :

for XPATH in /usr/openwin/bin /usr/X11R6/bin /usr/X11/bin ; do

ncampbell@naaman:/usr/src/SUNWut$ cd ~/SunRay
ncampbell@naaman:~/SunRay$ sudo vi /etc/opt/SUNWut/basedir/lib/utxprop

  for XPATH in /usr/openwin/bin /usr/X11R6/bin /usr/X11/bin /usr/bin; do

Ubuntu comes with libesd-alsa0 by default, however this library is not compatible with the SunRay audio setup. Replace libesd-alsa0 with libesd0:

ncampbell@naaman:~/SunRay$ sudo apt-get install libesd0

Note: removing the ubuntu-desktop package will leave everything intact as part of this process, it is a meta-package

AUDIO CONFIGURATION SECTION NOT COMPLETE - GOING HOME FOR A BEER

Document To-Do List

  • Provide an unannotated, script-like version of this document at UbuntuOnSunRaySimple

  • Create a script to automate the installation of SunRay - maybe a precursor for the development of a package (sudo apt-get install sunray - lovely)

  • Create CorporateUbuntu - a suggested locked-down base "business" desktop environment guide

  • Investigate failover

Further Steps

last edited -- NaamanCampbell DateTime

UbuntuOnSunRay (last edited 2008-08-06 16:24:10 by localhost)