[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Hello, all!



On Mon, 13 Jan 2003, Paul Iadonisi wrote:

> Hello!
>   My name is Paul Iadonisi and I am trying to put together a cheap turnkey
> network for schools in my vicinity (Northeast -- Masschusetts and New

Hi, Paul -- you'll recognize lots of the names of geeky/techie 
folk here <smile>

> Express Pro 100 network cards.  These cards appear to be PXE enabled, so
> I start digging into what's necessary to do remote booting with PXE.
>   Aye, aye, aye, I thought it would be simple.  Ouch.  Actually, I think
> I have gotten pretty far, but my client gets stuck on the tftp transfer.

> I'm not using a pxe server, but it seems that ISC dhcp-3.0p1 can actually
> take the place of a pxe server.

By that, the nomenclature is to provide the name of the
'next-server', and the path to the binary to transfer.  The
PXE client hardware infers some names to try to use. There are
some rather tight size limitations, and the HPA implementation 
is widely used.

This is a snapshot which I am using in RH beta testing at the 
moment with the public Phoebe beta candidate:

[herrold ftp pxe]$ pwd ; ls -alR
/tftpboot/rhl81/pxe
.:
total 3499
drwxr-xr-x    3 root     root         1024 Jan  6 18:16 .
drwxr-xr-x    3 root     root         1024 Jan  6 18:01 ..
-rw-r--r--    1 root     root      2684650 Jan  6 18:04 initrd.img
-rw-r--r--    1 root     root         9364 Jan  6 18:01 pxelinux.bin
drwxr-xr-x    2 root     root         1024 Jan  6 18:18 pxelinux.cfg
-rw-r--r--    1 root     root       866614 Jan  6 18:04 vmlinuz

./pxelinux.cfg:
total 10
drwxr-xr-x    2 root     root         1024 Jan  6 18:18 .
drwxr-xr-x    3 root     root         1024 Jan  6 18:16 ..
lrwxrwxrwx    1 root     root            7 Jan  6 18:14 0A -> default
lrwxrwxrwx    1 root     root            7 Jan  6 18:03 C0A800 -> default
-rw-r--r--    1 root     root          243 Jan  6 18:18 default
-rwxr-xr-x    1 root     root         4008 Jan  6 18:03 gethostip
-rw-r--r--    1 root     root          277 Jan  6 18:04 README
-r--r--r--    1 root     root          149 Jan  6 18:04 TRANS.TBL
[herrold ftp pxe]$ cat pxelinux.cfg/default
default linux
serial 0,38400n8
label linux
  kernel vmlinuz
    append ksdevice=eth0 local_ramdisk=1 initrd=initrd.img network
# 1 root=/dev/ram0 rw init=/linuxrc initrd=initrd.lts
#  append root=/dev/ram0 rw init=/linuxrc initrd=initrd.lts
[herrold ftp pxe]$

pxelinux.bin is small, and just smart enough to look for a
file, based on its IP address, in HEX form, which leads it to
eventually read:

   pxelinux.cfg/default

which points back to vmlinuz and initrd.img (big fat files), 
to pull across and boot from.

Here is a /var/log/messages trace, turning on a Intel PXE
client, to start the install process -- basically the same as 
the k12ltsp boot process:

Jan 13 14:46:27 ftp dhcpd: DHCPACK on 10.250.0.89 to 
	00:08:74:e8:cf:95 (Delllaptop) via eth0
Jan 13 17:44:54 ftp sshd(pam_unix)[3274]: session opened for 
	user herrold by (uid=500)
Jan 13 17:52:05 ftp dhcpd: DHCPDISCOVER from 00:02:b3:96:6c:d5 
	via eth0
Jan 13 17:52:06 ftp dhcpd: DHCPOFFER on 10.250.0.94 to 
	00:02:b3:96:6c:d5 via eth0
Jan 13 17:52:06 ftp dhcpd: Wrote 0 deleted host decls to 
	leases file.
Jan 13 17:52:06 ftp dhcpd: Wrote 0 new dynamic host decls to 
	leases file.
Jan 13 17:52:06 ftp dhcpd: Wrote 7 leases to leases file.
Jan 13 17:52:06 ftp dhcpd: DHCPREQUEST for 10.250.0.94 
	(10.250.0.253) from 00:02:b3:96:6c:d5 via eth0
Jan 13 17:52:06 ftp dhcpd: DHCPACK on 10.250.0.94 to 
	00:02:b3:96:6c:d5 via eth0
Jan 13 17:52:06 ftp tftpd[3334]: Trivial FTP server started (0.6)
Jan 13 17:52:06 ftp tftpd[3334]:   started by inetd
Jan 13 17:52:06 ftp tftpd[3334]:   logging level: 7
Jan 13 17:52:06 ftp tftpd[3334]:   directory: /tftpboot//
Jan 13 17:52:06 ftp tftpd[3334]:   user: nobody.nogroup
Jan 13 17:52:06 ftp tftpd[3334]:   log file: syslog
Jan 13 17:52:06 ftp tftpd[3334]:   server timeout: 300
Jan 13 17:52:06 ftp tftpd[3334]:   tftp retry timeout: 5
Jan 13 17:52:06 ftp tftpd[3334]:   maximum number of thread: 100
Jan 13 17:52:06 ftp tftpd[3334]:   option timeout:   enabled
Jan 13 17:52:06 ftp tftpd[3334]:   option tzise:     enabled
Jan 13 17:52:06 ftp tftpd[3334]:   option blksize:   disabled
Jan 13 17:52:06 ftp tftpd[3334]:   option multicast: enabled
Jan 13 17:52:06 ftp tftpd[3334]:      address range: 
	239.255.0.0-255
Jan 13 17:52:06 ftp tftpd[3334]:      port range:    1753
Jan 13 17:52:06 ftp tftpd[3336]: Serving 
	/rhl81/pxe/pxelinux.bin to 10.250.0.94:2070
Jan 13 17:52:06 ftp tftpd[3336]: tsize option -> 9364
Jan 13 17:52:06 ftp tftpd[3337]: Serving 
	/rhl81/pxe/pxelinux.bin to 10.250.0.94:2071
Jan 13 17:52:06 ftp tftpd[3336]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3337]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3338]: Serving 
	/rhl81/pxe/pxelinux.cfg/0AFA005E to 10.250.0.94:57217
Jan 13 17:52:06 ftp tftpd[3338]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA005E not found
Jan 13 17:52:06 ftp tftpd[3338]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3339]: Serving 
	/rhl81/pxe/pxelinux.cfg/0AFA005 to 10.250.0.94:57090
Jan 13 17:52:06 ftp tftpd[3339]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA005 not found
Jan 13 17:52:06 ftp tftpd[3339]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3340]: Serving 
	/rhl81/pxe/pxelinux.cfg/0AFA00 to 10.250.0.94:56963
Jan 13 17:52:06 ftp tftpd[3340]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA00 not found
Jan 13 17:52:06 ftp tftpd[3340]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3341]: Serving 
	/rhl81/pxe/pxelinux.cfg/0AFA0 to 10.250.0.94:56836
Jan 13 17:52:06 ftp tftpd[3341]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA0 not found
Jan 13 17:52:06 ftp tftpd[3342]: Serving 
	/rhl81/pxe/pxelinux.cfg/0AFA to 10.250.0.94:56709
Jan 13 17:52:06 ftp tftpd[3341]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3342]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA not found
Jan 13 17:52:06 ftp tftpd[3343]: Serving 
	/rhl81/pxe/pxelinux.cfg/0AF to 10.250.0.94:56582
Jan 13 17:52:06 ftp tftpd[3342]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3343]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AF not found
Jan 13 17:52:06 ftp tftpd[3344]: Serving 
	/rhl81/pxe/pxelinux.cfg/0A to 10.250.0.94:56455
Jan 13 17:52:06 ftp tftpd[3343]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3344]: tsize option -> 243
Jan 13 17:52:06 ftp tftpd[3344]: Server thread exiting
Jan 13 17:52:06 ftp tftpd[3345]: Serving /rhl81/pxe/vmlinuz to 
	10.250.0.94:56456
Jan 13 17:52:06 ftp tftpd[3345]: tsize option -> 866614
Jan 13 17:52:10 ftp tftpd[3345]: Server thread exiting
Jan 13 17:52:10 ftp tftpd[3346]: Serving /rhl81/pxe/initrd.img 
	to 10.250.0.94:56457
Jan 13 17:52:10 ftp tftpd[3346]: tsize option -> 2684650
Jan 13 17:52:19 ftp tftpd[3346]: Server thread exiting

