Skip to content

Commit 0720019

Browse files
kanwhoanyov
authored andcommitted
pxe 1.3
1 parent af6c097 commit 0720019

16 files changed

+3281
-1298
lines changed

Changes

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
Aug 30 2002 Tim Hurman ([email protected])
2+
pxe 1.3 released.
3+
Made debuging a command line switch.
4+
Converted code to use namespaces.
5+
16
Oct 26 2000 Tim Hurman ([email protected])
27
pxe 1.2 released.
3-
OpenBSD support fixed. Still a small problem due to OpenBSD's interface arrangement. Virtual interfaces have the same name as the main interface.
8+
OpenBSD support fixed. Still a small problem due to OpenBSD's interface
9+
arrangement. Virtual interfaces have the same name as the main interface.
410
configure script made, new install instructions.
511

612
Oct 25 2000 - Tim Hurman ([email protected])

INSTALL

+83-44
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,115 @@
11
PXE daemon install
22
==================
33

4-
1) If you have a bootp/dhcp daemon installed and running, skip to step 2. If you have not, download the boot daemon from a sunsite mirror, it is under:
4+
1) If you have a bootp/dhcp daemon installed and running, skip to step 2. If
5+
you have not, download the boot daemon from a sunsite mirror, it is under:
56
/pub/Linux/system/network/boot.net/bootpd-2.4.tar.gz
67
eg:
78
ftp://src.doc.ic.ac.uk//Mirrors/sunsite.unc.edu/pub/Linux/system/network/boot.net/bootpd-2.4.tar.gz
89

910
Follow the install instructions in the bootp package.
1011

11-
2) If you have downloaded Intel/Redhat's PXE packages, or have Redhat (I pity you :) installed skip to step 3. Otherwise download the package from Redhat or any mirror, it should be under:
12-
ftp://ftp.redhat.com/pub/current/SRPMS/i386/SRPMS/pxe-0.1-20.src.rpm
13-
14-
Extract this package and copy the linux.0 boot image somewhere else. This also contains the linux.0 source if you wish to recompile it. The linux.0 should reside in /tftpboot/X86PC/UNDI/redhat-linux/linux.0 - or something like that.
15-
16-
3) Uninstall the Intel/Redhat PXE package (unless you have good reason not to, and know what you are doing), this will avoid confusion later.
17-
18-
4) Run the configure script in this directory.
19-
There are several option that can be used in this:
12+
2) Download and install PXELINUX from here: http://syslinux.zytor.com/pxe.php
13+
My setup for this looks something like this:
14+
in /tftpboot/X86PC/linux I have the PXELINUX bootstrap (linux.0)
15+
and the kernel I am going to boot from (linux.1)
16+
Make a directory here called pxelinux.cfg, inside are a series of files
17+
which are named after the hex IP addresses of the machines. ie:
18+
/tftpboot/X86PC/linux/pxelinux.cfg/C0A8C8F1
19+
which contains:
20+
label linux
21+
kernel bzImage
22+
append ip=auto
23+
24+
You may also need to update your tftp daemon for this as PXELINUX requires
25+
an options not present in many versions eg the Solaris tftpd. Details of
26+
this are on the PXELINUX page.
27+
28+
3) Run the configure script in this directory.
29+
There are several option that can be used in this:
2030
--disable-setuid => Disable the daemon from setuiding to a low privilaged user.
2131
--with-setuid=user => Set the username to setuid to.
2232
--with-config=file => Set the location of the config file.
2333
--with-log=file => Set the location of the log file.
24-
--enable-debug => Set debugging mode. The daemon will not fork into the backgroud, and will print the contents of all packets received and sent.
34+
--enable-debug => Set debugging mode. The daemon will not fork into the
35+
backgroud, and will print the contents of all packets
36+
received and sent.
2537

2638

27-
5) Check config.h to make sure of things, most things should be ok, however you may wish to change the location of the log file and/or the configuration file.
39+
4) Check config.h to make sure of things, most things should be ok,
40+
however you may wish to change the location of the log file and/or the
41+
configuration file.
2842

29-
6) Type 'make' in this directory. If this fails, please send me an email and I will try and fix it, however it is most likely to be a header clash or something.
43+
5) Type 'make' in this directory. If this fails, please send me an email and
44+
I will try and fix it, however it is most likely to be a header clash or
45+
something.
3046

31-
7) Type 'make install', this will install the pxe daemon and it's config file.
47+
6) Type 'make install', this will install the pxe daemon and it's config file.
3248

33-
8) Edit /etc/pxe.conf and set up the appropriate entries.
34-
set the interface line to be the interface on the machine to bind to. If you enter an invalid interface, the daemon will bind to all available interfaces.
49+
7) Edit /etc/pxe.conf and set up the appropriate entries.
50+
set the interface line to be the interface on the machine to bind to. If
51+
you enter an invalid interface, the daemon will bind to all available
52+
interfaces.
3553

