LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-19-2007, 07:32 PM   #1
slpdave
LQ Newbie
 
Registered: Feb 2007
Location: Lenoir City TN
Distribution: Back to Slack
Posts: 21

Rep: Reputation: 15
tftp


Hello all here is another one of my newb questions.

I have an Avila Gateworks routerboard. I need to use tftp to install firmware on it. The directions on how to do this are sketchy at best. I have downloaded the firmware and associated files from www.dd-wrt.com. When I connect to the serial port nothing happens. I have enable the serial port in CMOS, used setserial to set it to hi-speed. setserial gives proper responses to the port located at /dev/ttyS0. how do you tell if tftp is connected?

If anyone has done this before some direction would be great. BTW I have tried it under XP also with no luck telling if the board is working. The processor gets hot and if you plug in a network cable the connection lights light up. but no responses that I know of.

Thanks in advance.
slpdave
 
Old 08-20-2007, 04:05 AM   #2
ludist
Member
 
Registered: Nov 2005
Location: Greece
Distribution: Slackware
Posts: 172

Rep: Reputation: 21
Also newbie on this, never tried: But tftp is for lan not for serial (as far as I know)

man tftp

To my understanding, the route has an tftp server. Otherwise you need the opposite.

tftp server on your box and tftp client on your router.

man in.tftpd
 
Old 08-20-2007, 07:23 AM   #3
slpdave
LQ Newbie
 
Registered: Feb 2007
Location: Lenoir City TN
Distribution: Back to Slack
Posts: 21

Original Poster
Rep: Reputation: 15
Thank you for the reply. I will retry using the network interface next.

slpdave
 
Old 08-20-2007, 09:29 AM   #4
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
tftp is the protocol you use for network boot, so you'll have to reboot your router and hopefully it will pick up, what is served. you can read how to setup it up on http://alien.slackbook.org/dokuwiki/...=slackware:pxe


EDIT: see next post. thanks for clarifying, eric

Last edited by erklaerbaer; 08-20-2007 at 01:30 PM. Reason: i was wrong
 
Old 08-20-2007, 12:24 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107
Hm... please note that TFTP is not the protocol used for network booting.
TFTP stands for "trivial file transfer protocol" and is used (among others) by network-booting computers to transfer files from a network server to the client.
The tftp protocol is often used for uploads as well - uploads of firmware to embedded devices. Although using a serial cable is safest (you do not share the serial cable with other devices that can interrupt your transfers) using tftp over a network cable is a good second.

Read this link on the OpenWrt Wiki (I would prefer openwrt over dd-wrt because of the controversy about dd-wrt initially being a rip-off of others' hard work): http://wiki.openwrt.org/OpenWrtDocs/...OpenWrtViaTftp
which explains the process of firmware flashing using your Slackware's tftp program.

Eric
 
Old 08-20-2007, 01:26 PM   #6
slpdave
LQ Newbie
 
Registered: Feb 2007
Location: Lenoir City TN
Distribution: Back to Slack
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Alien Bob View Post
Hm... please note that TFTP is not the protocol used for network booting.
TFTP stands for "trivial file transfer protocol" and is used (among others) by network-booting computers to transfer files from a network server to the client.
The tftp protocol is often used for uploads as well - uploads of firmware to embedded devices. Although using a serial cable is safest (you do not share the serial cable with other devices that can interrupt your transfers) using tftp over a network cable is a good second.

Read this link on the OpenWrt Wiki (I would prefer openwrt over dd-wrt because of the controversy about dd-wrt initially being a rip-off of others' hard work): http://wiki.openwrt.org/OpenWrtDocs/...OpenWrtViaTftp
which explains the process of firmware flashing using your Slackware's tftp program.

Eric

Thank you, Those are some great instructions. I will try that later today.

slpdave
 
Old 08-20-2007, 02:56 PM   #7
smarthouseguy
LQ Newbie
 
Registered: Jan 2006
Posts: 15

Rep: Reputation: 0
I have cisco phones that rely on tftp so this is how I went about it...

Code:
nano /etc/inetd.conf
find this line
Code:
# Tftp service is provided primarily for booting.  Most sites
# run this only on machines acting as "boot servers."
# tftp  dgram   udp     wait    root    /usr/sbin/in.tftpd  in.tftpd -s /tftpboot -r blksize
remove the comment.. then make the dir
Code:
mkdir /tftpboot
then...
Code:
nano /etc/dhcpd.conf
this is just an example... use your own subnets dns etc and your own tftp which would probably be eth1 in your machine
Code:
ddns-update-style ad-hoc;
subnet 10.77.76.0 netmask 255.255.255.0
{
range 10.0.0.1 10.0.0.254;
default-lease-time 720;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.1;
option domain-name-servers 10.0.0.1, 10.0.0.2;
option tftp-server-name "10.0.0.1";
}
next...
Code:
nano /etc/rc.d/rc.firewall
just basic ipfwd, not very secure...
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward



iptables --flush


iptables --table nat --flush
iptables --delete-chain


iptables --table nat --delete-chain


iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
then make it exec and bootable
Code:
chmod 744 /etc/rc.d/rc.firewall
Code:
chmod +x /etc/rc.d/rc.firewall
next...
Code:
nano /etc/rc.d/rc.local
just add a line that says
Code:
dhcpd ethX
replacing X with the eth adapt. u will be using

now, u should be able to run a few simple commands to get everything up and running
Code:
/etc/rc.d/rc.inetd start
/etc/rc.d/rc.firewall
dhcpd
now i would try rebooting that router with it pulling from the linux based router u just created, it should pull the config file from the tftp and there ya go....
u can refer to the man pages for tftp.... i just know this works for me for every tftp need I run into... you will probably want to verify if the filename is mac specific. I know a lot are, and require the mac addy for it to pull the right file... the device makes request for router_config_005896ad5fxx.cfg if the file is not found, nothing happens.

have a great day... hope this helped
 
Old 08-20-2007, 03:12 PM   #8
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107Reputation: 8107
Indeed VOIP phones rely on a tftp server for provisioning and firmware updates (the phone is a client in the network), but routers don't pull their firmware off a server. Instead, you need to use a tftp client program on another computer that connects to the tftp server on the router in order to upload a firmware image to the router.

Eric
 
  


Reply


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
tftp issue, unable to transfer kernel image using tftp to boot ltsp-client noobs4linux Linux - Networking 1 02-07-2007 01:53 AM
tftp baparekh Linux - Networking 8 03-11-2005 07:50 AM
tftp baparekh Linux - Newbie 1 03-07-2005 02:51 PM
TFTP-Problem: TFTP timed out Bikerpete Linux - General 2 08-14-2003 05:25 AM
help with tftp please Tigger Linux - Security 3 06-11-2003 05:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:04 AM.

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
Open Source Consulting | Domain Registration