Difference between revisions of "TFTP"

From ArchWiki
Jump to: navigation, search
(replaced old templates with new ones)
(Added troubleshooting section with "tftpd startup fails if ipv6 is disabled" subsection)
Line 30: Line 30:
 
To start the daemon without a configuration file:
 
To start the daemon without a configuration file:
 
  # /usr/sbin/in.tftpd -l -s path/to/folder/to/export
 
  # /usr/sbin/in.tftpd -l -s path/to/folder/to/export
 +
 +
== Troubleshooting ==
 +
=== tftpd startup fails if ipv6 is disabled ===
 +
If tftpd startup fails without leaving error messages, it might be because ipv6 is disabled and you are not explicitly telling tftpd not to use ipv6. You can make tftpd start by enabling ipv6 or by telling tftpd to only use ipv4, adding the '-4' switch to /etc/conf.d/tftpd
 +
 +
{{hc|/etc/conf.d/tftpd|<nowiki>
 +
TFTPD_ARGS="-l -4 -s /var/tftpboot"
 +
</nowiki>}}

Revision as of 12:28, 19 March 2012


The Trivial File Transfer Protocol (TFTP) provides a minimalistic means for transferring files. It is generally used as a part of PXE booting or for updating configuration and firmware on devices which have limited memory such as routers and printers.

This article describes how to set up a tftpd server under Arch Linux using the tftp-hpa package.

Installation

Install the package tftp-hpa which can be found in the official repositories.

Configuration

The configuration for tftpd is in /etc/conf.d/tftpd

The default configuration is:

#
# Parameters to be passed to TFTPD
#
TFTPD_ARGS="-l -s /var/tftpboot" 

The directory /var/tftpdboot is created automatically when tftp-hpa is installed.

For a complete list of parameters:

$ man in.tftpd

Run

To start the daemon at boot, add tftpd to the DAEMONS array in /etc/rc.conf.

To start the daemon manually:

# /etc/rc.d/tftpd start

To start the daemon without a configuration file:

# /usr/sbin/in.tftpd -l -s path/to/folder/to/export

Troubleshooting

tftpd startup fails if ipv6 is disabled

If tftpd startup fails without leaving error messages, it might be because ipv6 is disabled and you are not explicitly telling tftpd not to use ipv6. You can make tftpd start by enabling ipv6 or by telling tftpd to only use ipv4, adding the '-4' switch to /etc/conf.d/tftpd

/etc/conf.d/tftpd
TFTPD_ARGS="-l -4 -s /var/tftpboot"