Cornelius Weiss <nelius[at]von-und-zu-weiss[dot]de>
Released under the terms of the Gnu Free Documentation License
Last updated: Monday, Okt. 6, 2003
This document describes how to install and configure netboot to use
it for booting thin clients in the LTSP environment.
I assume you have the normal LTSP setup with DHCP and TFTP.
NOTE: You need a LTSP-Kernel which supports PXE.
The LTSP kernels since 2.4.22 should do that.
Netboot is like etherboot a free
software for getting computers booting over network. Netboot was the starting
point of etherboot, which is now a mixture of netboot, the BSD bootroms and own additions.
Netboot uses the same boot mechanism as etherboot, and additionally the PXE boot mechanism.
Beside that there may be Network Interface Cards (nics) which are only
implemented in one of the available booting softwares, there are features of
netboot which should be taken into account by choosing the software.
Netboot has a tool to flash EEproms in the nic. If your nic has
an EEprom and is supported, there is no need for extra hardware
to get the code into the EEprom. (Currently Intel EtherExpress ISA network cards and
all 3Com 3C905 versions - the support for cards with a Realtek RTL8139 chip is still untested)
If your nic is not supported in netboot, you can easily get it working
with one of the following drivers:
- Packet Driver Interface (PD)
- Network Driver Interface Specification (NDIS2)
- Universal Network Driver Interface (UNDI)
Netboot acts like PXE, which is the technology used by the newer
build-in nics in motherboards. Booting all clients with PXE makes some
configuration easier due to the system how configuration for
certain clients is done in PXE(see below or www.ltsp.org/README.pxe)
Besides, netboot also supports the "etherboot" way (which is actually
the "netboot" way) of booting, by using the tool mknbi-linux. It's
just that the netboot mknbi-linux uses different command line options
than the one used with etherboot. Therefore, you can also use boot
images, which have been created with the netboot mknbi-linux, on a
system with an etherboot bootrom. But the following text concentrates
on using the PXE features of netboot.
There are several ways of getting the netboot software. Because netboot is
under active development, tarball or cvs may be better than relie on your
distribution's maintainer.
Get the latest tarball from:
ftp://ftp.sourceforge.net/pub/sourceforge/netboot/
Place the tarball in your favorite directory e.g /opt and
unzip the tarball(you may have to become root for this):
# tar xzf netboot-x.y.z.tar.gz
You now will find the software in /opt/netboot-x.y.z.
To compile and install netboot do the following:
# cd /opt/netboot-x.y.z
# ./configure
# make
# make install
In principle, you don't really need to ''make install'', but
if you do so, it makes the configuration lateron much easier.
There is a CVS repository at SourceForge.net which can be checked out through
anonymous (pserver) CVS with the following instruction set.
When prompted for a password for anonymous, simply press the Enter key.
# cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/netboot login
# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/netboot co netboot
NOTE: The CVS version is under current development, and might
contain incomplete code. It is even possible (though unlikely) that the CVS
version does not compile at all.
Check out if netboot is available for your distro. If you are using
Debian just become su and type:
# apt-get install netboot
This is mostly taken out of James McQuillan's<jam[at]ltsp[dot]org> PXE description
As mentioned in the beginning you need to have a PXE kernel. Therefor get:
ftp://ftp.sourceforge.net/pub/sourceforge/ltsp/ltsp_kernel-3.0.11-i386.tgz
or newer.
Normally, for etherboot kernels, the kernel is placed in /tftpboot/lts.
But, for PXE kernels, we create a subdirectory in that location that
has a name that matches the version of the kernel. For example,
in this release of the kernel, we create '/tftpboot/lts/2.4.22-ltsp-1'.
If this subdirectory is present, your kernel installation was successful.
To use the PXE kernel, you will need to set the 'filename'
entry in the /etc/dhcpd.conf file to point to the pxe bootloader.
Here is an example of what you need to add to dhcpd.conf:
host ws001 {
hardware ethernet 00:E0:06:E8:00:84;
fixed-address 192.168.0.1;
filename "/lts/2.4.22-ltsp-1/pxelinux.0";
}
NOTE: There is no need for the nic options in dhcpd.conf. If you need to specify
your nic, you have to do it within the PXE-settings(see below).
NOTE ALSO: Dont forge to restart your dhcp-server :-)
pxelinux.0 starts executing, and it begins looking for
a configuration file. It looks for a subdirectory
called 'pxelinux.cfg', in the same directory where
pxelinux.0 was found.
It first looks for a filename based on the IP address
of the workstation, converted to hex. If it doesn't
find a file by that name, it chops the last hex digit
from the filename. It keeps doing that, until there aren't
any digits left. At that point, it looks for a file called
'pxelinux.cfg/default'.
Therefore, if the IP address of the workstation is
192.168.0.1, then pxelinux.0 looks for a configuration
file in the following order:
pxelinux.cfg/C0A80001
pxelinux.cfg/C0A8000
pxelinux.cfg/C0A800
pxelinux.cfg/C0A80
pxelinux.cfg/C0A8
pxelinux.cfg/C0A
pxelinux.cfg/C0
pxelinux.cfg/C
pxelinux.cfg/default
The format of the config file is very much like an /etc/lilo.conf file.
prompt=0
label linux
kernel bzImage-2.4.22-ltsp-1
append init=/linuxrc rw root=/dev/ram0 initrd=initrd-2.4.22-ltsp-1.gz
Options can be passed to the kernel via the 'append' line.
If you want to modify the parameters for a specific workstation, you
can create a config file specifically for that workstation, by creating
a config file with a name that matches all or part of the IP address of
the workstation, converted to hex.
If you want to modify the parameters for ALL workstations, then you
can simply add your modifications to the 'default' file.
If you want to specify your nic, just append NIC=aaa IO=bbb IRQ=ccc
This is mostly taken out of Gero Kuhlmann's <gero[at]gkminix[dot]han[dot]de> netboot description
The first step is to configure the network card in the diskless client. For
this refer to the manual which came with the network card. After
configuring the network interface write down all necessary hardware parameters
like I/O addresses, memory addresses, interrupt line number or DMA channel
numbers, as you might need this information lateron in the configuration
process. Also make sure, that you enabled PnP and/or PCI support in the client
BIOS setup when you are using an ISA-PnP or PCI network card. The network card
has to be properly configured by the BIOS _before_ the bootrom starts and
_before_ any operating system gets loaded. There is no way of running an
ISA-PnP configuration utility from within the bootrom.
Swich to the directory where you want to have your code in. For example:
# cd /opt/netboot/nics/yournic
Then simply type:
# makerom
to start the bootrom configuration program. It will first
ask you about certain characteristics of the final bootrom. Usually, you
can just accept the default answer by pressing <enter>. For a further
explanation of all the questions asked by makerom refer to it's man page.
makerom will then print you a list of known network cards. If your network
card is in the list of cards known, then you can just enter it's number
if not, see next section. If more than one driver is
available for your card, makerom will print a list of available drivers,
and you can select one. It will then ask you about all necessary hardware
information to provide to the network driver.
makerom will also ask you about any additional modules you want to
install into the bootrom. These modules have to be standard DOS COM-
or EXE-type programs, and can, for example, enhance special features
of the network driver. However note that the total size of the resulting
bootrom image can't be larger than 128kB.
Finally makerom will ask you what kind of output file you want to create.
If you're a proud owner of an EPROM burner, just choose the type which your
understands. Otherwise coose 1.
When it has finished you will find two new files in the current directory:
image.flo - this file can be written onto a floppy using dd
and either one of
image.rom - raw binary image to be burned into an EPROM
image.hex - hex encoded image to be burned into an EPROM
image.flash - ROM image to be used for remote programming of a FlashCard or a Flash EEPROM on the NIC
You should now copy image.flo onto a floppy using
# dd if=image.flo of=/dev/fd0
and then boot your diskless client using this floppy. If you have setup
everything (including your network card) you will see the bootrom code
starting.
If your network card is not in the list printed by makerom, chances are good
that makerom still knows about the card but just could not find a suitable
driver (since netboot is free software, it is not possible to include
commercially available network drivers, for examples). Therefore, you should
first check out the home page of the network card manufacturer, and try to
locate a packet driver or NDIS2 driver (it has to be NDIS2, not any higher
NDIS version, as those are to be used with Windows-95 and above). Packet
drivers are usually named like *.exe or *.com, while NDIS2 drivers usually
use the extension *.sys. If you got a packet driver, copy it into the
directory /usr/local/lib/netboot/netdrvr/pktdrvr. For a NDIS2 driver use
/usr/local/lib/netboot/netdrvr/ndis2 (of course you have to adjust the
paths if you have chosen another installation directory for netboot).
Then run makerom again and check if your network card now appears in the
list of supported cards. If it does not, please tell the author, and
choose 0 which means "unknown network card or unsupported network driver".
In this case makerom will next ask you about which type of network driver
interface you want to use. Select the one which is supported by your
network driver. Then enter the path name of that network driver. You will
then have to enter a command line for a packet driver, or the name
of a protocol.ini file for an NDIS driver:
- Packet driver command line: enter all command line options
required by your packet driver (without the packet driver
file name). Please refer to the documentation which comes
with the driver. Also, most packet drivers print the command
line options they know about when you run them without any
options under DOS. Don't specify any options here which
switch the driver into windows mode or which allow it to
work for diskless systems or bootroms. Those options are
for Novell network bootrom setups only, and are not necessary
for the netboot bootrom.
- NDIS protocol.ini file: NDIS drivers require a resident utility
called protocol manager when run on a DOS system. This protocol
manager is responsible of providing configuration data to the
NDIS driver and connecting it to a protocol stack (like a TCP/IP
stack). The NDIS driver interface of the netboot bootrom contains
a protocol manager simulator, so you don't need the actual protocol
manager program. However, like the real protocol manager, the simu-
lator also needs a protocol.ini file. This file will be parsed by
makerom and included into the bootrom in a compressed binary
format. Since the bootrom knows what protocol stacks are available
within itself, the protocol.ini file for netboot only requires the
information for configuring the NDIS driver. See the makerom man
page for a short description of the format of a protocol.ini
file. It consists of sections, each prepended by a section name
enclosed in square brackets. For the netboot bootrom, only the
section is required which contains the NDIS driver configuration
information. This information is organized in parameter values,
with each parameter on a seperate line. Following a parameter
name comes an equal sign and the parameter value. See the docu-
mentation of your NDIS driver about which parameters it under-
stands. However, at least the drivername parameter has to appear
in every NDIS driver configuration section. For example, a minimal
protocol.ini file for an Accton EN1207D network card should look
like:
[accnd]
drivername = accnd$
The name of the section is unimportant, but the value of the
drivername parameter has to be exactly as required by the NDIS
driver. Some drivers might need additional parameters like I/O
addresses, memory addresses, buffer sizes etc.
The following procedure is like described in the paragraph above.
When everything works as required you can then go on and burn the file image.rom
or image.hex into an EPROM. Please consult the manual of your EPROM burner
how to do this.
If you have an EEProm/Flashrom there is another way of getting the bootrom
code into your nic. First of all you need to run makerom a second time and
choose image.flash as output format. You can now flash the code through your
nic (if your nic is supported), or with the Flash-EPROM card (called FlashCard),
for which you can find a schematic and PCB layout in the netboot package. To
flash the bootrom code do the following:
Copy the file image.flash into a directory which is accessible by TFTP on your server
# cp image.flash /tftboot/lts/
Edit /etc/dhcpd.conf so that the client will load image.flash instead of the normal boot image file.
host ws001 {
hardware ethernet 00:E0:06:E8:00:84;
fixed-address 192.168.0.1;
filename "/lts/image.flash;
#filename "/lts/2.4.22-ltsp-1/pxelinux.0";
}
Remember to send a HUP signal to your DHCP server.
Alternatively you can also set 'filename' to a soft link, and let that link point
either to the normal boot image file, or image.flash in case of programming the
Flash. Then you just need to change the link, and not to edit /etc/dhcpd.conf
Copy the file image.flo onto a bootable floppy
# dd if=image.flo of=/dev/fd0
NOTE: You need to do so, because this is a different one, as the one above!
Check Bios-Setup entries on your client. RAM-shadowing must not be enabled
for your nic rom adresses! Also make shure, that these adresses are marked non-cacheable!
Boot your client using this floppy. This will start the bootrom
code on the floppy, which will then load the image.flash file
and programme it's contents into the FlashCard.
Restore the old 'filename' entry in your /etc/dhcpd.conf file on the
server or let the soft link point back to the original boot
image file. Again, remember to send a HUP signal to your DHCP server.
2003-10-16