13.4   Booting from the Ethernet

The following procedure describes how to boot from a UNIX host over the Ethernet for a VxWorks target that uses DHCP or BOOTP to retrieve boot parameters and TFTP to retrieve the file containing the run-time image.

  1. Copy the VxWorks image to the boot directory on the boot host:1

% cp vxWorks.st /usr/wind/target/vxBoot/vxWorks.vx245

  1. Make sure that the permissions on the boot file make it accessible to all:

% chmod 644 vxWorks.vx245 
% ls -l 
total 609 
-rw-r--r-- 1 target 519880 Jul 6 19:36 vxWorks.vx245 

  1. On the target, set the flag value to 0xc0. This enables automatic configuration (using DHCP or BOOTP, 0x40) and file retrieval using TFTP (0x80).

To check the current value, enter p at the boot prompt:

[VxWorks Boot]: p
The target responds:

boot device          : ln 
processor number     : 0 
flags (f)            : 0xc0 
unit number          : 0 
To change a value, enter c at the boot prompt.

  1. Boot the target. To do this, enter an @ at the prompt:

[VxWorks Boot]: @
If the target uses DHCP, it responds:( )

boot device          : ln 
unit number          : 0  
processor number     : 0  
user (u)             : stephenm 
flags (f)            : 0x40  
 
Attaching network interface ln0... done. 
Getting boot parameters via network interface ln0. 
 
DHCP Server:147.11.46.24 
    Boot file: /usr/wind/target/vxBoot/vxWorks.vx245 
    Boot host: 147.11.46.24 
    Boot device Addr (ln0): 147.11.46.174 
    Subnet mask: 0xffffff00 
    Subnet gateway: 147.11.46.24 
Attaching network interface lo0... done. 
Loading... 374624 + 57008 + 20036 
Starting at 0x1000... 
  
Host Name: bootHost  
Target Name: vxTarget  
User: target  
Attaching network interface ln0... done. 
Attaching network interface lo0... done. 
If the target uses BOOTP, it responds:

boot device          : ln 
processor number     : 0 
flags (f)            : 0xc0 
Attaching network interface ln0... done. 
Getting boot parameters via network interface ln0. 
Bootp Server:150.12.1.159 
Boot file: /usr/wind/target/vxBoot/vxWorks.vx245 
Boot host: 150.12.1.159 
Boot device Addr (ln0): 150.12.1.245 
Subnet mask: 0xffffff00 
Attaching network interface lo0... done. 
Loading... 374624 + 57008 + 20036 
Starting at 0x1000... 
  
Host Name: bootHost  
Target Name: vxTarget  
User: target  
Attaching network interface ln0... done. 
Attaching network interface lo0... done. 
Getting a Symbol Table File

VxWorks can be configured to omit the symbol table, by turning off the "downloadable symbol table" during configuration. The relevant configuration macro is INCLUDE_NET_SYM_TBL.2 Instead, the run-time VxWorks image (not the boot program) downloads the symbol table file from the same remote directory that contained the VxWorks image. To retrieve this file, VxWorks uses the netDrv I/O driver.

When you copy the VxWorks image to the host boot directory:

% cp vxWorks /usr/wind/target/vxBoot/vxWorks.vx245

You must also copy the symbol file to the same directory:

% cp vxWorks.sym /usr/wind/target/vxBoot/vxWorks.vx245.sym

Note that the name of the symbol file is the bootfile name with a .sym suffix.


*

NOTE: Because netDrv uses either RSH or FTP to access the remote files, the boot parameters must specify a value for the usr boot parameter. If you want to use FTP, you must also specify a passwd. Otherwise, the target uses RSH. For more information on netDrv, see 2.10.1 RSH and FTP.

13.4.1   Troubleshooting

If possible, put the BOOTP server in debugging mode.

No BOOTP Reply or Problems with TFTP

If there is no BOOTP reply:

  • Make sure a BOOTP server is running on the host.
  • Verify that the target address is correct.
  • Be sure the boot file for the target exists and is accessible.

If the TFTP server is started with the -s option, it roots its requests in the specified directory. This can cause a conflict with BOOTP.

For example, suppose the boot file is specified in bootptab as /tftpboot/vxBoot/vxWorks.vx245. After getting the request, the BOOTP server checks for the existence of this file, and then sends a reply. In response to the BOOTP reply, the target sends a TFTP request to get the file /tftpboot/vxBoot/vxWorks.vx245.

However, if the TFTP server was started with the -s /tftpboot option, the request fails because the server looks for the file in /tftpboot/tftpboot/vxBoot rather than in /tftpboot/vxBoot. If this is a problem, link /tftpboot/tftpboot to /tftpboot. To do this, use the following commands:

% cd /tftpboot 
% ln -s . tftpboot
Multiple BOOTP Servers

If there are multiple BOOTP servers on the network, the target uses the parameters specified in the first reply message it receives. In the previous example, the server from which the reply message came is specified in an output line like the following:

Bootp Server:150.12.1.159
Subnet Mismatch between DHCP Server and Client

The DHCP server distributes IP addresses only to clients that reside on the same subnet as the server. If you want the client to use a server on a different subnet, you must setup a DHCP relay agent on the target's subnet.


1:  The file suffix, .vx245, is of no special significance. It just distinguishes this image from other VxWorks images that might reside in the directory.

2:  You need this symbol table to be resident on the target only if you want to use target-resident (pre-Tornado) tools. Host-based tools do not require a target-resident symbol table.