?
Solved

Setting up and configuring tftp

Posted on 2005-03-22
8
Medium Priority
?
3,629 Views
Last Modified: 2012-08-14
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.
0
Comment
Question by:Wampyre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 13610480
please paste the exact error in here
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 13614156
> 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.
0
 

Author Comment

by:Wampyre
ID: 13620967
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.
0
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 
LVL 38

Expert Comment

by:wesly_chen
ID: 13625138
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
0
 

Author Comment

by:Wampyre
ID: 13650041
#########################
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?
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 750 total points
ID: 13654701
> 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 #
So what's the result of
ls -al /tmp/music

I think the tftp server is ok.

> PXE-E3A: TFTP too many packages.
This message can mean one of two things.
1 – You are trying to download a file using TFTP that is larger than the allocated buffer.
2 – You started downloading a file as a slave client using MTFTP and the file increased in size when you became the master client.

So it is something wrong with your PXE. Either the boot image is bigger than than the buffer you allocated for PXE-- Change your PXE
setting on the PXE configuration menu (BIOS ?).

0
 

Author Comment

by:Wampyre
ID: 13661158
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.


0
 

Author Comment

by:Wampyre
ID: 13833073
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
0

Featured Post

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question