Link to home
Start Free TrialLog in
Avatar of Wampyre
Wampyre

asked on

Setting up and configuring tftp

Howdy.

I'm running SuSE 9.1. I've installed all packages. What I want to do, is this must be the server on my home network, I already have samba and dhcp set up, and working 100%.  My next step, is to have a diskless workstation boot from the server, and have access to the smb shares in order to play music.  My diskless machine is a P1, with 64MB ram, CMI8738 sound card, and intel pro/100 lan card (with PXE).

I have followed the steps in the linux diskless HOWTO, with very little success. I have a kernel for the workstation, and I've built its directory structure, but my problem lies with tftp.  On my system, tftp runs with xinetd, when I try to boot my workstation (while I have tail -f /var/log/messages running) I get the message, cannot set groups for user nobody.  I've checked my user configs, the user nobody is linked to the group nobody, and it is set like that in the tftp config file. If I change the tftp user to root.root, then it also fails, with the error too many packages.

TFTP is a TRIVIAL protocol, and I could not find much information about its configuration or error messages on the net. I have been busy with this for the past 4 days, PLEEEEEEAAAASEE help me.
Avatar of Pablo Allietti
Pablo Allietti
Flag of Uruguay image

please paste the exact error in here
> change the tftp user to root.root
My tftp setting in xinetd is
user = root  (not root.root, nor group setting).

So please try "root" only.
Avatar of Wampyre
Wampyre

ASKER

