What’s a JavaStation ?

The best starting point is the Linux on JavaStation HOWTO, which very clearly covers all of the machine variants with nice explanations of the hardware and firmware differences of each device. It also explains that the machines were design to do, should that be of interest.

For the record, the system I’m using is a MrCoffee (“Brick”) JavaStation-1 device with 64MB of RAM.

Why bother ?

It’s got the fastest SPARC CPU of any of my Sun gear, so I fancied trying to use it as a VNC client to do some remote working. The appeal was to have a *nix system that was fast to start up, didn’t use much power when not required (I turn it off – pretty cheap to run then :), and preferably didn’t have to mess with the X-Window system.

Ok, so my G4 Mac is a Unix system without X, but I had the machine lying around, and it’s also possible that I might use it for a streaming MP3 playback machine if I can quieten down the fan a little bit.

The main reason ? I wanted to.

What I did to get it hosted on a Qube 2

  1. download a boot image (boot.img) and NFS root tarball (root.tar.gz)[1]
  2. mkdir /home/tftpboot
  3. ln -s /home/tftpboot /tftpboot
  4. chmod 777 /home/tftpboot
  5. move the boot image into /tftpboot
  6. choose an IP address for the JavaStation, and then create symlinks in tftpboot accordingly (an IP of 192.168.1.7 was used in this example)
    1. ln -s /tftpboot/boot.img /tftpboot/C0A80107
    2. ln -s tftpboot/C0A80107 /tftpboot/C0A80107.SUN4M
  7. Unpack the NFS root image, and set things up accordingly:
    1. mkdir /home/javastation
    2. cd /home/javastation
    3. chmod 777 /home/javastation
    4. tar -zpxf root.tar.gz
    5. ln -s /home/javastation /tftpboot/<javastation name>/javastation
    6. edit /etc/exports so that it contains:
      /home/javastation  192.168.1.0/24(rw,no_root_squash)
      /tftpboot          192.168.1.0/24(rw,no_root_squash)
  8. (paraphrased from the Sun Cobalt Knowledge Base):
    1. /etc/rc.d/init.d/portmap.init start
    2. /etc/rc.d/init.d/nfs start
  9. If you want to keep these services running over a reboot, then you will also need to do:
    1. ln -s /etc/rc.d/init.d/portmap.init /etc/rc.d/rc3.d/S40portmap
    2. ln -s /etc/rc.d/init.d/nfs /etc/rc.d/rc3.d/S41nfs
    3. ln -s /etc/rc.d/init.d/nfs /etc/rc.d/rc3.d/K20nfs
  10. create a working rarpd by doing:
    1. download and unpack rarpd-1.2.tar.gz
    2. download and unpack libpcap-current.tar.gz
    3. download and unpack libnet.tar.gz
    4. compile and install libpcap
    5. compile and install libnet
    6. compile and install rarpd
  11. add the name and IP of the JavaStation to yout /etc/hosts file
  12. edit /etc/ethers to contain the MAC<>name mapping for your system (the MAC address is shown in the banner when the JavaStation starts up)
  13. /usr/sbin/rarpd -a
  14. create a working tftp daemon by:
    1. download and unpack utftpd-0.2.4.tar.gz
    2. compile and install utftpd
    3. edit /etc/inetd.conf so that the tftp boot line looks like this:
    4. tftp    dgram   udp     wait    root    /usr/sbin/tcpd  /usr/local/sbin/utftpd -v /tftpboot
  15. connect the power, video, keyboard, mouse and network cables to your JavaStation
  16. turn on your JavaStation
  17. sit back and watch Linux boot up
  18. join with me in wondering why the NFS root partition fails to mount 🙁

Resources

The following links may be helpful, but please be aware that I’m unlikely to keep them up-to-date as once the system works for my uses (ssh, DirectVNC, mpg123) then it’ll not need to change. I will also have chosen mirrors of sites that are closest to my location, and for large files that are abundantly available it would be nicer to find a closer server.

If all else fails, my favourite trick is to take the filename and throw it at Google in order to find a site that hosts the file.

[1] I’m currently (july02) trying out a Slackware tarball that was linked to from the uk.comp.sys.sun Usenet group – I might change this in the future to some other setup, maybe Debian, and if things go well with either network swap or a MIPS/SPARC cross-compiler I could even end up with my own setup. I would suggest that looking at the HOWTO is the best starting point, as that refers to more than one build.