What is Netboot?
Netboot is a set of tools that allows you to boot a Intel compatible
CPU off of a network, provided the necessary infrastructure of network
cards , DHCP, TFTP servers and network connectivity etc. are installed
and properly configured. To accomplish this the computer has to be
able to boot via an EPROM socket on a network card or a boot floppy disk,
which contains the Netboot bootrom code. The Netboot bootrom will
initalize the network card, perform a BOOTP request, configure the
IP address, gateway, TFTP server, bootimage location etc. Netboots
bootrom then proceeds to download a netbootable image from a TFTP server,
places the netbootable image it into memory and then boots the operating system. The netbootable image is a specially packaged operating system
(Linux, DOS, etc) that is created with the mknbi-dos or mknbi-linux utilities
which Netboot also provides.
What can you use it for?
The following list shows just a few examples of what Netboot
can be used for:
If you didn't modify the ./configure prefix, the default installation step will create a directory and install most of the files in /usr/local/lib/netboot Executables get installed into /usr/local/bin and the man pages to /usr/local/man. The neboot configuration file (netboot.config) is installed in /usr/local/etc.#./configure
#make clean
#make
#make install
To create a bootrom run the command:When selecting which output file type for the rom image to be created, an image.flo (floppy image) is always created regardless of which output file type you select. Another file is also created, image.rom (EPROM image). The image.rom file is specific to the type of EPROM burner you are using, so select to appropriate one for you burner.
# makerom
Below is an abbreviate sample listing of what to expect.
Bootrom configuration program, Version 0.9.8 (netboot)
Copyright (C) 1995-2003 G. Kuhlmann
Build bootrom for a processor older than 386 (y/n) [no] ?
Include support for old-style menus (not recommended) (y/n) [no] ?
Do you want the BIOS to look for boot disks (y/n) [no] ?
Do you want the bootrom to ask before booting from network (y/n) [no] ?
List of known network cards:
(0) unknown card with user supplied driver
(1) 3Com 3C501 Etherlink ISA
(...)
(131) Znyx ZX312/314 EtherAction PCI
Select a network card (-1 to review the list) [-1]: 91
You selected: Linksys EtherFast PCI
Do you want to use the packet driver debugger (y/n) [no] ?
Do you want to specify an additional program (y/n) [no] ?
Available output file types for rom image:
(1) Raw binary
(2) Intel hex
(3) Motorola hex
(4) Tektronix hex
(5) Image for programming a FlashCard across the network
Select the format you wish to use [1]:
# lspci -nCommand line options are describe in a "README" file that is included with you packet driver. This is to provide specific initialization options for your network card. If you don't have a "README" file you can determine what the command line options are by running the packet driver on a DOS machine. This will give you a brief listing of options for that packet driver. Make sure you don't select any options that specify "Windows". Sometimes the documentation for the packet driver is not very specific so a lot of trial and error is needed to get the correct configuration.
00:00.0 Class 0600: 8086:7190 (rev 02)
00:01.0 Class 0604: 8086:7191 (rev 02)
00:0f.0 Class 0200: 1317:0985 (rev 11)
00:14.0 Class 0601: 8086:7110 (rev 02)
00:14.1 Class 0101: 8086:7111 (rev 01)
00:14.2 Class 0c03: 8086:7112 (rev 01)
00:14.3 Class 0680: 8086:7113 (rev 02)
01:00.0 Class 0300: 1002:4742 (rev 5c)
So in the above example the 1317 is the Vendor ID and 0985 is the PCI ID.
To create a bootrom run the command:When selecting which output file type for the rom image to be created, an image.flo (floppy image) is always created regardless of which output file type you select. Another file is also created, image.rom (EPROM image). The image.rom file is specific to the type of EPROM burner you are using, so select to appropriate one for you burner.
# makerom
Below is an abbreviate sample listing of what to expect.
Bootrom configuration program, Version 0.9.8 (netboot)
Copyright (C) 1995-2003 G. Kuhlmann
Build bootrom for a processor older than 386 (y/n) [no] ?
Include support for old-style menus (not recommended) (y/n) [no] ?
Do you want the BIOS to look for boot disks (y/n) [no] ?
Do you want the bootrom to ask before booting from network (y/n) [no] ?
List of known network cards:
(0) unknown card with user supplied driver
(1) 3Com 3C501 Etherlink ISA
(...)
(131) Znyx ZX312/314 EtherAction PCI
Select a network card (-1 to review the list) [-1]: 0
Known network card bus types:
(1) ISA bus (including PnP)
(2) EISA bus
(3) MCA bus
(4) PCI bus
Select the bus type of your network card [1]: 4
Enter PCI vendor ID (hex): 1317
Enter PCI device ID (hex): 0985
The following network driver interfaces are available:
(1) Packet Driver Interface (PD)
(2) Network Driver Interface Specification (NDIS)
(3) Universal Network Driver Interface (UNDI)
Select the interface you wish to use [1]: 1
Enter path of packet driver ('*' for directory listing): *
Contents of /usr/local/lib/netboot/netdrvr/pktdrvr:
3c501.com 3c503.com 3c505.com
3c507.com 3c509.com 3c523.com
dc21x4.com de600.com depca.com
e100bpkt.com e10ppkt.com ee10pkt.com
epropkt.com exos205.com exp16.com
hppclan.com hppclanp.com lan595.com
lne100tx.com ne1000.com ne2.com
ne2000.com ne2100.com smc_wd.com
Enter path of packet driver ('*' for directory listing): /usr/local/lib/netboot/netdrvr/pktdrvr/lne100tx.com
Enter command line for packet driver [0x%S]: -a 0x60
Enter minimum execution size in bytes (-1 = default) (decimal): -1
Enter maximum execution size in bytes (-1 = default) (decimal): -1
Do you want to use the packet driver debugger (y/n) [no] ?
Do you want to specify an additional program (y/n) [no] ?
Available output file types for rom image:
(1) Raw binary
(2) Intel hex
(3) Motorola hex
(4) Tektronix hex
(5) Image for programming a FlashCard across the network
Select the format you wish to use [1]: 1
sample PROTOCOL.INI fileAfter you get the the PROTOCOL.INI configured, install it into the following directory /usr/local/lib/netboot/netdrvr/ndis2.
[lne100tx]
drivername = LNE100$
To create a bootrom run the command:When selecting which output file type for the rom image to be created, an image.flo (floppy image) is always created regardless of which output file type you select. Another file is also created, image.rom (EPROM image). The image.rom file is specific to the type of EPROM burner you are using, so select to appropriate one for you burner.
# makerom
Below is an abbreviate sample listing of what to expect.
Bootrom configuration program, Version 0.9.8 (netboot)
Copyright (C) 1995-2003 G. Kuhlmann
Build bootrom for a processor older than 386 (y/n) [no] ?
Include support for old-style menus (not recommended) (y/n) [no] ?
Do you want the BIOS to look for boot disks (y/n) [no] ?
Do you want the bootrom to ask before booting from network (y/n) [no] ?
List of known network cards:
(0) unknown card with user supplied driver
(1) 3Com 3C501 Etherlink ISA
(...)
(131) Znyx ZX312/314 EtherAction PCI
Select a network card (-1 to review the list) [-1]: 0
Known network card bus types:
(1) ISA bus (including PnP)
(2) EISA bus
(3) MCA bus
(4) PCI bus
Select the bus type of your network card [1]: 4
Enter PCI vendor ID (hex): 1317
Enter PCI device ID (hex): 0985
The following network driver interfaces are available:
(1) Packet Driver Interface (PD)
(2) Network Driver Interface Specification (NDIS)
(3) Universal Network Driver Interface (UNDI)
Select the interface you wish to use [1]: 2
Enter path of NDIS driver ('*' for directory listing): /usr/local/lib/netboot/netdrvr/ndis2/LNE100.DOS
Enter minimum execution size in bytes (-1 = default) (decimal): -1
Enter maximum execution size in bytes (-1 = default) (decimal): -1
Enter path name of PROTOCOL.INI file ('*' for directory listing): /usr/local/lib/netboot/netdrvr/ndis2/PROTOCOL.INI
Do you want to specify an additional program (y/n) [no] ? n
Available output file types for rom image:
(1) Raw binary
(2) Intel hex
(3) Motorola hex
(4) Tektronix hex
(5) Image for programming a FlashCard across the network
Select the format you wish to use [1]: 1
#dd if=image.flo of=/dev/fd0This will transfer the image to the floppy drive. To test this configuration insert the floppy into a PC and boot/reboot it. Make sure that the PC BIOS is set to boot from floppy first. If all is successful your computer should display something similar to this.
Netboot v0.9.8, Copyright (C) 1995-2003 G. Kuhlmann
BIOS options: none
Linksys LNE100TX Fast Ethernet Adapter Packet Driver v 1.06 (991217)
Copyright (C) 2000 Linksys Group All Rights Reserved
Performing Automatic Media Detection...
Switching to 100TX Full Duplex...
My Options
Packet Driver Interrupt Number 0x60
I/O Port 0xFC00
Hardware Interrrupt Number 10
Medium Type is 100baseTx Full Duplex
My Ethernet Address is 00:04:5A:4A:4D:1C
Packet Driver is loaded at segment 9721
Found packet driver at int 60, irq 0A
BOOTP: Sending request (press ESC to abort):
Local IP: 192.168.0.14
Server IP: 192.168.0.10
Gateway IP: 192.168.0.1
Loading /bootImage.nbi
Starting Image...
Make sure the bzImage and the compressed ramdisk (compressed route file system) image file are in the same directory.
Issue the command below.
# mknbi-linux -x -d ram -i rom -r initrd.gz -k bzImage -o bootImage.nbi
-a String to append to the end of the kernel command line. ex. -a ram_disk=24576 if you want to set the ramdisk size .
-d Tells were to load the bootable image, root directory directive either use rom, kernel ram[0-9]. initrd, directory name
-i For NFS root mounting, define client and server IP addresses either use rom, kernel or define it yourself.
-k Is the pathname and kernel file that you want tagged.
-o This is the name of the outfile for the newly tagged image.
-r This is the ramdisk image file that is the root file system.
-x This make the tagging verbose the more x's the more verbose, one x is enough.
After this file is created copy the bootImage.nbi file into your TFTP
directory. In this example copy it to /tftpboot directory which is
the root for the TFTP server.
# rpm -ivh tftp-server-0.32-4.i386.rpmNow create a directory for the TFTP server by issuing the command
# mkdir /tftpbootRedHat is configure to start TFTP under the xinitd and the configuration file is /etc/xinitd.d/tftp sample below:
# default: offThe default RedHat configuration has an -s /tftpboot in the server_args line this provides a chrooted feature for TFTP. This means that TFTP server will treat /tftpboot directory as its root directory. So any put or get command to the TFTP server will not require you to reference /tftpboot as you will see later in the dhcpd.conf configuration file. However you must copy the netbootable image into the TFTP server root which is the /tftpboot directory in this example. To get TFTP to start listening (port 69) issue the command:
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = yes
per_source = 11
cps = 100 2
}
# chkconfig tftp onVerify that it is turned on by issuing the command
# chkconfig --list tftpThe RedHat RPM for TFTP is started under the xinetd daemon, so to get TFTP started restart the xinetd service by issuing the command
# service xinetd restartThis should now restart xinetd which should also start TFTP. Verify that TFTP is running by issuing the command:
or
# /etc/init.d/xinetd restart
# netstat -lnSample listing of netstat below, look for port 69.
# netstat -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:515 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
udp 0 0 0.0.0.0:32768 0.0.0.0:*
udp 0 0 0.0.0.0:13 0.0.0.0:*
udp 8680 0 0.0.0.0:68 0.0.0.0:*
udp 0 0 0.0.0.0:69 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
# rpm -ivh dhcp-3.0pl1-23.i386.rpm
Configuration
There is a sample dhcpd.conf sample installed in the directory /usr/share/doc/dhcp-
version number/
However that file is not quite what you need for remote booting, below
is a sample file. Your dhcpd.conf file needs to be copied into the
/etc directory.
# Sample configuration file for ISCD dhcpdStart the DHCP daemon by issuing the command
#
# Make changes to this file and copy it to /etc/dhcpd.conf
#
default-lease-time 21600;
max-lease-time 21600;
ddns-update-style interim;
ignore client-updates;
not authoritative;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.15;
option domain-name "domainname.com"; # The domain name of the network used for hostname resolution
#option root-path "192.168.0.10:/opt/ltsp/i386"; # NFS Root Path for the client
#option tftp-server-name 192.168.0.10; # This is if the TFTP server is located on a different server than DHCP
shared-network WORKSTATIONS {
subnet 192.168.0.0 netmask 255.255.255.0 {
}
}
group {
use-host-decl-names on;
#option log-servers 192.168.0.254;
host ws001 {
hardware ethernet 00:00:A0:0A:02:5E; # The Actual MAC address of the NIC
fixed-address 192.168.0.14; # The reserved address for the above MAC address
filename "/bootImage.nbi"; # The location
## option option-128 e4:45:74:68:00:00; # This is NOT a MAC address
## option option-129 "NIC=ne IO=0x300";
# service dhcpd startThis should now start DHCPd. Verify that DHCPd is running by issuing the command:
or
# /etc/init.d/dhcpd start
# netstat -lnSample listing of netstat below, look for port 67
# netstat -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:515 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
udp 0 0 0.0.0.0:32768 0.0.0.0:*
udp 0 0 0.0.0.0:13 0.0.0.0:*
udp 0 0 0.0.0.0:67 0.0.0.0:*
udp 0 0 0.0.0.0:68 0.0.0.0:*
udp 0 0 0.0.0.0:69 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
raw 0 0 0.0.0.0:1 0.0.0.0:*
Windows 2000 DHCP server can also be utilized to provide the necessary options to a Netboot client. Below is a table of options.
Option Name Vendor Value Class
003 Router Standard 192.168.0.1 None
006 DNS Servers Standard 192.168.0.15 None
015 DNS Domain Name Standard domainname.com None
028 Broadcast Address Standard 192.168.0.255 None
066 Boot Server Host Name Standard tftp.domainname.com None
067 Bootfile Name Standard /bootImage.nbi None
Created automatically from source file HOWTO.html by getdoc on Fri Nov 22 20:02:45 UTC 2024