6. Set up Your Server

This chapter describes the configuration steps necessary for the server machine to hand-off your JavaStation boot image.

6.1. Preface

It is now time to setup your server to deliver the OS and filesystem to the JavaStation.

In our examples here, we configure a Linux/SPARC server "lnxserv" at private IP 192.168.128.100 to deliver a boot image to JavaStation "java01" at private IP 192.168.128.1. Both are on private network 192.168.128/24. When using an "NFS-Root" Filesystem, the location on the server of the filesystem in our sample is at "/path/to/nfsroot".

6.2. Setting up the RARP service

We first need to set up RARP service on our server, so the JavaStation can auto-configure its IP.

First, populate the "/etc/ethers" file with the mapping of the mac address of the JavaStation to its hostname:

### /etc/ethers 
8:0:20:82:7a:21  lnxserv  # 192.168.128.100 (server is not necessary,)
#                         #                 (just for completeness)
#
#
08:00:20:81:C2:ae java01   # 192.168.128.1 (JavaStation)
#
###

Next, populate the "/etc/hosts" file with the IP to hostname maps:

### /etc/hosts 
192.168.128.100 lnxserv
192.168.128.1 java01
###

Lastly, configure the RARP cache to fill at start-up (Linux/SPARC has no RARP daemon, per se):

### Part of rc.local
#
# If necessary, first load the rarp module to be able to fill the cache.
# /sbin/insmod rarp
#
# Now we fill the rarp cache.  You better have the rarp command available.
if [ -f /sbin/rarp ]; then
        /sbin/rarp -f
fi
###

6.3. Setting up the DHCP service

You now need to configure your server to deliver DHCP service. This will help identify the JavaStation, the network it is on, and where to get its boot image from.

The following is a sample "dhcpd.conf" file for the ISC DHCP server software which ships with most Linux/SPARC distributions.

### Sample /etc/dhcpd.conf file for ISC DHCPD
#
deny unknown-clients;
#
subnet 192.168.128.0 netmask 255.255.255.0 
{
   range 192.168.128.1 192.168.128.150;
}

group 
{
   host java01 
   {
      hardware ethernet 08:00:20:81:C2:ae;
      filename "C0A88003";        # "/tftpboot/xxx"
      fixed-address java01;       # 192.168.128.1
   }
}
#
### End dhcpd.conf file

Note: Some early versions of ISC DHCPD are reported to not work well. It is recommended you use ISC DHCPD Version 2.0 and above.

A longer dhcpd.conf from the ZLS is mirrored here for demonstration purposes.

6.4. Set up NFS service ("NFS-Root Options" Only)

When you are serving up an "NFS-Root" filesystem, you need to share the filesystem you created to the JavaStation client. You do this with the "/etc/exports" file.

###/etc/exports
/path/to/nfsroot        java01(rw,no_root_squash)
###

Be sure your NFS server gets properly started up at boot-time.

6.5. Setting up for Boot with TFTP

Now we need to set up the last step on our server: the TFTP configuration. For this step, you will need the kernel you created (using the "NFS-Root" option) or the piggybacked kernel/fs boot image (using the "Embedded-Root" option), the appropriate PROLL, and some knowledge of hexadecimal numbering.

The first thing you need to do is verify that "TFTPd" is enabled in your "/etc/inetd.conf" file:

tftp	dgram	udp	wait	root	/usr/sbin/tcpd	in.tftpd

Now, you move your copy of proll for your JavaStation architecture, along your kernel or piggybacked kernel image to /tftpboot.

Now, you create of symbolic link from the hexidecimal version of your IP to your PROLL image, and a map from "HEXIP.PROL" to your real kernel image. If you are using "Embedded-Root" option, you point to your "Embedded-Root" Filesystem plus Kernel image. If you are using the "NFS-Root" option, you need to point to the normal "vmlinux.aout" image, plus have a separate map of IP->nfsroot location. For sake of completeness, you might also want a "HEXIP.SUN4M" -> "HEXIP" map, as that is the custom way of dealing with net boot situations with the Sun.

Example for java01 booting from "NFS-Root":

  $ ls -ld /tftpboot
  -rw-r--r--   1 root     root        89608 Mar 20 10:15 proll.aout.krups.11
  -rw-r--r--   1 root     root        52732 Mar 17 11:52 proll.aout.mrcoffee.11
  lrwxrwxrwx   1 root     root           19 Mar 20 10:16 proll.krups -> proll.aout.krups.11
  lrwxrwxrwx   1 root     root           22 Mar 17 11:54 proll.mrcoffee -> proll.aout.mrcoffee.11
  lrwxrwxrwx   1 root     root           10 Apr  1 13:00 C0A88001.SUN4M -> COA88001
  lrwxrwxrwx   1 root     root           10 Apr  1 13:00 C0A88001 -> proll.mrcoffee
  lrwxrwxrwx   1 root     root           12 Apr  1 13:00 C0A88001.PROL -> vmlinux.aout
  -rw-r--r--   1 root     root      1456189 May 21 12:53 vmlinux.aout
  -rw-r--r--   1 root     root      6743821 Apr  1 12:53 vmlinux_embed.aout
  lrwxrwxrwx   1 root     root           18 Apr  1 12:53 192.168.128.1 -> /path/to/nfsroot

Example for java01 booting from "Embedded-Root" boot image:

  $ ls -ld /tftpboot
  -rw-r--r--   1 root     root        89608 Mar 20 10:15 proll.aout.krups.11
  -rw-r--r--   1 root     root        52732 Mar 17 11:52 proll.aout.mrcoffee.11
  lrwxrwxrwx   1 root     root           19 Mar 20 10:16 proll.krups -> proll.aout.krups.11
  lrwxrwxrwx   1 root     root           22 Mar 17 11:54 proll.mrcoffee -> proll.aout.mrcoffee.11
  lrwxrwxrwx   1 root     root           10 Apr  1 13:00 C0A88001.SUN4M -> COA88001
  lrwxrwxrwx   1 root     root           10 Apr  1 13:00 C0A88001 -> proll.mrcoffee
  lrwxrwxrwx   1 root     root           12 Apr  1 13:00 C0A88001.PROL -> vmlinux_embed.aout
  -rw-r--r--   1 root     root      1456189 May 21 12:53 vmlinux.aout
  -rw-r--r--   1 root     root      6743821 Apr  1 12:53 vmlinux_embed.aout

6.6. The Last Configuration Step

The last step to configuring your Linux-running JavaStation: boot it and cross your fingers!

Tip: Report of success are also heard of where one or more of these configuration steps have been used: knocking on a wooden surface, booting during a full moon, walking under ladders, breaking of mirrors, throwing salt over one's shoulder, hunting black cats and sacrificing chickens (KFC will suffice).

6.7. What to See When Booting Linux

When you boot things properly, your JavaStation will start up with the normal white background screen with the PROM banner at the top, and you will get the black "exclamation mark in triangle" logo, signalling the system doesn't yet know who it is. When contact is made with the DHCP server, the logo goes away and changes to the Java coffee cup logo. After this, a black background window opens. This is the PROLL window. It'll show status of the TFTP download in progress, and give stats on the size of the file downloaded. Next, the whole screen should go black, you should see a picture of Tux the penguin in the upper left hand of the screen, and have the normal Linux kernel messages printed before you. Any mistakes from this point are due to the filesystem you are using, the filesystem mounting, or missing kernel drivers which should have been compiled in.