我见过人们讨论这个问题,但似乎没有人知道答案。
当我尝试启动tftpd时,通过命令:
/etc/init.d/tftpd-hpa start我得到的回报是:
[....] Starting tftpd-hpa (via systemctl): tftpd-hpa.serviceJob for tftpd-
hpa.service failed because the control process exited with error code. See
"systemctl status tftpd-hpa.service" and "journalctl -xe" for details.
failed!我的/etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
TFTP_USERNAME="fly!"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
RUN_DAEMON="yes" # maybe no need for that
#OPTIONS="-l -s /var/lib/tftpboot"systemctl status tftpd-hpa.service输出
● tftpd-hpa.service - LSB: HPA's tftp server
Loaded: loaded (/etc/init.d/tftpd-hpa; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Пн 2016-11-28 19:45:33 +05; 4min 38s
Docs: man:systemd-sysv-generator(8)
Process: 3217 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=1/FAI
ноя 28 19:45:33 serverubuntu systemd[1]: Starting LSB: HPA's tftp server...
ноя 28 19:45:33 serverubuntu tftpd-hpa[3217]: * Starting HPA's tftpd in.tftpd
ноя 28 19:45:33 serverubuntu tftpd-hpa[3217]: /tftpboot missing, aborting.
ноя 28 19:45:33 serverubuntu systemd[1]: tftpd-hpa.service: Control process exit
ноя 28 19:45:33 serverubuntu systemd[1]: Failed to start LSB: HPA's tftp server.
ноя 28 19:45:33 serverubuntu systemd[1]: tftpd-hpa.service: Unit entered failed
ноя 28 19:45:33 serverubuntu systemd[1]: tftpd-hpa.service: Failed with result '
lines 1-13/13 (END)为什么它不起作用?怎么修呢?
OS - Ubuntu Server 16.04 LTS
0:69更改为0.0.0.0:69,还将/etc/init/tftpd-hpa.conf中的'start on‘条件更改为:启动(文件系统和网络设备-up IFACE!=lo),它也不工作。发布于 2017-03-06 09:59:25
这条路是错误的:
3217:/tftpboot丢失,中止。
tftpd-hpa正在寻找/tftpboot,我希望您在这里遵循/var/lib/tftpboot中设置它的官方PXE教程
快速修复,取消对/etc/default/tftpd-hpa中下面一行的注释:
OPTIONS="-l -s /var/lib/tftpboot"发布于 2017-09-13 14:59:50
我也有以下问题:
root@ubuntu:/# sudo service tftpd-hpa restart
Job for tftpd-hpa.service failed because the control process exited with error code. See "systemctl status tftpd-hpa.service" and "journalctl -xe" for details.
root@ubuntu:/etc/default# vi tftpd-hpa
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="\tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s"在将TFTP_DIRECTORY="\tftpboot"更改为TFTP_DIRECTORY="/tftpboot"之后,它可以工作:
root@ubuntu:/# /etc/init.d/tftpd-hpa start
[ ok ] Starting tftpd-hpa (via systemctl): tftpd-hpa.service.发布于 2020-05-25 18:38:05
我也有同样的问题,我用的是Debian 10。
执行以下命令:
sudo apt install tftpd-hpa安装后,您需要编辑配置文件,在文本编辑器中打开它:
sudo nano /etc/default/tftpd-hpa然后使文件如下所示:
TFTP_USERNAME="nobody"
TFTP_DIRECTORY="/tftpboot/"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create -v"创建文件目录并分配权限:
sudo mkdir /srv/tftp
sudo chown tftp:tftp /srv/tftp重新启动TFTP服务器以应用更改:
sudo /etc/init.d/tftpd-hpa restart我在https://ixnfo.com/en/install-and-configure-tftpd-hpa.html上得到了指示
https://unix.stackexchange.com/questions/326589
复制相似问题