TFTP Boot Server

Please post questions about add-ons for legacy ReadyNAS devices here.

TFTP Boot Server

Postby cmichaelis » Thu Nov 13, 2008 10:52 am

Hi, I am trying to configure my NAS as a TFTP server for the IP Phones on my network to boot from. I have been able to enable SSH and have installed tftpd. I created a /tftpboot directory and here is the line from inetd.conf

tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot

I can connect to the tftp server directly from the NAS server but not from a remote PC, and when I scan port 69 it shows as closed.

I am not a linux expert so any ideas are appreciated.

Thanks
User avatar
cmichaelis
ReadyNAS Newbie
 
Posts: 21
Joined: Fri Sep 15, 2006 11:02 am
Location: Long Island, NY

Re: TFTP Boot Server

Postby chirpa » Thu Nov 13, 2008 11:04 am

Can it run as a standalone daemon? I don't think inetd services will be used.
User avatar
chirpa
Jedi Council Alumni
 
Posts: 16062
Joined: Mon Sep 24, 2007 11:52 am
Location: San Jose, CA
ReadyNAS: Repertoire

Re: TFTP Boot Server

Postby cmichaelis » Thu Nov 13, 2008 11:16 am

Not sure how I could do that.

I just followed these direction to install the service
http://www.debianhelp.co.uk/tftp.htm

Then these to test and trouble-shoot.
http://www.onlamp.com/pub/a/bsd/2003/06 ... asics.html

Like I said I can connect to the server using the tftp client at the NAS prompt but not from another PC, so I think the service is running but something is blocking port 69. But I'm just guessing.
User avatar
cmichaelis
ReadyNAS Newbie
 
Posts: 21
Joined: Fri Sep 15, 2006 11:02 am
Location: Long Island, NY

Re: TFTP Boot Server

Postby cmichaelis » Fri Nov 14, 2008 9:15 am

Should this question be posted under another topic?
User avatar
cmichaelis
ReadyNAS Newbie
 
Posts: 21
Joined: Fri Sep 15, 2006 11:02 am
Location: Long Island, NY

Re: TFTP Boot Server

Postby cmichaelis » Wed Nov 19, 2008 7:36 pm

bump
User avatar
cmichaelis
ReadyNAS Newbie
 
Posts: 21
Joined: Fri Sep 15, 2006 11:02 am
Location: Long Island, NY

Re: TFTP Boot Server

Postby tikken » Sat Jan 31, 2009 4:32 am

hi.

I merely used the defaults, and it worked fine, though I did create & chmod 777 the /boot directory. And, of course, prettied up & commented the text for readability.

Code: Select all
nas01$
nas01$  # what version is this & where am I?
nas01$ uname -a
Linux nas01 2.6.17.8ReadyNAS #1 Fri Sep 19 15:04:06 PDT 2008 padre unknown
nas01$
nas01$ pwd
/c/home/tikken
nas01$
nas01$
nas01$ # make sure dependancies are already installed
nas01$ sudo apt-get check tftpd
Reading Package Lists... Done
Building Dependency Tree... Done
nas01$ 
nas01$
nas01$ # install the package
nas01$ sudo apt-get install tftpd
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  tftpd
0 upgraded, 1 newly installed, 0 to remove and 81 not upgraded.
Need to get 15.2kB of archives.
After unpacking 81.9kB of additional disk space will be used.
Get:1 http://archive.debian.org sarge/main tftpd 0.17-12 [15.2kB]
Fetched 15.2kB in 0s (16.1kB/s)
Selecting previously deselected package tftpd.
(Reading database ... 12786 files and directories currently installed.)
Unpacking tftpd (from .../tftpd_0.17-12_sparc.deb) ...
Setting up tftpd (0.17-12) ...

nas01$
nas01$
nas01$ # see what inetd.conf looks like
nas01$ grep tftpd /etc/inetd.conf
tftp            dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /boot
nas01$
nas01$
nas01$ # create the content directory, touch a file and set the permissions
nas01$ sudo mkdir /boot
nas01$ sudo touch /boot/file1
nas01$
nas01$ ls -l /boot
total 0
-rw-r--r--    1 root     root            0 Jan 31 03:17 file1
nas01$
nas01$ sudo chmod -R 777 /boot
nas01$
nas01$ ls -la /boot
total 8
drwxrwxrwx    2 root     root         4096 Jan 31 03:17 .
drwxr-xr-x   23 root     root         4096 Jan 31 03:15 ..
-rwxrwxrwx    1 root     root            0 Jan 31 03:17 file1
nas01$
nas01$
nas01$ # copy a test binary file into place (renamed from a small tarball)
nas01$ cp add_users_v2.tar /boot/file1
nas01$
nas01$ ls -l /boot
total 64
-rwxrwxrwx    1 root     root        61440 Jan 31 05:14 file1
nas01$
nas01$ md5sum file1
228a97378f9e4eb941bbf84f8a57e12e  file1
nas01$
nas01$



testing via cygwin over WinXP shows it to be working ...


Code: Select all
kimchi$ tftp -i nas01 get file1
Transfer successful: 61440 bytes in 1 second, 61440 bytes/s
kimchi$
kimchi$
kimchi$ ls -l file1
-r-xr-xr-x 1 tikken None 61440 Jan 31 05:17 file1
kimchi$
kimchi$
kimchi$ md5sum file1
228a97378f9e4eb941bbf84f8a57e12e *file1
kimchi$



I'm sorry I cannot offer any useful advice, for it's not listed exactly what you did or didn't do, but tftpd worked fine for me from the default install using inetd.
tikken
ReadyNAS Newbie
 
Posts: 9
Joined: Fri Jan 30, 2009 8:55 pm
ReadyNAS: NV+

Re: TFTP Boot Server

Postby acesarewld » Sat Jan 31, 2009 4:21 pm

This is something I have been trying for a while.

I successfully installed TFTP and TFTPD from apt-get, I updated my /etc/inetd.conf file to have the lines:
"tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot"
and
"bootps dgram udp wait nobody /usr/sbin/tcpd bootpd"

I created the /tftpboot folder, chmodded it to 777 along with the file inside there, and restarted the ReadyNAS.
It seems that the TFTP server is not running because of this:
NAS:~# ps -eaf |grep -i ftp
nobody 1186 1 0 18:15 ? 00:00:00 proftpd: (accepting connections)
root 1901 1739 0 18:28 pts/0 00:00:00 grep -i ftp

Does anyone have an idea as to why the TFTPD server is not starting?

Thanks in advance
--Geoff
acesarewld
ReadyNAS Newbie
 
Posts: 2
Joined: Sat Jan 31, 2009 3:56 pm

Re: TFTP Boot Server

Postby tikken » Sat Jan 31, 2009 9:36 pm

Hi.

inetd (with /etc/inetd.conf) is like a loader program. It listens on the network for requests according to /etc/services and /etc/inetd.conf, and then it launches the program with the parameters listed in /etc/inetd.conf

... so, any daemons in inetd.conf will not be running until there is a network request for that specific service. There is a certain amount of overhead running thru inetd, but it's usually ignored unless it is intended to be a heavily utilized service. ftpd is a good example of one which is configured either way - a standalone daemon or configured thru inetd - depending upon how often it's used, and how many people at a time, etc. ReadyNAS has proftpd running as a standalone, for the device is meant as a file server.

If you want tftpd to run as a standalone, then you'll need to create (or modify an existing) init script to start it when ReadyNAS boots. I've only run it thru inetd though and cannot offer configuration ideas for running it as a standalone daemon. ReadyNAS uses /etc/init.d/rc3 script to initialize all the runlevel 3 activities.

- Tikken

ps - just try using it as it is, and it most likely will work. I think your bootpd may have issues though, as it's best to specify the full path to the daemon.

http://tldp.org/HOWTO/PA-RISC-Linux-Boo ... twork.html
... a reference for bootp which lists:
bootps dgram udp wait root /usr/sbin/bootpd bootpd -i -t 120

and edit the /etc/bootptab to your needs.

Note that /usr/sbin/tcpd is a 'wrapper' used for security, but it often (or merely does) have a limit to how many parameters can be passed thru it, so if something more complex like the above bootp is used, tcpd is omitted because it's 5 pieces of information to pass thru tcpd, and I recall it only remembers 2 or 3 pieces.

You might be able the following to work:
bootps dgram udp wait root /usr/sbin/tcpd /usr/sbin/bootpd -i -t 120

... then again, I don't see bootpd on my ReadyNAS, so you'll need to install that too, unless you have already, or unless tftpd will double as a bootpd also. I've not researched it yet, sorry - not yet to that point.
tikken
ReadyNAS Newbie
 
Posts: 9
Joined: Fri Jan 30, 2009 8:55 pm
ReadyNAS: NV+

Re: TFTP Boot Server

Postby micpas » Tue Apr 21, 2009 3:51 am

Hi you all,
I successfully performed installation of TFTPD from wget, then created from FrontView the /TFTPBOOT folder with R/W share permissions.
I updated my /etc/inetd.conf file to have the following line:
"tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /TFTPBOOT"
then restarted the ReadyNAS.
After rebooting TFTP server seems to be up and running: I tried sending and receiving some test files from my PC using 3CDaemon TFTP client and transfers seem to be all OK.
Hope this could help.
Mike
micpas
ReadyNAS Newbie
 
Posts: 5
Joined: Mon Jul 28, 2008 2:10 am


Return to General Discussion on ReadyNAS Add-ons for Legacy ReadyNAS



Who is online

Users browsing this forum: No registered users and 3 guests