36-
It is mandatory to set the default_address address to the default interface of the machine. This is because the PXE protocol is a bit dumb, it sends multicast packets to the bootserver, then uses the server address in the bootp server field for the tftp transfer procedure. 3Com cards are particularly prone to this stupidity.
54+
It is mandatory to set the default_address address to the default interface
55+
of the machine. This is because the PXE protocol is a bit dumb, it sends
56+
multicast packets to the bootserver, then uses the server address in the
57+
bootp server field for the tftp transfer procedure. 3Com cards are
58+
particularly prone to this stupidity.
3759

38-
I have not fully tested broadcast capability as yet, there may be some problems with it, however PXE prefers multicast over broadcast, and that has been tested.
60+
I have not fully tested broadcast capability as yet, there may be some
61+
problems with it, however PXE prefers multicast over broadcast, and that
62+
has been tested.
3963

40-
Most of the other directives are fairly self-explanatory, and you should not need to change them. The menus however do need to be set up.
64+
Most of the other directives are fairly self-explanatory, and you should not
65+
need to change them. The menus however do need to be set up.
4166

42-
As the config file stands, the first service is a local boot, and the second is a network boot/remote install. The format of the service line is:
67+
As the config file stands, the first service is a local boot, and the second
68+
is a network boot/remote install. The format of the service line is:
4369
service=<CSA>,<min layer>,<max layer>,<basename>,<menu entry>
4470

45-
The CSA is one of several Client System Architectures, most PXE platforms are X86, so this should be left as 'X86PC' however other platforms are supported by inserting the appropriate CSA.
71+
The CSA is one of several Client System Architectures, most PXE platforms are
72+
X86, so this should be left as 'X86PC' however other platforms are supported
73+
by inserting the appropriate CSA.
4674

47-
The min and max layers are the starting and finishing layers in the boot protocol, most commonly these are:
75+
The min and max layers are the starting and finishing layers in the boot
76+
protocol, most commonly these are:
4877
Layer 0: The bootstrap code.
4978
Layer 1: The kernel.
50-
Layer 2: The initial RAM disk.
5179

52-
To use all three of these layers, the min should be set to 0 and the max to 2.
80+
To use a ramdisk, please refer to the PXELINUX config.
5381

54-
The basename defines how the filename is built, see below for an example. The Menu entry is the string that should be printed on screen when a menu is requested.
82+
The basename defines how the filename is built, see below for an example.
83+
The Menu entry is the string that should be printed on screen when a menu
84+
is requested.
5585

56-
There is one special case for all architectures, when the basename is "local" the layers will be ignored and a local boot performed.
86+
There is one special case for all architectures, when the basename is
87+
"local" the layers will be ignored and a local boot performed.
5788

5889
E.G.:
59-
service=X86PC,0,2,linux,Linux install
90+
service=X86PC,0,1,linux,Linux install
6091

61-
This defines a service for an X86 PC, starting at layer 0 and ending at layer 2. The basename (filenames below) builds the filename, and "Linux Install" will be displayed on the boot menu.
92+
This defines a service for an X86 PC, starting at layer 0 and ending at
93+
layer 1. The basename (filenames below) builds the filename, and
94+
"Linux Install" will be displayed on the boot menu.
6295

6396
Files requested:
6497
/tftpboot/X86PC/linux/linux.0
6598
/tftpboot/X86PC/linux/linux.1
66-
/tftpboot/X86PC/linux/linux.2
6799

68-
When more than one service is configured, the menu order is implied by the service description order. If no key is pressed within the prompt_timeout time, the first item from the services list will be selected.
100+
When more than one service is configured, the menu order is implied by the
101+
service description order. If no key is pressed within the prompt_timeout
102+
time, the first item from the services list will be selected.
69103

104+
8) Before you are ready to go, make sure you have the following lines in
105+
your inetd.conf file (or equivalent):
70106

71-
9) Before you are ready to go, make sure you have the following lines in your inetd.conf file (or equivalent):
72-
73-
in /etc/bootptab, make sure every system you intend to boot via PXE has the line
107+
in /etc/bootptab, make sure every system you intend to boot via PXE has
108+
the line
74109
:T60="PXEClient":\
75-
in it (This is case sensitive). Otherwise the PXE ROM on the network card will not use the PXE protocol. Also make sure the bootptab has a correctly set tftp base directory and has no boot filename.
110+
in it (This is case sensitive). Otherwise the PXE ROM on the network card
111+
will not use the PXE protocol. Also make sure the bootptab has a correctly
112+
set tftp base directory and has no boot filename.
76113

77114
#########
78115
#tftpd
@@ -81,12 +118,16 @@ tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tft
81118
bootps dgram udp wait root /usr/local/sbin/bootpd bootpd -i -c /tftpboot /etc/bootptab
82119
#########
83120

84-
If you change your inetd.conf file, make sure to send inetd a HUP signal. If you do not understand how to so this, please read the appropriate man pages/One of the Linux HOWTOs.
121+
If you change your inetd.conf file, make sure to send inetd a HUP signal.
122+
If you do not understand how to so this, please read the appropriate man
123+
pages/One of the Linux HOWTOs.
85124

