ubuntu-8.04环境下tftp服务器的建立

内核编译和嵌入式产品的设计与开发
回复
taylor
帖子: 41
注册时间: 2008-05-28 18:15

ubuntu-8.04环境下tftp服务器的建立

#1

帖子 taylor » 2009-04-27 14:15

我在建立TFTP服务器的时候,虽然google到不少,但发现多少有点问题,也许是我的操作有误,现把我建立TFTP过程例出来,有问题的大家一起探讨
1.安装程序
sudo apt-get install tftp tftpd
前者是客户端,后者是服务程序。
sudo apt-get install xinetd

2.在/目录下建一个tftpboot, 把属性改成777。
cd /
sudo mkdir tftpboot
sudo chmod 777 tftpboot

3.sudo vi /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot

4.sudo vi /etc/xinetd.d/tftp
tftp内容:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
}

5.重新启动服务:
sudo /etc/init.d/xinetd restart
sudo in.tftpd -l /tftpboot

6.测试一下,在/tftpboot文件夹下新建立一个文件
touch test
进入另外一个文件夹
tftp 192.168.0.38 【IP自行修改】
tftp> get test
是不是工作正常了呢?
现在把你编译好的内核文件拷贝到/tftpboot下面,就可以使用u-boot的tftp命令加栽内核到目标板内存了。
deadleon
帖子: 13
注册时间: 2007-01-31 18:20

Re: ubuntu-8.04环境下tftp服务器的建立

#2

帖子 deadleon » 2009-04-28 9:27

支持一下,大多数都没提那个inetd.conf.
这个版的人真少阿
头像
Jarson
帖子: 2371
注册时间: 2008-07-21 9:44
来自: 深圳
联系:

Re: ubuntu-8.04环境下tftp服务器的建立

#3

帖子 Jarson » 2009-04-28 10:27

支持LZ :em11
很好的文章~~
zq88295513
帖子: 4
注册时间: 2009-05-18 10:57

Re: ubuntu-8.04环境下tftp服务器的建立

#4

帖子 zq88295513 » 2009-05-22 11:26

楼主,你好!在进行到tftp> get test时,跳出了如下错误:error code 4:unsupported tranfer mode
请问是怎么回事呀?
taylor
帖子: 41
注册时间: 2008-05-28 18:15

Re: ubuntu-8.04环境下tftp服务器的建立

#5

帖子 taylor » 2009-05-23 16:58

zq88295513 写了:楼主,你好!在进行到tftp> get test时,跳出了如下错误:error code 4:unsupported tranfer mode
请问是怎么回事呀?
不知道你是在什么情况下遇到这种情况的?
zq88295513
帖子: 4
注册时间: 2009-05-18 10:57

Re: ubuntu-8.04环境下tftp服务器的建立

#6

帖子 zq88295513 » 2009-05-25 10:33

回楼主,是写到命令tftp> get test 时就出错,也不知道是什么问题,前面是没啥问题的
头像
lerosua
论坛版主
帖子: 8455
注册时间: 2007-11-29 9:41
联系:

Re: ubuntu-8.04环境下tftp服务器的建立

#7

帖子 lerosua » 2009-05-25 11:19

收藏,下次重装系统得来找
taylor
帖子: 41
注册时间: 2008-05-28 18:15

Re: ubuntu-8.04环境下tftp服务器的建立

#8

帖子 taylor » 2009-05-26 10:21

zq88295513 写了:回楼主,是写到命令tftp> get test 时就出错,也不知道是什么问题,前面是没啥问题的
你的测试是在安装了tftpd的机器上进行的吗?
caomoqr
帖子: 1
注册时间: 2009-02-27 10:01

Re: ubuntu-8.04环境下tftp服务器的建立

#9

帖子 caomoqr » 2009-06-24 13:08

楼主你好,我按照这种方式装了一遍,在本机上也能get下来,可是从别的主机就get不到我建立的tftpboot目录下的uImage,请问是怎么回事呢?
qlytianya
帖子: 3
注册时间: 2008-09-29 0:04

Re: ubuntu-8.04环境下tftp服务器的建立

#10

帖子 qlytianya » 2009-08-05 16:36

谢谢楼主了!!!
头像
Jarson
帖子: 2371
注册时间: 2008-07-21 9:44
来自: 深圳
联系:

Re: ubuntu-8.04环境下tftp服务器的建立

#11

帖子 Jarson » 2009-08-29 16:14

如果配置了/etc/inetd.conf,不用配置/etc/xinetd.d/tftp都可以了
3.sudo vi /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot

4.sudo vi /etc/xinetd.d/tftp
tftp内容:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
}
即第3、4步选其中之一则可
回复