The tftp user is root, group is root (That's what I meant by root.root) The tftpboot directory is owned by group, as are all the files in the directory.

For some reason when I did this excercise again last night, I didn't get the same output, I can't think what's changed, but here's the output that I got:


Mar 24 21:45:49 server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 24 21:45:49 server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 24 21:45:50 server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 24 21:45:50 server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 24 21:45:52 server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 24 21:45:52 server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 24 21:45:55 server dhcpd: DHCPREQUEST for 192.168.0.30 (192.168.0.1) from 00:d0:b7:16:72:ae via eth0
Mar 24 21:45:55 server dhcpd: DHCPACK on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/util_sock.c:set_socket_options(159)
Mar 24 21:46:18 server smbd[3563]:   Unknown socket option SORCVBUF
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/util_sock.c:get_peer_addr(975)
Mar 24 21:46:18 server smbd[3563]:   getpeername failed. Error was Transport endpoint is not connected
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/util_sock.c:get_peer_addr(975)
Mar 24 21:46:18 server smbd[3563]:   getpeername failed. Error was Transport endpoint is not connected
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/access.c:check_access(328)
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/util_sock.c:get_peer_addr(975)
Mar 24 21:46:18 server smbd[3563]:   getpeername failed. Error was Transport endpoint is not connected
Mar 24 21:46:18 server smbd[3563]:   Denied connection from  (0.0.0.0)
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/util_sock.c:get_peer_addr(975)
Mar 24 21:46:18 server smbd[3563]:   getpeername failed. Error was Transport endpoint is not connected
Mar 24 21:46:18 server smbd[3563]:   Connection denied from 0.0.0.0
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/util_sock.c:write_socket_data(411)
Mar 24 21:46:18 server smbd[3563]:   write_socket_data: write failure. Error = Connection reset by peer
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/util_sock.c:write_socket(436)
Mar 24 21:46:18 server smbd[3563]:   write_socket: Error writing 5 bytes to socket 23: ERRNO = Connection reset by peer
Mar 24 21:46:18 server smbd[3563]: [2005/03/24 21:46:18, 0] lib/util_sock.c:send_smb(628)
Mar 24 21:46:18 server smbd[3563]:   Error writing 5 bytes to client. -1. (Connection reset by peer)
Mar 24 21:46:18 server smbd[3564]: [2005/03/24 21:46:18, 0] lib/util_sock.c:set_socket_options(159)
Mar 24 21:46:18 server smbd[3564]:   Unknown socket option SORCVBUF


(on client)
DHCP MAC ADDRESS: 00 D0 B7 16 72 AE
CLIENT IP: 192.168.0.1  MASK 255.255.255.0  DHCP IP: 192.168.0.1
GATEWAY IP: 192.168.0.1
PXE-E32: TFTP open timeout
PXE-E32: TFTP open timeout
PXE-E32: TFTP open timeout

Loading the Boot image failed

Press Ctrl+T to try again

# /etc/xinetd.d/tftp
service tftp
{
        socket_type     = stream
        protocol        = tcp
        wait            = yes
        user            = root
        group           = root
        server          = /usr/sbin/in.tftpd
        server_args     = -s /tftpboot
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

ls -l /tftpboot
-rwxr-xr-x   1 root root 1307136 Mar 20 22:31 music

# from dhcpd.conf
  host music {
    filename "music";
    hardware ethernet 00:D0:B7:16:72:AE;
    fixed-address 192.168.0.30;
  }

As far as I can tell, this is my complete configuration.  I think I'm being stupid and the answer is clear as day, I just can't see it.
Could you manually test tftp server from any Linux machines's command line except tftp server itself?
----
cd /tmp
tftp <tftp server's IP>
bin
verbose
trace
get music   # <=== get the file
quit
----

The messages you post might not be relative to tftp server. It could be the setting on your DHCP server.
Say if your tftp server and dhcp server are not the same one, then you need to enable option 66 for your dhcp server and
have
  next-server <IP of tftpsever>;
something like that (I use RedHat, not SuSE9.1, so I'm not sure SuSE use the same option in DCHP server or nnot).

Wesly
Avatar of Wampyre

ASKER

#########################
tftp from linux computer
#########################

splat:/tmp # tftp 192.168.0.1
tftp> bin
tftp> verbose
Verbose mode on.
tftp> get music
getting from 192.168.0.1:music to music [octet]
Received 1307136 bytes in 7.9 seconds [1321898 bit/s]
tftp> quit
splat:/tmp #

##############################
tail -f /var/log/messages
while booting remote computer
##############################

Mar 27 18:16:21 Server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 27 18:16:21 Server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 27 18:16:22 Server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 27 18:16:22 Server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 27 18:16:24 Server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 27 18:16:24 Server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 27 18:16:28 Server dhcpd: DHCPREQUEST for 192.168.0.30 (192.168.0.1)
from 00:d0:b7:16:72:ae via eth0
Mar 27 18:16:28 Server dhcpd: DHCPACK on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 27 16:16:28 Server in.tftpd[5809]: tftp: client does not accept options


###########################
Display on remote computer
###########################

DHCP MAC ADDR: 00 D0 B7 16 72 AE
CLIENT IP: 192.168.0.30  MASK 255.255.255.0  DHCP IP: 192.168.0.1
GATEWAY IP: 192.168.0.1
PXE-E3A: TFTP too many packages

Loading the Boot image failed

Press Ctrl+T to try again


###################
/etc/xinetd.d/tftp
###################

service tftp
{
        socket_type     = dgram
        protocol        = udp
        wait            = yes
        user            = root
        group           = root
        server          = /usr/sbin/in.tftpd
        server_args     = -s /tftpboot
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

################
ls /tftpboot -l
################

drwxr-xr-x   3 root root     120 Mar 27 18:08 .
drwxr-xr-x  27 root root     680 Mar 27 12:13 ..
-rwxrwxrwx   1 root root 1307136 Mar 20 22:31 music

#############################
excerpt from /etc/dhcpd.conf
#############################

  host music {
    filename "music";
    hardware ethernet 00:D0:B7:16:72:AE;
    fixed-address 192.168.0.30;
    next-server 192.168.0.1;
  }


########################################################
Then I changed the user and group in /etc/xinetd.d/tftp
to nobody
########################################################
tftp> get music
getting from 192.168.0.1:music to music [octet]
sent RRQ <file=music, mode=octet>
sent RRQ <file=music, mode=octet>
sent RRQ <file=music, mode=octet>
sent RRQ <file=music, mode=octet>
sent RRQ <file=music, mode=octet>
Transfer timed out.

tftp> quit


#################################################
While doing this, I monitored the messages file:
#################################################

Mar 27 19:06:18 Server in.tftpd[5934]: cannot set groups for user nobody
Mar 27 19:06:23 Server in.tftpd[5935]: cannot set groups for user nobody
Mar 27 19:06:28 Server in.tftpd[5936]: cannot set groups for user nobody
Mar 27 19:06:33 Server in.tftpd[5937]: cannot set groups for user nobody
Mar 27 19:06:38 Server in.tftpd[5938]: cannot set groups for user nobody

################################################
When rebooting the client, this was the result:
################################################

DHCP MAC ADDR: 00 D0 B7 16 72 AE
CLIENT IP: 192.168.0.30  MASK 255.255.255.0  DHCP IP: 192.168.0.1
GATEWAY IP: 192.168.0.1
PXE-E3A: TFTP open timeout
PXE-E3A: TFTP open timeout
PXE-E3A: TFTP open timeout

Loading the Boot image failed

Press Ctrl+T to try again
 

###########################################
This is what happened in the message file:
###########################################

Mar 27 19:10:31 Server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 27 19:10:31 Server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 27 19:10:32 Server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 27 19:10:32 Server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 27 19:10:34 Server dhcpd: DHCPDISCOVER from 00:d0:b7:16:72:ae via eth0
Mar 27 19:10:34 Server dhcpd: DHCPOFFER on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 27 19:10:38 Server dhcpd: DHCPREQUEST for 192.168.0.30 (192.168.0.1) from 00:d0:b7:16:72:ae via eth0
Mar 27 19:10:38 Server dhcpd: DHCPACK on 192.168.0.30 to 00:d0:b7:16:72:ae via eth0
Mar 27 19:10:38 Server in.tftpd[5939]: cannot set groups for user nobody
Mar 27 19:10:42 Server in.tftpd[5940]: cannot set groups for user nobody
Mar 27 19:10:50 Server in.tftpd[5941]: cannot set groups for user nobody
Mar 27 19:11:01 Server in.tftpd[5942]: cannot set groups for user nobody
Mar 27 19:11:17 Server in.tftpd[5943]: cannot set groups for user nobody
Mar 27 19:11:37 Server in.tftpd[5944]: cannot set groups for user nobody
Mar 27 19:11:41 Server in.tftpd[5945]: cannot set groups for user nobody
Mar 27 19:11:49 Server in.tftpd[5946]: cannot set groups for user nobody

############################
The options I can configure
on my network card:
The first value is the one
I have selected
############################

Boot Protocol:      PXE/RPL
PnP/BEV Boot:      Disable/Enable
Default Boot:      Network/Local
Local Boot:            Disable/Enable
Prompt Time:      3/5/8/2
Setup Message:      Enable/Disable
Power Mgmt:            ACPI/APM



Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Wampyre

ASKER

http://mail-index.netbsd.org/port-i386/2002/03/06/0003.html

"Apparently that error is because the kernel is larger than 512k. (I'm going
for 4Mb or 1.4Mb bzipped)

Is their a "download small bootloader" stage in the above that I am missing?
(which could then grab the large kernel and load it)"

The PXE has no setting for buffer size, so the two options I can see are a) use a smaller kernel, or b) use a small bootloader.

Hmmmm, no, it's not a limitation on PXE, http://www.kano.org.uk/projects/pxe/

Suggests that pxe is unable to use memory outside of the 640k lma, therefore a boot loader such as PXELINUX is required.


Avatar of Wampyre

ASKER

I've accepted the answer from  wesly_chen, because that ws the key to solving the problem.  I eventually ended up using PXELinux (from the syslinux package) to boot my remote system. After 4 weeks I finally have it working.  Now I just need to optimise my configuration, but after what I've just gone through, that shouild be childsplay :P