86125
And /etc/services:
87126
pxe 4011/udp # pxe
88127

89-
Also make sure you have a route specified for multicast packets, or a default route. Solaris automatically defines a route for multicast packets however you may need to change the binding interface.
128+
Also make sure you have a route specified for multicast packets, or a default
129+
route. Solaris automatically defines a route for multicast packets however
130+
you may need to change the binding interface.
90131

91132
to enable a default route, as root type
92133
route add default <interface>
@@ -95,16 +136,14 @@ where <interface> is the name of your interface, eg eth0, le0, hme0, ...
95136
on some versions of linux you can type to route multicast packets
96137
route add 224.0.0.0 netmask 240.0.0.0 dev <interface>
97138

98-
10) I suggest you make a minimalist kernel and ramdisk if needed, as the PXE protocol has a maximum limit on tftp packets it can transfer. I am currently working on a minimalist distribution based upon Slackware. This can fit onto a 16M compact flash card and is designed to be very secure, essentially based on read only file systems etc. The final goal being fast install web-servers/encoders etc.
99-
100-
If you do not understand how to do this, Read the Kernel-HOWTO, available under most distributions of linuxdoc.org.
101-
102-
11) as root type "pxe" (otherwise the daemon will not set UID to another user.
139+
9) as root type "pxe" (otherwise the daemon will not set UID to another user.
103140

104-
12) go play.
141+
10) go play.
105142

106143

107-
If you have problems with this daemon, please make sure it is repeatable, and send any core dumps/packet dumps to me. If you compiled the daemon without debugging, please don't send the core dumps.
144+
If you have problems with this daemon, please make sure it is repeatable,
145+
and send any core dumps/packet dumps to me. If you compiled the daemon
146+
without debugging, please don't send the core dumps.
108147

109-
Tim Hurman. Oct 2000
148+
Tim Hurman. Nov 2002
110149

Makefile.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
CC = g++
2-
CFLAGS = -g -ggdb -Wall
1+
CXX = @CXX@
2+
CXXFLAGS = @CXXFLAGS@
33
LDFLAGS = @LDFLAGS@ @LIBS@
44

55
EXECS = pxe
@@ -25,10 +25,10 @@ distclean: clean
2525
/bin/rm -f config.cache autoconf.h config.log Makefile config.status
2626

2727
pxe: $(OBJS)
28-
$(CC) $(OBJS) -o pxe $(LDFLAGS)
28+
$(CXX) $(OBJS) -o pxe $(LDFLAGS)
2929

3030
.cc.o:
31-
$(CC) $(CFLAGS) -c $*.cc
31+
$(CXX) $(CXXFLAGS) -c $*.cc
3232

3333
install: all
3434
$(CP) pxe /usr/sbin/

README

+5-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
PXE daemon readme
22
=================
33

4-
This is an implementation of the Intel PXE bootstrap protocol. This protocol is roughtly speaking based upon the bootp protocol, and currently needs the bootp daemon to work.
4+
This is an implementation of the Intel PXE bootstrap protocol. This protocol
5+
is roughtly speaking based upon the bootp protocol, and currently needs the
6+
bootp daemon to work.
57

68
The bootp daemon can be found on any sunsite.unc mirror, under
79
/pub/Linux/system/network/boot.net/bootpd-2.4.tar.gz
810

9-
It is also recommended that you obtain the Intel/Red Hat PXE package. This is because it contains a bootstrap program that interacts with the PXE ROM on the client, and loads the kernel. I don't have enough x86 hardware knowedge to make on of these. However, <plead> if anyone feels up to the task, feel free to contact me </plead>. There is a PXE ROM API spec to make life a little easier.
10-
11-
The Intel/Red Hat PXE package can be found at
12-
ftp://ftp.redhat.com/pub/current/SRPMS/i386/SRPMS/pxe-0.1-20.src.rpm
13-
However this will *only* work on X86 Linux machines.
14-
15-
To install the PXE daemon , please follow the directions in the INSTALL file.
16-
11+
To obtain a bootstrap (code that prepares the machine for a kernel) please
12+
look at: http://syslinux.zytor.com/pxe.php
1713

1814
Licence info
1915
============
@@ -33,12 +29,5 @@ along with this program; if not, write to the Free Software
3329
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3430

3531

36-
37-
Thanks/Contributors
38-
===================
39-
With thanks to BBC Internet Services, for hardware and support, during the development of this software.
40-
41-
42-
4332
October 24, 2000
4433
Tim Hurman ([email protected])

autoconf.h.in

-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@
5757
/* location of the pxe daemon log file */
5858
#define PXELOGFILE "/tmp/pxe.log"
5959

60-
/* should the daemon run in debug mode */
61-
#undef DEBUG
62-
6360
/******************************************************************************/
6461
/* should not need to change from here onwards */
6562

0 commit comments

Comments
 (0)