Differences

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

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
en:general_information:tftp [2015/06/18 17:53] – created liedmannen:general_information:tftp [2022/10/31 15:15] – added nano weinholdo
Line 1: Line 1:
-===== TFTP Server ===== 
-\\ 
-===== Ubuntu x86 in VMware player ===== 
  
-Tested with :+====== TFTP Server ======
  
-  * Ubuntu 14.04 +===== Setting up TFTP Server in Ubuntu =====
-  * Ubuntu 12.04+
  
-The following guide desribes how to install and setup tftp server under Ubuntu, the default TFTP suite is tftp-hpa.  +TFTP (Trivial File Transfer Protocol) is simplified version of FTP (File Transfer Protocol),running on port 69. It can be setup with very litte effort.\\    
-To install the following step is needed: +For example the TFTP server can be used to provide the binaries (u-boot, device tree blob and Linux kernel) for firmware updates in u-boot on the target hardware
 +\\   
 +\\   
 +The first thing is to install install the client and the server package, together with xinetd superserver.
  
-<code bash+<code> 
-user@ubuntu:~$ sudo apt-get install xinetd tftpd tftp+sudo apt-get install xinetd tftpd tftp
 </code> </code>
  
-The TFTP default directory is /var/lib/tftpboot. For convinience the following changes can be applied to the system:+The next step is to create folder to act as TFTP root, the files for e.g. firmware updates on the Starterkit must be stored here .\\   
 +Typically this folder is located at the root level and named **tftpboot**    
 +<code> 
 +sudo mkdir /tftpboot 
 +sudo chmod -R 777 /tftpboot 
 +sudo chown -R nobody /tftpboot 
 +</code>
  
-  * Creation of a new directory for the server 
-  * setting the ownership for the tftp user 
-  * add user to the tftp group to have rights to the tftpd dirctory 
  
-<code bash> +Now a new xinetd tftp serivce has to be configured by creating the file **/etc/xinetd.d/tftp** 
-user@ubuntu:~$ sudo mkdir -p /srv/tftpd +
-user@ubuntu:~$ sudo chown tftp:tftp /srv/tftpd +
-user@ubuntu:~$ sudo chmod 775 /srv/tftpd +
-user@ubuntu:~$ sudo usermod -a -G tftp user +
-</code>+
  
-Finally the server configuration for the TFTP server has to be changed:+<code> 
 +sudo nano /etc/xinetd.d/tftp 
 +</code>
  
-<code bash+Add the following lines of code: 
-user@ubuntu:~$ sudo nano /etc/default/tftpd-hpa+<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> </code>
  
-Change the following line to point to the new created directory:+After setting up everything properly, the xinetd service must be restarted by the following command
  
 <code> <code>
-TFTP_DIRECTORY="/srv/tftpd"+sudo service xinetd restart
 </code> </code>
  
  
-To restart the TFTP server type:+===== Further applicable links  ===== 
 +\\ 
 +[[en:general_information:tutorial:update_firmware_tftp|Updating existing firmware over ethernet]] 
 + 
 + 
  
-<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> 
  • Last modified: 2023/06/21 14:52