PXE Boot - Linux server & OpenBSD client
I have an old machine here I'm trying to setup as a diskless client running OpenBSD, booting from my fedora 10 machine.
I've setup tftp and dhcp and both appear to be correct, yet the client just timesout trying to load the pxeboot.
# /etc/xinetd.d/tftp
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot -vv
per_source = 11
cps = 100 2
flags = IPv4
}
[root@blueblock ~]# ls -la /tftpboot/
total 12100
drwxrwxrwx 2 root root 4096 2009-07-25 03:12 .
drwxr-xr-x 26 root root 4096 2009-07-25 02:41 ..
-rwxrwxrwx 1 root root 6696212 2009-02-28 22:41 bsd
-rw-r--r-- 1 root root 5592688 2009-02-28 22:41 bsd.rd
-rwxrwxrwx 1 root root 53276 2009-02-28 22:41 pxeboot
# /etc/dhcpd.conf
host longshot {
hardware ethernet 00:0b:db:07:83:35;
fixed-address 10.0.2.21;
next-server 10.0.2.5;
option root-path "/tftpboot/";
filename "pxeboot";
}
I can connect to the tftp server from other machines on the network and succesfully get the pxeboot file.
The client is getting the right ip address settings, and i can see it connecting to the tftp server.
Jul 25 04:11:51 localhost dhcpd: DHCPDISCOVER from 00:0b:db:07:83:35 via eth0
Jul 25 04:11:51 localhost dhcpd: DHCPOFFER on 10.0.2.21 to 00:0b:db:07:83:35 via eth0
Jul 25 04:11:53 localhost dhcpd: DHCPREQUEST for 10.0.2.21 (10.0.2.5) from 00:0b:db:07:83:35 via eth0
Jul 25 04:11:53 localhost dhcpd: DHCPACK on 10.0.2.21 to 00:0b:db:07:83:35 via eth0
Jul 25 04:11:53 localhost in.tftpd[1457]: RRQ from 10.0.2.21 filename pxeboot
Jul 25 04:11:53 localhost in.tftpd[1457]: tftp: client does not accept options
Jul 25 04:11:53 localhost in.tftpd[1458]: RRQ from 10.0.2.21 filename pxeboot
Is there something simple I've missed here? Or is there anything else I can do to try diagnose the problem.
Edit: I put the pxeboot and bsd files on an openbsd machine I had, and changed the next-server to this machine's ipaddress, enabled it's tftp server, and the client booted first time.
The 1st thing I've spotted was that you are using "-s /tftpboot" in xinetd.conf and adding the dhcpd.conf "root-path" option. Setting the "-s" option for tftpd means that is the "/" directory as seen for tftp client. So your dhcpd.conf should only have "filname /pxeboot", without the root-path option.
From "man tftpd":
-s
Change root directory on startup. This means the remote host does not need
to pass along the directory as part of the transfer, and may add security.
When -s is specified, exactly one directory should be specified on the command
line. The use of this option is recommended for security as well as compatibility
with some boot ROMs which cannot be easily made to include a directory name
in its request.
katriel has already given the answer i would have given, so i'll give some more generic advice instead...
NOTE: this does not answer your original question (getting the pxe client to boot at all), it addresses what to do AFTER that problem is solved.
i would highly recommend using gpxelinux.0 from the syslinux project instead of the pxeboot program you're using (which is probably an old version of syslinux' pxelinux program anyway).
don't be fooled by the name, gpxelinux.0 is a generic PXE bootstrap program which can be used to boot any operating system. I use it to boot linux, windows, clonezilla, and various floppy and CD images (mostly MS-DOS/Freedos images with some firmware update on a floppy - which beats the hell out of burning an update to CD or floppy and carrying it around to every machine).
One of the major advantages of gpxelinux.0 over other pxe boot programs is that it understands more than just the tftp protocol, so you can make it fetch kernels, initramfs and other compressed filesystems, and anything else by http or ftp rather than tftp. this is a LOT faster and, in my experience, a LOT more reliable. you still need a tftp server, because the actual gpxelinux.0 file and it's default cfg file still have to be served by tftp.
it also includes a handy command line option allowing you to manually override boot options (similar to what you can do with grub).
just switching to http for boot images almost eliminated the net booting problems i was having (all but some minor config details like path/filename)
The first thing I'd be trying is to tcpdump
the tftp traffic, to see if the transfer is actually completing successfully; if it is, then presumably the client doesn't like the pxeboot
file -- either it's corrupted, the wrong architecture, or otherwise not suitable.