# tftp not listening on port 69 [solved]

## ben_dash

I'm having a problem where tftp isn't listening on port 69.

I emerged tftp like this:

```
# emerge tftp-hpa
```

and followed the instructions here to get it set up:

http://www.gentoo.org/doc/en/diskless-howto.xml

and then start it like this:

```
/etc/init.d/in.tftpd start
```

using the tfpt config file:

```

alpha root # cat /etc/conf.d/in.tftpd

# Config file for /etc/init.d/in.tftpd

# Remove the -l if you use [x]inetd

INTFTPD_PATH="/mnt/data/xbox/boot"

INTFTPD_OPTS="-l -v -s ${INTFTPD_PATH}"
```

I also set up the DHCP server like this:

```

alpha root # cat /etc/dhcp/dhcpd.conf

authoritative;

ddns-update-style ad-hoc;

subnet 192.168.0.0 netmask 255.255.255.0 {

  range 192.168.0.100 192.168.0.250;

  default-lease-time 259200;

  max-lease-time 518400;

  option subnet-mask 255.255.255.0;

  option domain-name "dashhome.lan";

  option routers 192.168.0.1;

  option domain-name-servers 192.168.0.1;

  option broadcast-address 192.168.0.255;

  class "etherboot" {

    if substring (option vendor-class-identifier, 0, 9) = "Etherboot" {

      filename "/mnt/data/xbox/boot/vmlinuz";

    }

  }

}
```

and restarted dhcpd.

When I rebooted my xbox and told it to boot through Etherboot I confirmed, using Ethereal, that it was sending DHCP requests with the corrent vendor identifier of "Etherboot-5.2" however I can see through nmap that my server, alpha,is not listening on port 69, i.e. tftp.  Consequently the xbox is never able to download an image.

Could this be a permissions problem?

```
alpha root # ls -la /mnt/data

total 12

drwxrwxrwx   7 root root    66 Oct 19 22:14 .

drwxr-xr-x   5 root root  4096 Jun  1 14:16 ..

drwxrwxr-x   2 root users    6 Jun  4 01:29 bens

drwxrwxr-x   3 root users   25 Jun 23 02:09 ellens

drwxrwxr-x   4 root users   35 Oct 20 00:18 music

drwxrwxr-x   7 root users 4096 Oct  9 14:59 shared

drwxrwxrwx  17 root users 4096 Oct 22 23:29 xbox

alpha root # ls -la /mnt/data/xbox/

total 54416

drwxrwxrwx  17 root users     4096 Oct 22 23:29 .

drwxrwxrwx   7 root root        66 Oct 19 22:14 ..

drwxr-xr-x   2 root root      4096 Oct 23 01:28 bin

drwxr-xr-x   2 root root       122 Oct 23 01:04 boot

drwxr-xr-x   9 root root     28672 Oct 22 10:04 dev

drwxr-xr-x  37 root root      4096 Oct 23 01:19 etc

-rw-r--r--   1 root root         0 Oct 22 23:32 fastboot

drwxr-xr-x   2 root root        18 Jul 26 12:11 home

drwxr-xr-x   7 root root      4096 Oct 23 01:28 lib

drwxr-xr-x   4 root root        43 Jul 26 12:11 mnt

drwxr-xr-x   2 root root        18 Jul 26 12:11 opt

-rw-r--r--   1 root root  20839587 Oct 20 00:35 portage-20051018.tar.bz2

-rw-r--r--   1 root root        59 Oct 20 00:35 portage-20051018.tar.bz2.md5sum

drwxr-xr-x   2 root root        18 Jul 26 12:11 proc

drwx------   2 root root        53 Oct 23 01:19 root

drwxr-xr-x   2 root root      4096 Oct 23 01:16 sbin

-rw-r--r--   1 root root  34783982 Oct 20 00:04 stage2-pentium3-2005.1.tar.bz2

-rw-r--r--   1 root root        65 Oct 20 00:06 stage2-pentium3-2005.1.tar.bz2.md5

drwxr-xr-x   2 root root        18 Jul 26 12:11 sys

drwxrwxrwt   2 root root        18 Oct 23 01:18 tmp

drwxr-xr-x  13 root root      4096 Oct 20 00:38 usr

drwxr-xr-x  12 root root       137 Oct 22 23:46 var

alpha root # ls -la /mnt/data/xbox/boot

total 2696

drwxr-xr-x   2 root root      122 Oct 23 01:04 .

drwxrwxrwx  17 root users    4096 Oct 22 23:29 ..

-rw-r--r--   1 root root        0 Oct 22 05:04 .keep

-rw-r--r--   1 root root   550075 Oct 22 23:38 System.map-2.4.31-xbox

lrwxrwxrwx   1 root root        1 Oct 20 00:31 boot -> .

-rw-r--r--   1 root root    22489 Oct 22 23:35 config-2.4.31-xbox

-rw-r--r--   1 root root  1084003 Oct 22 23:35 kernel-2.4.31-xbox

-rw-r--r--   1 root root  1090048 Oct 23 01:04 vmlinuz
```

/mnt/data/xbox is exported as an nfs share and my goal is to make it so the xbox boot using Etherboot and has an nfs root filesystem.  Note that I did specify the nfs root with mknbi.

Please let me know if you have any ideas what I could try to get tftp listening... or is it port 69 UDP?  In which case, do you know how to confirm that it's running properly since it seems unresponsive?

***UPDATE***

Hmmm... it looks like my xbox's Etherboot is sending a bootp request to UDP port 67 and not tftp on 69.  Does anyone know what's going on?

Thanks!

BenLast edited by ben_dash on Sun Oct 23, 2005 4:38 pm; edited 1 time in total

----------

## ben_dash

My xbox is now booting through Etherboot.

It seems that some of the diskless gentoo howtos forget to mention that bootp is potentially part of the Etherboot question.  I solved my problem by changing my /etc/dhcp/dhcp.conf to this:

```
alpha root # cat /etc/dhcp/dhcpd.conf

authoritative;

ddns-update-style ad-hoc;

subnet 192.168.0.0 netmask 255.255.255.0 {

  range 192.168.0.100 192.168.0.250;

  default-lease-time 259200;

  max-lease-time 518400;

  option subnet-mask 255.255.255.0;

  option domain-name "dashhome.lan";

  option routers 192.168.0.1;

  option domain-name-servers 192.168.0.1;

  option broadcast-address 192.168.0.255;

  # Tell the DHCP server it's authoritative for this subnet.

  authoritative;

  # Allow BOOTP to be used on this subnet.

  allow booting;

  allow bootp;

#  range dynamic-bootp 192.168.0.8 192.168.0.16;

#  class "etherboot" {

#    if substring (option vendor-class-identifier, 0, 9) = "Etherboot" {

      option root-path              "192.168.0.1:/mnt/data/xbox";

      filename "/boot/vmlinuz";

#    }

#  }

}
```

Note that I have temporarilly commented out the class section and propagated the etherboot settings to all potential clients.  I'll fine tune this in the future since I would prefer to control which client gets which filename.

My next problem is that the nfs root filesystem isn't mounting properly, however, things are progressing

----------

