![]() |
|
||||
LynxOS Networking Guide |
Network Booting Diskless Clients with LynxOS
LynxOS supports network booting (netboot) of remote machines over a TCP/IP network. This chapter describes how to netboot diskless clients over an Ethernet or an SCMP connection.
Overview
Netboot allows a configured LynxOS kernel image to be downloaded onto a machine without a hard disk. The kernel image can be downloaded in one of these ways:
- Ethernet (see "Ethernet Netboot" )
- PXE Netboot (see "Configuring PXE Netboot Support" )
- Snugly Coupled MultiProcessing (SCMP) (see page "SCMP Netboot" )
These diskless clients can also access remote file systems over the network. See the LynxOS Hardware Support Guide (available on the Documentation CD-ROM and the lynuxworks website) for the list of hardware configurations that support network booting.
Booting a diskless client involves these tasks:
- Creating a LynxOS kernel image to netboot.
- Configuring the diskless client.
- Downloading the LynxOS kernel.
These tasks apply to all netboot protocols.
Using the LynuxWorks Netboot Scripts
LynuxWorks provides ready-to-use scripts for both Ethernet and SCMP network booting. These scripts are in the following locations:
LynuxWorks created these scripts to produce a typical configuration for a diskless client. They can be used in their default configuration or as a template for other applications.
Copying Scripts Before Customizing
These netboot scripts should be copied before editing them. Use the following procedure to make a copy of the netboot scripts.
Restrictions
The netboot scripts must be executed on either a LynxOS native system or a compatible cross-development system. For example, to create a netboot image for a diskless client, the scripts must be executed on a disk-based LynxOS native system or a supported LynxOS cross-development system.
Ethernet Netboot
In Ethernet netboot, the client-specific or shared LynxOS kernel image is downloaded from a server using the Trivial File Transfer Protocol (TFTP), an architecture-dependent feature.
Before Beginning
The easiest way to netboot a diskless client with LynxOS is to use the scripts in the following location: /sys/romkit/remote_boot
These scripts assume that a single disk-based LynxOS system is being used for the diskless client via NFS to perform the following tasks:
Before running the netboot scripts, make sure that the diskbased server is of the same architecture type (x86, PowerPC) as the intended diskless client. Or, on a cross-development host, make sure that the appropriate LynxOS tools are available for the target architecture.
Before proceeding with the scripts, information about the disk-based server and diskless client(s) is required. The following table provides a list of this information, with examples.
Configuring the Disk-Based Server
To configure the disk-based server, perform the following tasks:
- Enable TFTP services.
- Export the root directory for diskless client via NFS.
- Build the diskless client configuration files, the netbootable image, and necessary start-up files.
- Put the image and start-up files in a download directory.
The following sections give a brief description of what these tasks involve. For additional information, See "Example-Netbooting a FORCE PowerCore 680 Board" .
For instructions on configuring PXE support, see "Configuring PXE Netboot Support".
Enabling TFTP for LynxOS
The following instructions are for LynxOS native development systems. TFTP cross development system instructions vary. See "Configuring TFTP on Cross Development System".
The /etc/inetd.conf file contains the TFTP service information. This file must contain the following line:
If this information is added, a SIGHUP signal must be sent to the inetd process. Find the process ID using the ps command. Then send the SIGHUP signal with the kill command.
Configuring TFTP on Cross Development System
TFTP instructions differ on different cross development systems. Solaris TFTP configurations are similar to LynxOS. Refer to the Solaris tftp man page for instructions.
On Linux systems, users must edit the tftp file in /etc/xinetd.d/ and restart internet services with xinetd. Refer to the xinetd and tftp man pages for instructions. Sample instructions for configuring TFTP on a Linux system is provided in "Example-Netbooting a FORCE PowerCore 680 Board".
Windows does not include a TFTP server in its distribution. LynuxWorks includes a shareware TFTP server on the Cross Development Kit (CDK) distribution. Proceed as follows:
- Install the CDK CD-ROM on the Windows cross development host. Refer to the section, "Windows Cross Development Installation" in the LynxOS Installation Guide.
- Consulting Windows documentation, set up TCP/IP support on the host.
- Locate the file c:\Lynx\4p0p0\tftppro.zip, the shareware TFTP server from WaluSoft in zipped format. Follow instructions provided with the WaluSoft TFTP distribution to set up TFTP service. Pay special attention to the outgoing server path from the Setup menu; it should point to the host CD-ROM.
Exporting the Root File System Via NFS
The disk-based server must be set up so that it can provide a root file system to the diskless client. The server can then export this file system via NFS. When using the default settings for the netboot scripts, certain directories and files are required in the root file system for the diskless client.
Use the following procedure to export the root file system to the diskless client:
Building the Netboot Image
The Makefile in /sys/romkit/remote_boot builds a clientspecific configuration file for each diskless client. LynxOS uses this configuration file to build the kernel image and supporting files that it downloads over the network to the diskless client.
Putting the Netboot Files in the Download Directory
This final step creates the directory /tftpboot and copies the netboot image and start-up files to this directory. The firmware of the diskless client must be configured with the full path name of this directory and the netbootable image.
Configuring the Diskless Client
To remotely boot the diskless client, perform these steps:
- Configure the firmware with information about the server, the download files, and the load address.
- Start netboot.
Because these commands are platform-dependent, the following sections briefly describe the commands by platform type.
For instructions on configuring PXE support, see "Configuring PXE Netboot Support".
Setting Up the PowerPC System
For the PowerPC system, the network booting code is available as a programmable option in the env settings of the VMEbug Monitor.
Use the following procedure to set this parameter.
- Reboot/reset the CPU board.
- Enter the Bug Monitor (this typically involves pressing the Break key during CPU reset).
Enabling NVRAM on the PowerPC
In newer PowerPC boards, the real-time clock is disabled. The real-time clock must be enabled before netbooting LynxOS. Use the set command at the VMEbug prompt (abbreviated xxxxBug) to set the time, thus enabling the clock:
Disabling PReP-Boot on PowerPC
The PReP-Boot setting defaults to yes on PowerPC boards. Disable this (no) with the env command.
Setting Netboot Parameters
Use the niot command at the VMEbug prompt to set the network booting parameters specific to the system's hardware configuration.
Only a few parameters need to be changed. For more details about the commands, consult the Motorola VMEbug documentation.
xxxx-Bug> niot
Client IP Address = [192.1.1.2] ?
Server IP Address = [192.1.1.1] ?
...
(Choose the Subnet IP Address Mask
appropriately)
...
Boot File Name = [/file] ?
Boot File Load Address = [00000000] ?
Boot File Execution Address = [00000000] ?
...
Update Non-Volatile RAM (Y/N)? Y
The following table shows the boot file load and execution addresses, which are platform-dependent
.
Boot File Addresses for PowerPC Systems Target Boot File Load Address Boot File Execution Address PowerPC 00004000 00004020
Booting the Remote Kernel Image
Use the nbo command to network boot the image.
Setting Up PPC PowerCore Systems
Use the following procedure to set up PPC PowerCore systems:
Setting Up Thales VMPC Systems
Thales VMPC boot firmware netboot a PreP image using the bootp protocol. This requires the server to run the bootpd daemon with the /etc/bootptab file populated with the appropriate information on the netbootable image. For more detailed information, see the man page on bootp on the server machine.
The netbootable image generated by mkimage would be run through the mkbootprep utility in order to create a prep-bootable image for Thales machines.
Setting Up Thales VMPC
Use the following procedure to set up Cetia VMPC:
- Make sure that the /etc/bootptab file on the server has an entry for the required image, and that the bootpd daemon is running.
- At the VMPC Bug prompt, enter the following command:
Example-Netbooting a FORCE PowerCore 680 Board
The following table shows an example ethernet netboot configuration that is used in the steps on configuring the disk-based server and diskless client for the PowerPC.
Preparing the Board
To prepare the target board for downloading, proceed as follows:
- Obtain an Internet Protocol (IP) address and network host name for the target board. In the instructions below, 192.1.1.2 is used as an IP address and fpc1 is used as the PowerCore network host name.
- Obtain the Ethernet address of the PowerCore target board. This address is displayed during the power-up self test after a reboot or power cycle of the board. These instructions use 00:80:42:0E:0C:02.
- Follow the PowerCore manufacturer's installation instructions to power up the board, attach the serial terminal, and establish a method of inputting keystrokes to the PowerBoot firmware. Proper setup will result in the PowerBoot> prompt being displayed on the serial terminal.
- Attach the PowerCore target board to the local network using the twisted pair Ethernet connector located on the front panel of the PowerCore target board.
To set up a point-to-point network (for example, to attach directly to a laptop notebook), please remember to use an uplink cable. This is a Category 5 twisted pair cable that has been crossed for uplink. If connecting to a hub, a regular Category 5 cable suffices.
Configuring a Network Server
The firmware monitor on the PowerCore 680 board, PowerBoot, has built-in support for downloading bootable images over the Ethernet using TFTP (Trivial File Transfer Protocol).
Configuring TFTP on a Linux Cross Development Host
TFTP is required by the target to load the developer.kdi. Use the following instructions to enable TFTP on the host system:
- In the disable field, type "no" to enable TFTP.
- In the server_args field type "/tftpboot". The following provides a sample tftp file.
Sample tftp configuration file
- Restart the xinetd services:
Network Booting the Target Board
Once the TFTP server is configured and operational on the host, demo Kernel Downloadable Images (KDIs) are downloaded to the PowerCore target board. These demos are located in the directory \demo\demo.<bsp_name> on the distribution CD-ROM.
- Insert the LynxOS Open Development Environment (ODE) CD-ROM into the host system CD-ROM drive and mount it.
- Copy the hello.kdi file from the /demo/demo.pc_680 directory of the distribution CD-ROM into the /tftpboot directory on the TFTP server so that it can be downloaded from there onto the target board.
- Download the demo KDI to the PowerCore target board. At the PowerBoot> prompt on the target, type:
The preceding process can be used to download a custom LynxOS KDI as well as other KDIs supplied with the distribution.
Since the image is in RAM, it is volatile and is erased as soon as the board is reset. To keep a static version of the image, it must be burnt into target board flash memory. The next section details this procedure.
Booting from Flash Memory
The previous procedure is useful for booting a target board quickly. Because the image is loaded into target RAM, it is volatile and is erased as soon as the board is reset.
To keep the image permanently on the target board, it is burned into target flash memory. The following outlines this procedure:
Now, every time the board is reset, boot the image by entering the following command at the PowerBoot> prompt:
The above process can be used to download a custom LynxOS KDI as well as other KDIs supplied with the distribution.
Configuring PXE Netboot Support
Network cards enabled with the Prebooting Execution Environment (PXE) specification provide x86 client systems the ability to boot software images without having to reconfigure hardware or burn EPROMs. PXE-enabled network cards receive network configuration from a LynxOS PXE server via DHCP. Network configurations include local IP address, DNS, and Router information. The client also receives a boot loader file. The boot loader file locates the system serving the kernel image, and downloads it to the client system using tftp.
The following sections describe the steps required to configure the PXE Server and Client systems.
Configuring the PXE Client
Configuration of the PXE client varies depending on the hardware used. Configure the PXE network card according to the specifications provided by the card's manufacturer.
Configuring the PXE Server
Configuring a LynxOS system as a PXE server involves configurations in several areas, enabling DHCP, and enabling TFTP. Use the following sections to configure the system to respond to PXE requests.
Configure DHCP
DHCP must be enabled and running to provide PXE support. Information on configuring DHCP is provided in "DHCP". To configure DHCP to accept requests from PXE clients, it is necessary to specify two options in dhcpd.conf that allow for PXE netbooting:
dhcpd.conf addition for PXE devicesWhere <lynxOS.0> is the filename of the bootloader.
The second option requires a hexadecimal string that must exist on the same line as the option statement with no spaces or line breaks:
dhcpd.conf hexadecimal string additionThe dhcpd daemon must be restarted after editing dhcpd.conf:
Configure tftp
tftp must be enabled and running for the PXE client to receive the kernel image. For information on configuring tftp, see "Enabling TFTP for LynxOS".
Configure Bootloader, KDI, and preboot files
The bootloader file, along with the KDI (Kernel Downloadable Image) and modified preboot files must be accessible via tftp. These files should be placed in the tftp root directory (/tftpboot) as:
Where lynxOS is the basename of the loader and image files. By default, the basename is lynxOS, but the file can be renamed, if desired. However, the file extensions (.0, .1, .2) must be used consistently. If, for example, a user wanted to rename the file to the hostname of the system, it must be renamed hostname.0, hostname.1, and hostname.2.
SCMP Netboot
The Netboot facility for systems using SCMP is very similar to the Ethernet version. The main differences are as follows:
- Boot image sharing is not possible.
- A set of tools is necessary to operate SCMP (see bpconfig, slaveboot, bplane.conf).
Note: Before booting a diskless client over a SCMP network, configure the SCMP network as described in "SCMP".
How Does It Work?
As in Ethernet netboot, a diskless client is booted in two steps. The tools and protocols, however, differ slightly as follows:
- The server downloads the boot-image using the slaveboot command. This automatically starts the client.
- The boot procedure establishes the client as an SCMP network node, determines its root file system server, and then loads the LynxOS kernel.
Configuring the Disk-Based Server
As in Ethernet netboot, the following steps need to be performed to configure the disk-based server:
- Enable TFTP services.
- Export root directory for diskless client via NFS.
- Build diskless client configuration files, the netbootable image, and necessary start-up files.
- Put image and start-up files in a download directory.
See See "Ethernet Netboot" . for an overview of these steps. Then read the following sections for SCMP-specific information.
Building the SCMP Netboot Image
The Makefile in /sys/romkit/scmp_boot builds a clientspecific configuration file for each diskless client. This configuration file is used to build the kernel image and supporting files to be downloaded over the network to the diskless client.
The following figure shows an example SCMP netboot configuration.
Example, SCMP Netboot ConfigurationMultiple clients can be configured within a single build environment by giving them different CPU IDs:
The remainder of the build procedure is identical to the Ethernet version. To create the netboot image (still in /sys/romkit/scmp_boot):
To install the image and client files in the download directory: (/tftpboot by default):
Starting a Diskless Client
On the server, which also must run SCMP, type:
where <hex_IP_addr> is the hexadecimal notation of the client's IP address (e.g. C0010203 for 192.1.2.3) and <client-hostname> is the hostname of the client within the SCMP network (instead of hostname, the IP address in dot-notation can also be used).
If slaveboot is used to copy the image, start the client by typing at the prompt:
where <start_addr.n_hex> is 4020 for Motorola boards and 400020 for PowerCore.
For more information on the slaveboot command, see the slaveboot man page.
Troubleshooting
The client's root (/) file system is not exported with root permissions. For example, if the client's name is flipper, the /etc/exports file should contain:
/clients/server_ppc root=flipper
This can happen if separate machines are used as servers-one for TFTP and one for RARP. This error message indicates that the TFTP-server answered the RARP request of the diskless client. Make sure that only the real server machine is able to reply to a client's RARP request.
If this is not feasible, change the boot script rc that is embedded in rc.sh. Search for the netboot utility call and add the argument s tftpserver. This argument forces the use of a specific server.
Make sure that /etc/bplane.conf file contains IP addresses only (not symbolic hostnames). The /etc/hosts hosts database is downloaded after the initial SCMP configuration If symbolic hostnames are required in /etc/bplane.conf, modify the SCMP kernel specification file to include a hostname database.
Advanced Issues for Ethernet Netboot
The LynxOs Ethernet Netboot build environment supports shared boot-images. This reduces the required disk space and makes kernel updates or changes easy, because they automatically apply to all clients sharing the same boot-image.
Make sure that all of the clients can actually share the same boot image. For example, a boot image cannot be shared between several x86-based systems because they may have different network controllers.
Sharing a Boot Image
Use the following procedure to create shared boot-images.
In this mode of configuration, the Makefile offers slightly different options. Instead of make all and make install, make kdi and make install_kdi are added.
Cleaning Up the Working Directory
During development (or after) the working directory can be cleaned up. The following make command deletes the kernel build subdirectory.
Client Information Files
When running the make config script, it creates a dedicated subdirectory, sysCPUID for each client. In this directory, make config creates the following files:
The make config script keeps each client's configuration information in the netboot.config-CPUID file. This file can be included in shell scripts and in Makefiles. In a shell script, refer to a variable using $varname. In a Makefile, use $(varname).
Adding Files to the RAM Disk
Depending on the architecture of the system, edit the <target>.netboot.spec file and enter files and directories as needed. See the mkimage and mkimage.spec man pages for the command syntax.
More About Kernel-Specific Files
Kernel-specific files contain information or parameters that are special for the kernel being run by the diskless client.
The rc.sh file is a self-extracting script that creates the final version of the file containing the network interface name. The rc.network file is actually copied from rc.network.tmpl and is manipulated by the kernel configuration scripts to enable or disable certain network daemons depending on what modules are configured into the kernel.
More About Client-Specific Files
Client-specific files contain information or parameters that are special for the diskless client. In the standard LynxOS distribution, there are two client-specific files:
The file system description database, /etc/fstab, is built from fstab.sh. This is a self-extracting script that creates the final fstab with the proper server and pathnames.
Adding Client-Specific Files
The following files must be edited to include another clientspecific file:
Config-Netboot
Use the following procedure as an example to modify a hostname database.
- Add a default value for the file in the header section and provide an empty string if there is no default.
- In the Diskless Client Configuration section, add the following code:
Makefile
The TFTPFILES variable contains the list of files needed to install as client-specific files. Add the file name here. If the file is specified it in Config-Netboot, should now be refer to using $(var-name).
tftplist
Use the following procedure to modify the tftplist file.
Provide the file name, the TFTPserver (without the path and IP address), and the final destination in the RAM disk as included by the ramdisk driver.
Other Options
Self-extracting scripts can be used to produce a file that uses one or more of the configuration values. See the rc.sh and fstab.sh files on how to do this. The Makefile contains generic rules how to run those scripts, so only one file needs to be added $(SYSDIR)/myscript to the TFTPFILES variable and a myscript.sh file in the build directory.
Configuring a Second Client
When running make config, the script saves the information that entered in the netboot.configCPUID file. The CPUID file extension distinguishes multiple diskless clients and can be any unique string or number.
![]() LynuxWorks, Inc. 855 Branham Lane East San Jose, CA 95138 http://www.lynuxworks.com 1.800.255.5969 |
![]() |
![]() |
![]() |
![]() |