Netra j 2.0 Administrator's Guide

JavaStation Boot Sequence

The JavaStation boot sequence uses the following network services:

These services do not have to reside on the same machine. As mentioned in Chapter 2, Booting the JavaStation Using Netra j, NIS and DNS services must also be provided on the network for JavaStation computers to operate correctly, but they are not directly involved in the boot sequence.

The boot sequence can occur in a variety of ways. Essentially, it must accomplish the following tasks:

  1. Lease an IP address to the JavaStation computer. Each JavaStation must lease an IP address from an address pool managed by a DHCP server. It is recommended that the DHCP server assign addresses dynamically. However, the Solaris DHCP server can also be set up with statically assigned IP addresses.

  2. Deliver and boot JavaOS on the JavaStation computer. JavaOS can be delivered to the JavaStation computers from a network server via TFTP or TFTP and NFS. Alternatively, if the JavaStation has flash memory, JavaOS can be booted from flash.

  3. Deliver the main user application to the JavaStation computer. The main user application can be delivered to the JavaStation computers via HTTP. Alternatively, JavaOS and the main application can be compiled together into a single boot image.

  4. Update the JavaOS stored in flash memory. This task applies only to JavaStation clients with flash memory (available only on "tower" models). After the JavaStation boots, the JavaOS file stored in flash memory can be updated if a newer copy of JavaOS exists on the network. If the flash memory is updated, the JavaStation immediately reboots with the newer copy of JavaOS.

The following sections describe the JavaStation power-on and boot sequence tasks in detail.

Power-On

The JavaStation programmable read-only memory (PROM) includes TFTP client and DHCP client implementations and is thus able to carry out the boot sequence. At power-on, the PROM checks to see if flash memory is present. If so, it then checks to make sure the JavaOS in flash is not corrupted. If the JavaOS in flash is valid, then the PROM loads it into memory and transfers control to it. JavaOS initializes itself and then completes Task 1, described below.

If any of the above tests fail, JavaOS is not loaded into memory and the PROM proceeds to complete Task 1 itself.

Task 1: Lease an IP Address

Either the PROM or JavaOS leases an IP address from the DHCP server by completing the following handshake with the JavaStation DHCP server. For simplicity, the description below refers to the PROM or JavaOS as "the DHCP client."

  1. The DHCP client broadcasts DHCPDISCOVER packets at intervals until a DHCPOFFER is received. The DHCPDISCOVER packet includes the Client Class Identifier option, which identifies the DHCP client as being a JavaStation (see "Vendor-Specific Options"). During this broadcast, a notice is displayed on the JavaStation screen approximately every minute so the user knows if the server is not responding.

  2. One or more DHCP servers respond with DHCPOFFER packets. The DHCPOFFER(s) are examined by the DHCP client to determine whether they contain the options required to boot JavaStation computers (see "DHCP").

  3. The DHCP client chooses the first OFFER it receives that contains the required options. The DHCP client remembers the IP address of the server that sent the OFFER.

  4. The DHCP client broadcasts a DHCPREQUEST packet. This packet contains the IP address of the server chosen in the previous step. All other DHCP servers that responded in the second step are thus informed that they have not been selected.

  5. The selected server sends a DHCPACK packet back to the DHCP client.

At this point, the JavaStation has received all of its configuration information from the DHCP server. Figure 8-1 illustrates the initial handshake.

Figure 8-1 JavaStation Client - DHCP Server Handshake

Graphic

Task 2: Deliver and Boot JavaOS

Task 2 is to pass control of the JavaStation to JavaOS. If JavaOS has not been loaded from flash memory, Task 2 is performed using a method determined by information delivered by the DHCP server in the initial handshake. Table 8-1 shows JavaOS boot information from the DHCP server and the resulting actions taken by the JavaStation PROM.

Table 8-1 DHCP Information for Booting JavaOS

If the DHCP server delivers... 

JavaOS is downloaded and booted as follows  

The IP address of a server that has an initial boot program (the "booter") in its TFTP root directory  

The JavaStation PROM downloads the booter from the server using TFTP, then transfers control to it.  

When the booter begins execution, it scans the PROM's device tree for the name and location of the JavaOS image and the name of a server that contains this image in an NFS-exported directory. If the booter does not find this information in the PROM, it obtains it from the DHCP server. The booter mounts this directory, copies the JavaOS image, and transfers control to it.  

The IP address of a server that has JavaOS in its TFTP root directory 

The JavaStation PROM downloads JavaOS from the server using TFTP, then transfers control to it. (Note that this is the slower of the two options.)  

The DHCP server delivers information in the DHCP options, which are described on "The DHCP Service Configuration Table ". For instructions on setting the options used to deliver the above information, see Table 8-6.

Task 3: Deliver Main Application

The main application can be compiled with JavaOS into a single executable that is stored in flash or delivered to the JavaStation using either method described in the table above.

Alternatively, the main application is delivered to the JavaStation by a web server (HTTP server) on the network. The URL of the application zip file and other JavaOS application loading properties are passed to the DHCP client in the initial handshake through the DHCP Vendor-Specific Options, described on "Vendor-Specific Options". For descriptions of the JavaOS application loading properties, see "Application Loading Properties".

Task 4: Update Flash Memory with New JavaOS

Tower model JavaStation computers include flash memory to store the JavaOS binary file. After JavaOS finishes its initialization, it determines whether it needs to update the flash memory with a new JavaOS based on the following criteria:

Both the property and the checksum are delivered by DHCP as Vendor-Specific Options. See "Vendor-Specific Options".

The JavaOS checksum identifies the revision level of the JavaOS binary file. It is contained in the first four bytes of the last 12 bytes of the file. For more information, see "Managing the JavaOS Checksum".

The results of each possible set of conditions are shown in Table 8-2.

Table 8-2 Conditions for Updating JavaStation Flash Memory

Conditions 

Results  

javaos.alwaysUpdate 

Checksum 

 

not set  

different  

JavaOS opens a Flash Update dialog box on the JavaStation screen. You have the option of updating flash memory with the new copy of JavaOS. 

not set  

same  

JavaOS does not update the flash memory.  

true

different  

JavaOS updates flash memory without querying the user.  

true

same 

JavaOS does not update the flash memory.  

false

different  

JavaOS does not update the flash memory.  

false

same  

JavaOS does not update the flash memory.  

If the flash memory is updated, the JavaStation immediately reboots with the new copy of JavaOS.

Note that if any of the following conditions exist, flash memory is never updated: