[syslinux] tftpd server
Michael Erskine
Michael.Erskine at JASMIN.PLC.UK
Wed Nov 13 05:49:41 PST 2002
> -----Original Message-----
> From: Peter.Leenders at gecits-eu.com
> [mailto:Peter.Leenders at gecits-eu.com]
> Sent: 13 November 2002 07:14
> To: thfra at wmdata.com
> Cc: syslinux at zytor.com
> Subject: RE: [syslinux] tftpd server
> I had no problems using TFTP32 (V2.21 = TFTP32i.exe) on a W2K
> PXE-Server
> (maybee a bug in new Version 2.51?)
Yes, the latest is broken although it looked very promising with its
DHCP server. Although I detest Win32, I require a quick solution so I
abandoned it in favour of haneWIN DHCP/TFTP server for win32 (shareware
from http://www.hanewin.de/) which is currently working well for
pxelinux + NetStation on diskless Via EPIA 5000 boards.
BTW: I found that almost all win32 TFTP servers had problems with
BusyBox's tftp client which had a handy syntax...
tftp -g -l localfile -r remotefile server
...which can be emulated by using a scripted tftp-hpa interactive client
thus...
#!/bin/sh
# Usage: tftpget file host
#
# Uses tftp interactive client from the tftp-hpa distribution to
# download a file. The file goes into /tmp. NB: this will complain if
# transferring a zero length file since this is the error check for
# transfer failure. There are probably other bugs ;-)
#
if [ $# -ne 2 ]; then
echo "Usage: tftpget file host"
exit 65
fi
echo "tftpget $1 from $2..."
scr=/tmp/tftpgetscr
echo "connect $2" > $scr
echo "binary" >> $scr
#echo "trace" >> $scr
echo "get $1 /tmp/$1" >> $scr
echo "quit" >> $scr
#cat $scr
cat $scr | tftp -v
err=$?
echo
rm $scr
if [ "$err" -ne 0 ]; then
echo "ERROR: tftp2 failed with exit status $err"
exit 1
fi
# now error checking -- zero length file
if [ ! -s "/tmp/$1" ]; then
echo "ERROR: transfer failed"
if [ -f "/tmp/$1" ]; then
rm /tmp/$1
fi
exit 1
fi
Regards,
Michael
More information about the Syslinux
mailing list