Installation and configuration of TFTP server in Fedora

Source: Internet
Author: User

I have been engaged in embedded project development for nearly half a year. installation and configuration of TFTP are essential for embedded development. Therefore, I have summarized the installation, configuration, and Common Errors Based on my project experience.

The summary process is as follows:

 

1. Download three packages: TFTP server, client TFTP, and daemon xinetd.

Yum install xinetd TFTP-Server

 

// Xinetd. i3862: 2.3.14-21. fc10

// Tftp-0.49-1.fc10.i386.rpm

// Tftp-server-0.49-1.fc10.i386.rpm

 

2. Configure VI/etc/xinetd. d/TFTP

Modify server_args =-S/tftpboot-C. The-C must be added here. Otherwise, you can only download the file and cannot upload it !!!

Service tftp

{

Disable = No

Socket_type = dgram

Protocol = UDP

Wait = Yes

User = root

Server =/usr/sbin/in. tftpd

Server_args =-S/tftpboot-C

Per_source = 11

CPIs = 100 2

Flags = IPv4

}

 

3. Disable the firewall. (This is a common error)

 

4. Create a TFTP working directory and modify the attributes (if the attributes are not modified, an error occurs)

CD/

Mkdir tftpboot

Chmod 777-r/tftpboot/

 

Service xinetd restart

 

5. enable the Service to upload and download files

 

######################################

 

My configuration process has the following sequence and problems:

 

Download the TFTP service client TFTP and the daemon xinetd.

Yum install xinetd

Yum install TFTP-Server

// Xinetd. i3862: 2.3.14-21. fc10

// Tftp-0.49-1.fc10.i386.rpm

// Tftp-server-0.49-1.fc10.i386.rpm

Disable Firewall

Service xinetd restart

Stopping xinetd: [OK]

Starting xinetd: [OK]

CD/

Mkdir tftpboot

CD tftpboot

CP/etc/inittab/tftpboot/

TFTP 172.18.1.90

TFTP> Get inittab

Transfer timed out.

 

TFTP> quit

[Root @ localhost tftpboot] # netstat-A | greptftp

[Root @ localhost tftpboot] # ls

Inittab

[Root @ localhost tftpboot] # Touch aaa

[Root @ localhost tftpboot] # ls

AAA inittab

[Root @ localhost tftpboot] # TFTP 172.18.1.90

TFTP> get AAA

Transfer timed out.

 

TFTP> quit

Somehow the error message "transfertimed out." appears. Think about not modifying the TFTP configuration file:

[Root @ localhost tftpboot] # cd/etc/xinetd. d

[Root @ localhost xinetd. d] # vi TFTP

Save modification:

Disable = No

Server_args =-S/tftpboot/-C

[Root @ localhost xinetd. d] # cd/

[Root @ localhost/] #/etc/init. d/xinetdrestart

Stopping xinetd: [OK]

Starting xinetd: [OK]

[Root @ localhost/] # netstat-A | grep TFTP

UDP 0 0 *: TFTP *:*

[Root @ localhost/] # TFTP 172.18.1.90

TFTP> get AAA

Error Code 1: file not found

TFTP> Get inittab

Error Code 1: file not found

TFTP> quit

The error is different because the tftpd server needs to be installed, and the yum install tftpd has no source

But when I think about creating the/tftpboot/directory, I didn't have the permission to modify the directory, and everything was okay.

[Root @ localhost/] # chmod 777-r/tftpboot/

 

[Root @ localhost/] # TFTP 172.18.1.90

TFTP> get AAA

TFTP> Get inittab

TFTP> q

[Root @ localhost/] # ls

AAA boot etc inittab lost + found MNT proc sbin SRV tftpboot USR

Bin Dev home lib media opt root SELinux sys TMP VaR

// The AAA and inittab files are displayed in the root directory. the download is successful!

Try uploading files again:

[Root @ localhost/] # cd/tftpboot

[Root @ localhost tftpboot] # ls

AAA inittab

[Root @ localhost tftpboot] # rm aaa

RM: Remove regular empty file 'aaa '? Y

[Root @ localhost tftpboot] # ls

Inittab

[Root @ localhost tftpboot] # TFTP 172.18.1.90

TFTP> put aaa

TFTP: AAA: no such file or directory

TFTP> put aaa

TFTP: AAA: no such file or directory

TFTP> q

[Root @ localhost tftpboot] # cd/

[Root @ localhost/] # ls

AAA boot etc inittab lost + found MNT proc sbin SRV tftpboot USR

Bin Dev home lib media opt root SELinux sys TMP VaR

[Root @ localhost/] # TFTP 172.18.1.90

TFTP> put aaa

TFTP> q

[Root @ localhost/] # cd/tftpboot

[Root @ localhost tftpboot] # ls

AAA inittab

Uploaded successfully!

The cause of the above error is that the execution directory of TFTP needs to be performed in the root directory, because the default root directory is the directory of the current operation.

 

TFTP error: Permission denied Solution

 

 

I recently set up a TFTP server. I hope you can point out some shortcomings.

PC: fedora12

Development Board: mini2440

The procedure is as follows:

1. After the TFTP service is installed, run the following command:

Yuminstall TFTP-Server

2. Create a tftpboot folder under the root directory

Mkdir/tftpboot

Set the permission at the same time: chmod777 tftpboot

3. modify the configuration file Vim/etc/xinetd. d/TFTP

Change disable = yes to disable = No

Modify server_args =/tftpboot (specify the path of tftpboot)

4. Restart the TFTP service.

/Etc/init. d/xinetd. drestart

5. Copy the uimage file to the/tftpboot directory.

The PC configuration is complete.

On mini2440:

I am using U-boot.

Enter the U-boot command line and enter the command:

Tftp30008000 uimage (before this, ping the IP address of the PC. The hostis alive text indicates that the network is connected)

After that, I encountered a problem. When the network is connected, error: Permission denied occurs.

First, I checked the firewall, setup-> firewall settings, and found that the firewall has been disabled.

Later I found that another one still needs to be set, and I entered it on the PC.

System-config-SELinux: On The SELinux maintenance page, change the default application mode of the system to --> disabled.

After successfully downloading the image, enter bootm 30008000 to start.

Modify bootcmd if you need to automatically download the kernel image from TFTP at startup.

Setbootcmd TFTP 30008000 uimage \; bootm 30008000.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.