我在 VirtualBox VM 中运行 Ubuntu 12.04。我已经安装了这个tftpd-hpa
包。我用它来启动一个嵌入式 Linux 系统,我注意到在我的虚拟机第一次启动时,它不起作用,但重新启动tftpd-hpa
服务使它每次都能工作,直到下次启动。
今天,我运行了德州仪器 (TI) 的一个 shell 脚本,该脚本可能会破坏我的 tftpd 配置,现在我根本无法让它工作。我能够连接,但传输超时,甚至到本地主机(我也尝试过 127.0.0.1):
steve@steve-VirtualBox:~$ tftp
tftp> connect localhost
tftp> status
Connected to localhost.
Mode: netascii Verbose: off Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> get zImage
Transfer timed out.
tftp>
Run Code Online (Sandbox Code Playgroud)
请注意,/var/lib/tftpboot/zImage
确实存在,但是对于不存在的文件,我得到了完全相同的行为。
以下是内容/etc/default/tftpd-hpa
:
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
Run Code Online (Sandbox Code Playgroud)
这是/etc/xinetd.d/tftp
:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user …
Run Code Online (Sandbox Code Playgroud)