4

I am trying to pxe-boot a machine (client), and in the process I am trying to setup a tftp server that this machine can boot off.

On the server, which runs Ubuntu 10.10, I have setup dhcp, dns, nfs, and tftp-hpa servers. All the servers/deamons start fine. I tested the tftp server by using a tftp client and downloading a file that the server directory hosts.

My /etc/xinet.d/tftp looks like this

service tftp
{
    disable                 = no
    socket_type             = dgram
    wait                    = yes
    user                    = nobody
    server                  = /usr/sbin/in.tftpd
    server_args             = -v -s /var/lib/tftpboot
    only_from   = 10.1.0.0/24
    interface   = 10.1.0.1
}

My /etc/default/tftpd-hpa looks like this

RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"

My /var/lib/tftpboot/ directory looks like this

 initrd.img-2.6.35-25-generic-pae
 vmlinuz-2.6.35-25-generic-pae
 pxelinux.0
 pxelinux.cfg
   -- default

I did

 sudo chmod 644 /var/lib/tftpboot/pxelinux.cfg/default
 chmod 755 /var/lib/tftpboot/initrd.img-2.6.35-25-generic-pae
 chmod 755 /var/lib/tftpboot/vmlinuz-2.6.35-25-generic-pae

/var/lib/tftpboot/pxelinux.cfg has the following contents

 SERIAL 0 19200 0
 LABEL linux
 KERNEL vmlinuz-2.6.35-25-generic-pae
 APPEND root=/dev/nfs initrd=initrd.img-2.6.35-25-generic-pae nfsroot=10.1.0.1:/nfsroot ip=dhcp console=ttyS0,19200n8 rw

I copied /var/lib/tftpboot/pxelinux.0 from /usr/lib/syslinux/ after installing the package syslinux-common.

Also just for completeness, /etc/dhcp3/dhcpd.conf the following lines (relevant to this interface)

subnet 10.1.0.0 netmask 255.255.255.0 {
  range 10.1.0.100 10.1.0.240;
  option routers 10.1.0.1;
  option broadcast-address 10.1.0.255;
  option domain-name-servers 10.1.0.1;
  filename "pxelinux.0";
}

When I boot the client machine, and watch the output over the serial port, I notice that the client requests an ip address from the server and gets it. Then I see TFTP being displayed - indicating that it is trying to connect to the TFTP server. This succeeds, and I see TFTP.|, which return immediately displaying the following message

PXELINUX 4.01 debian-20100714  Copyright (C) 1994-2010 H. Peter Anvin et al
No DEFAULT or UI configuration directive found!
boot: 

/var/log/syslog shows

Feb 20 15:24:05 ch in.tftpd[2821]: tftp: client does not accept options

What option is it talking about in the syslog? I assume it is referring to OPTIONS or TFTP_OPTIONS, but what am I doing wrong?

spockaroo
  • 51
  • 1
  • 1
  • 4
  • Turns out some more googling pointed to the fact that "tftp: client does not accept options" is a benign message (http://syslinux.zytor.com/archives/2003-June/002093.html). So I just replaced my pxelinux.0 (which i got from the syslinux package) with a version of this file i had backed-up. pxe boot goes through now and i don't get the error message "no DEFAULT or UI configuration directive found" any more. I don't want to post an answer to my own question and select it as the best answer, so I guess the new question I have is - what is the correct way to get the *right pxelinux.0* file? :) – spockaroo Feb 20 '11 at 22:42
  • There is no *right* pxelinoux.0. The only thing to keep in mind is that you should not mix syslinux binaries from different versions (e.g. pxelinux.0 from an old package with menu.c32 from a newer one) – Mircea Vutcovici Mar 17 '11 at 13:51

4 Answers4

5

for "no default or ui configuration directive found" try change

from  KERNEL vmlinuz-2.6.35-25-generic-pae
      APPEND ....optopns...
to    DEFAULT vmlinuz-2.6.35-25-generic-pae ....options...

or use UI menu. it help me with ubuntu 10.10 pxeboot.0

carver
  • 51
  • 2
1

You are missing the default in DEFAULT file - in your case the /var/lib/tftpboot/pxelinux.cfg should have

"DEFAULT linux"

line at the beginning.

Marko
  • 227
  • 4
  • 7
  • 15
seiffs
  • 11
  • 1
1

Be careful to use correct versions of menu.c32 or vesamenu.c32. Otherwise you'll get the error message: "Menu.c32 not a com32r file". The correct versions of those files can be found from /boot directory. Also, if the parent system is 64 bit you'll need the 32 bit libraries installed. At the above example "default menu.c32" doesn't work anymore, it should stay: UI menu.c32 or UI vesamenu.c32.

Tomi Aalto
  • 11
  • 2
0

You're missing the default entry in /var/lib/tftpboot/pxelinux.cfg/default

I had the same problem.

Here is the contents of my default file:

DEFAULT menu.c32

prompt 0

timeout 5

LABEL linux

        menu default
        menu label Linux
        KERNEL fc1/vmlinuz-2.4.22-1.2115.nptl
        APPEND initrd=fc1/pxeboot.img.gz ramdisk=8192

menu default is necessary.

Here is the entry in the Syslinux wiki

indiv
  • 265
  • 2
  • 10
Feiticeir0
  • 434
  • 3
  • 11