I am running atftp-0.6-1 because its diagnostics are MUCH 
better than the ISC variant -- I have built RPMs of all four 
major tftp-server variants, and placed them, and SRPMs at:

   ftp://ftp.owlriver.com/pub/local/ORC/

[herrold new herrold]$ cd /var/ftp/pub/local/ORC
[herrold new ORC]$ ls -l | grep tftp
drwxr-xr-x    2 root     root         4096 Nov 21 17:20 atftp
drwxr-xr-x    2 root     root         4096 Nov 27 11:28 tftp
drwxr-xr-x    2 root     root         4096 Nov 12 14:26 tftp-hpa
drwxr-xr-x    2 root     root         4096 Nov 24 21:23 utftpd
[herrold new ORC]$

I have atftp set with xinetd thus:

[herrold ftp xinetd.d]$ pwd ; ls ; cat tftp
/etc/xinetd.d
attic    chargen-udp  daytime-udp  echo-udp  servers   sgi_fam  tftp  time-udp
chargen  daytime      echo         rsync     services  telnet   time  vsftpd
# default: off
# 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
        {
        disable = no
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
   server_args             = --verbose=7 --no-blksize
#   server_args             = --verbose=7 --no-tsize --no-blksize
#
        cps     =       500 2
#
        }
#
#
[herrold ftp xinetd.d]$

The verbose 7 really helped me see what was happening. Looking 
at things another way, 

[herrold ftp xinetd.d]$ sudo tail -f /var/log/messages | grep found
Jan 13 18:02:26 ftp tftpd[3366]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA005E not found
Jan 13 18:02:26 ftp tftpd[3367]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA005 not found
Jan 13 18:02:26 ftp tftpd[3368]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA00 not found
Jan 13 18:02:26 ftp tftpd[3369]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA0 not found
Jan 13 18:02:26 ftp tftpd[3370]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AFA not found
Jan 13 18:02:26 ftp tftpd[3371]: File 
	/tftpboot///rhl81/pxe/pxelinux.cfg/0AF not found

[See how the HEX IP address is getting the right side chopped 
off to suggest alternative config files?]

Note that I have cranked the number of clients per second up
to 500 with a 2 second re-start interval -- When a PXE client
is trying to figure what config file to pull, it starts
several instances, one after another, and xinetd will try to
rate limit things.  This is very _hard_ to diagnose, and I
scratched my head for a day, watching tcpdump traces, until I
got the verbose logging of atftp to show me what was
happening.

Each one of those 'server thread exitting' imply a differing 
client instance.  At least six in a single second.  Ouch.

>   I do see in the system log that the client does get an address and, after
> adding '-vvv' to the in.tftpd args in /etc/xinetd.d/tftp (and HUPing xinetd),
> that the tftp request for the file /lts/pxe/pxelinux.bin is received.  But the
> tftp server doesn't seem to want to send the file.  

It may be here that the xinetd has rate limited you out of 
having any remaining child process's availabie for tftp, doing 
rate limiting.

Even a tcpdump confirms
> that it's not being sent, rather than just being sent but not received by the
> PXE client.
>   I've confirmed that the tftp server is working by doing a simple transfer
> from my laptop, which I have hooked up to the network.

... the testing one can do at human speed allows the xinetd to 
recover.

>   Doing a google search turned up a couple of things, one indicating that
> the Intel eepro100 card needs the pxelinux package rather than the regular
> intel pxe package bundled with Red Hat.  Can anyone confirm this?  Or maybe
> that was for the 3com 905c cards.  I forgot.  The same reference I found also
> mentions that multicast tftp is needed.  I hope that's not true, since it's
> proving to be a bit complex to get working.

I have not found such a requirement, although there is much 
'clucking' about early Intel PXE cards 

>   Of course, whatever works, I'm willing to go with.  I've been struggling
> with this for a couple days now and figured I put my feelers out to see
> if anyone else has run into this.
>   Any help would be much a appreciated.  Sorry to start of with a plea
> for help.  I'm always available on other lists for general Linux help
> and especially Red Hat help.  I promise, I won't unsubscribe once I get
> an answer.  ;-)  I'll stay on the list to offer whatever help I can.

The syslinux list is focused on these issues -- but my outline 
and the better debugging of alternative tftp-servers may solve 
your issues.

I trust you'll keep us posted if (when!) things work, or if
you need more help.

-- Russ Herrold





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]