LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-03-2012, 12:58 PM   #1
wcrandthor
LQ Newbie
 
Registered: Aug 2012
Distribution: OpenSUSE 12.1
Posts: 9

Rep: Reputation: Disabled
Question Having issues with tftp


I'm trying to get TFTP working on my OpenSUSE virtualbox running on a Windows 7 machine, sending a file from OpenSUSE to a board running uCLinux...

On OpenSUSE (12.1) I have tftp-hpa 5.1, seems pretty straight forward, but for some reason my files are timing out.

On the uCLinux side, I didn't do anything, I just verified that tftp was present:

Code:
# tftp --help
BusyBox v0.60.5 (2012.07.09-14:05+0000) multi-call binary

Usage: tftp [OPTION]... HOST [PORT]
And that was pretty much it. (Do I need to set it up to receive?)

Then on my OpenSUSE side I started with a ping of my remote board:
Code:
mike@linux-4puc:~/iCOM/framework/cm> ping 192.168.254.1
PING 192.168.254.1 (192.168.254.1) 56(84) bytes of data.
64 bytes from 192.168.254.1: icmp_seq=1 ttl=255 time=45.6 ms
64 bytes from 192.168.254.1: icmp_seq=2 ttl=255 time=1.09 ms
64 bytes from 192.168.254.1: icmp_seq=3 ttl=255 time=2.19 ms
Good, we can see it, then I tried to set up for a ASCII transfer:
Code:
mike@linux-4puc:~/iCOM/framework/cm> tftp
tftp> connect 192.168.254.1
tftp> ascii
tftp> status
Connected to 192.168.254.1.
Mode: netascii Verbose: off Tracing: off Literal: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> put cm.c
Transfer timed out.
So it looks like I connected successfully, and got it setup correct, but then it times out. Any ideas why? Did I do something wrong?
 
Old 10-03-2012, 01:29 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,142

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
What you were verifying on the uClinux side was the client not the server.

Typically the server runs from xinetd and I assume there is a /etc/xinetd.d/tftp configuration file which should be similar to the following. Not sure how works on your board.

Code:
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -c -s /tftpboot -l
        disable                 = no
}
By default, tftpd will only allow uploading of files that already exist but there could be other reasons why the transfer is failing.

http://linux.die.net/man/8/in.tftpd
 
Old 10-03-2012, 01:59 PM   #3
wcrandthor
LQ Newbie
 
Registered: Aug 2012
Distribution: OpenSUSE 12.1
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
What you were verifying on the uClinux side was the client not the server
Yes... but that's what I want right? I'm trying to send a file OpenSUSE->uCLinux
so I need the server running on OpenSUSE and I just need to make sure that the uCLinux has a TFTP client.

On my OpenSUSE setup I did verify that the tftp file was present:
Code:
mike@linux-4puc:~> cat /etc/xinetd.d/tftp
service tftp
{
	socket_type		= dgram
	protocol		= udp
	wait			= yes
	user			= root
	server			= /usr/sbin/in.tftpd
	server_args		= -s /srv/tftpboot
	disable			= no
}
So I think that should be fine.

Quote:
tftpd will only allow uploading of files that already exist
I was not aware of that fact. Is there a way to change that? And where on the target/client do the files end up going?
 
Old 10-03-2012, 02:19 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,142

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
My fault for not paying attention.

Just a matter of semantics but what you really want to do is download a file from the server to your board. The file should be in the /srv/tftpboot directory on the SuSE box and make sure xinetd is running.

From the tftp client on the board you want to use get and not put.

Also make sure the file permission are set correctly.

Last edited by michaelk; 10-03-2012 at 03:09 PM.
 
Old 10-03-2012, 03:44 PM   #5
jefro
Guru
 
Registered: Mar 2008
Posts: 12,073

Rep: Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518
I tend to do it the other way as in get from a source.

In some cases and I am not sure about this but a file must exist on the remote before a transfer can happen from a put command.

As above you have to be on a file system location that your user has write permissions to for put.


Test it the other way around and telnet to the box and do a get.

Try also the ls command.

Some busybox implementations or embedded versions are also an issue.

Long way around is maybe tftp-32 on windows and drag and drop to OpenSuse if guest additions are enabled.

Last edited by jefro; 10-03-2012 at 03:46 PM.
 
  


Reply

Tags
ftp, tftp, virtual box


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
in.tftp pxelinux.0_ fails with TFTP open timeout deadeyes Linux - Server 1 05-28-2010 11:07 AM
PXE Boot issues - TFTP? xiaodown Linux - Server 8 07-08-2008 07:19 PM
after re-create tftp dir, tftp doesn't work anymore lastguy Linux - Networking 2 11-16-2007 04:33 PM
tftp issue, unable to transfer kernel image using tftp to boot ltsp-client noobs4linux Linux - Networking 1 02-07-2007 02:53 AM
TFTP-Problem: TFTP timed out Bikerpete Linux - General 2 08-14-2003 06:25 AM


All times are GMT -5. The time now is 09:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration