Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:tftp [2011/11/27 21:54] – created petzen:tftp [2022/08/04 15:02] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +
 ====== TFTP Server ====== ====== TFTP Server ======
  
-===== Used version ===== +===== Ubuntu 14.04/16.04 x86 in vmware player ===== 
-  * Ubuntu 10.04 x86 in vmware player+ 
 +First you have to install xinetd tftp  
 + 
 +<code> 
 +sudo apt-get install xinetd tftpd tftp 
 +</code> 
 + 
 + 
 +create the file **/etc/xinetd.d/tftp** and add the following lines of code to it:  
 + 
 +<code> 
 +service tftp 
 +
 +protocol        = udp 
 +port            = 69 
 +socket_type     = dgram 
 +wait            = yes 
 +user            = nobody 
 +server          = /usr/sbin/in.tftpd 
 +server_args     = /tftpboot 
 +disable         = no 
 +
 +</code> 
 + 
 +Then create a tftp folder and restart xinetd. 
 +<code> 
 +sudo mkdir /tftpboot 
 +sudo chmod -R 777 /tftpboot 
 +sudo chown -R nobody /tftpboot 
 +sudo /etc/init.d/xinetd restart 
 +</code> 
 + 
 + 
 + 
 + 
 + 
 +===== Ubuntu 12.04 x86 in vmware player ===== 
 + 
 +The default TFTP suite is tftp-hpa. To install the following step is needed: 
 + 
 +<code bash> 
 +user@ubuntu:~$ sudo apt-get install tftpd-hpa tftp-hpa 
 +</code> 
 + 
 +The TFTP default directory is /var/lib/tftpboot. 
 + 
 +Change the following line in ''/etc/default/tftpd-hpa'' to point to the images directory of the BSP: 
 + 
 +<code> 
 +TFTP_DIRECTORY="/home/tq/workspace/TQMa6x-BSP-REV.0104/platform-MBa6x/images" 
 +</code> 
 + 
 + 
 +To restart the TFTP server type: 
 + 
 +<code bash> 
 +user@ubuntu:~$ sudo service tftpd-hpa restart 
 +</code> 
 + 
 +To test the server copy some file to the server and get it back with  
 + 
 +<code bash> 
 +user@ubuntu:~$ tftp 127.0.0.1 -c get <filename>  
 +</code> 
 + 
 +===== Ubuntu 10.04 x86 in vmware player =====
  
-===== Installation =====+==== Installation ====
 <code bash> <code bash>
 user@ubuntu:~$ sudo apt-get install xinetd tftpd tftp user@ubuntu:~$ sudo apt-get install xinetd tftpd tftp
 </code> </code>
  
-===== Configuration =====+==== Configuration ====
 To cofigure TFTP the file ''/etc/xinetd.d/tftp'' must be created and filled with the following content. This configuration uses the directory ''/tftpboot''. To cofigure TFTP the file ''/etc/xinetd.d/tftp'' must be created and filled with the following content. This configuration uses the directory ''/tftpboot''.
 <code> <code>
Line 25: Line 91:
 </code> </code>
  
-<note>+<WRAP round info>
 The directory requires at least the access authorisation "''dr-xr-xr-x''". The directory requires at least the access authorisation "''dr-xr-xr-x''".
-</note>+</WRAP>
  
-<note>+<WRAP round info>
 After the configuration was changed the server should be restarted: After the configuration was changed the server should be restarted:
 <code bash> <code bash>
 user@ubuntu:~$ sudo service xinetd restart user@ubuntu:~$ sudo service xinetd restart
 </code> </code>
-</note>+</WRAP>
  
-==== Firewall & port forwarding ====+===== Firewall & port forwarding =====
 TFTP uses port 69 UDP. This port must be opened. How to configure port forwarding on a Windows-XP host system is described here: [[vm#nat_network_address_translation|Port Forwarding]]. TFTP uses port 69 UDP. This port must be opened. How to configure port forwarding on a Windows-XP host system is described here: [[vm#nat_network_address_translation|Port Forwarding]].
  
-===== Sources =====+===== Further applicable links  ===== 
 +\\ 
 +[[en:general_information:tutorial:update_firmware_tftp|Updating existing firmware over ethernet]] 
 + 
 +==== Sources ====
   * http://www.denx.de/wiki/view/DULG/SystemSetup#Section_4.6.   * http://www.denx.de/wiki/view/DULG/SystemSetup#Section_4.6.
   * http://www.unix.com/ubuntu/127020-configuring-ubuntu-9-04-tftp-server.html   * http://www.unix.com/ubuntu/127020-configuring-ubuntu-9-04-tftp-server.html
 +  * http://wiki.attie.co.uk/wiki/Ubuntu_server_12.04/tftp
  • Last modified: 2022/08/04 15:04