PXE boot hangs

Status
Not open for further replies.

balanga

Patron
Joined
Jul 10, 2014
Messages
271
I've been trying to get my FreeNAS box set up as a PXE boot server for some time and am unable to make any progress at the moment without some help...

The problem occurs when I try booting FreeBSD from FreeNAS. The client machine starts to boot OK over the network but then hangs .... I see the following msgs:-

Starting the BTX loader

BTX loader 1.00 BTX version is 1.02
Consoles: internal video/keyboard
BIOS drive A: is disk0

PXE version 2.1, real mode entry point 09c3f:0106
BIOS 560kB/1571200kB available memory

FreeBSD/x86 bootstrap loader, Revision 1.1
(root@releng1.nyi.freebsd.org, Fri Jul 24 04:44:04 UTC 2015)
pxe_open: server addr: 192.168.0.4
pxe_open: server path: /mnt/nas/tfptroot/
pxe_open: gateway ip: 192.168.0.1
\


and it hangs at this point.

I am running dhcpd on a different box but have the parameters for next-server and root-path in dhcpd.conf set to point at FreeNAS. If I change those parameters to use my FreeBSD machine, the PXE client boots successfully. The tftproot directories on both systems are set up identically as far as I can tell, and use a PXE directory based on FreeBSD-10.2-RC1-i386-bootonly.ISO


Where should I look to see what the problem is?
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
I found this in /var/log/xferlog:-


Aug 27 11:38:23 freenas tftpd[55770]: Filename: 'boot/pxeboot'
Aug 27 11:38:23 freenas tftpd[55770]: Mode: 'octet'
Aug 27 11:38:23 freenas tftpd[55770]: Got ERROR packet: TFTP Aborted
Aug 27 11:38:23 freenas tftpd[55772]: Filename: 'boot/pxeboot'
Aug 27 11:38:23 freenas tftpd[55772]: Mode: 'octet'
Aug 27 11:38:23 freenas tftpd[55772]: 192.168.0.109: read request for //boot/pxeboot: success


Looks like a TFTP problem....
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Can anyone shed any light on what is happening?

I have gone through the FreeBSD handbook

https://www.freebsd.org/doc/handbook/network-diskless.html

and actually built the system from source for 10.2-RELEASE as per instructions rather than using a bootonly ISO. It worked on my FreeBSD (10.1-RELEASE) box but not on FreeNAS when I copied the system to the NFS share.

Is there any debug info I can set up to see how far the process has got? Is pxeboot running at this point or has it passed control onto some other program - ie loader?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
We don't get many tftp questions around here. Can you get other OS distributions to work? Try a simple Linux install just to see if it can work. This will narrow down the problem.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
I can load mfsBSD via pxelinux as well as memdisk, hdt and other syslinux utils without any problem.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Then I would say there is a problem with the install media. Can you test to see if the ISO works when used locally? You said it didn't work over NFS which is really strange.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I set up the PXE server following instructions here:-

http://lampros.chaidas.com/index.php/2014/04/03/freebsd-10-as-a-pxe-server-isc-dhcp/

The FreeBSD installation works fine when PXE booting from FreeBSD but the exact same image hangs when either installed or copied to an NFS share on FreeNAS.
I can't work out if it is a TFTPD of NFSD problem, or maybe something else altogether.
You followed those instructions for freenas? You can't do that because freenas doesn't work like normal freebsd. Use the freenas manual if you are trying to set something up for freenas.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Please tell me where in the FreeNAS manual that it mentions how to get PXEBOOT working.

I looked but couldn't find anything. Are you suggesting PXEBOOT won't work with FreeNAS?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Pxeboot has nothing to do with freenas. All freenas provides is a tftp service.

If you need more functionality, you should set up a jail and install what you need.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Pxeboot has nothing to do with freenas. All freenas provides is a tftp service.

If you need more functionality, you should set up a jail and install what you need.

How can I tell if the tftp service has worked successfully?

I don't need any more functionality from FreeNAS. PXE booting requires a tftp service, an NFS share and dhcp to provide an IP address and a pointer where to go next. dhcp is provided by a different box so FreeNAS ought to provide the functionality required, as far as my understanding goes.
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Please tell me where in the FreeNAS manual that it mentions how to get PXEBOOT working.

I looked but couldn't find anything. Are you suggesting PXEBOOT won't work with FreeNAS?
No what I'm saying is you don't configure tftp or nfs like that document tells you to. You follow the freenas handbook. You shouldn't modify the base system like that on freenas.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
No what I'm saying is you don't configure tftp or nfs like that document tells you to. You follow the freenas handbook. You shouldn't modify the base system like that on freenas.
They've been told before exactly how freenas relates to a pxe boot process, but it appears they just don't want to listen.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
No what I'm saying is you don't configure tftp or nfs like that document tells you to. You follow the freenas handbook. You shouldn't modify the base system like that on freenas.

There is no modification of the base system. I simply switched on and configured the NFS and TFTP services via the GUI.
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
It also says

Aug 27 11:38:23 freenas tftpd[55770]: Got ERROR packet: TFTP Aborted

so something isn't quite right

That means that the TFTP daemon recieved an "ERROR" packet, so it aborted. That doesn't indicate a problem with the TFTP service.

Have you tried this from, say, a Windows machine with a TFTP client to test the functionality of the TFTP service? My guess is you are doing something wrong on the client side, because there's not a whole lot of complexity on the server side.

Once you can get in to TFTP yourself, and understand what's going on, then you'll have much more luck getting PXE boot working.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
That means that the TFTP daemon recieved an "ERROR" packet, so it aborted. That doesn't indicate a problem with the TFTP service.

Have you tried this from, say, a Windows machine with a TFTP client to test the functionality of the TFTP service? My guess is you are doing something wrong on the client side, because there's not a whole lot of complexity on the server side.

Once you can get in to TFTP yourself, and understand what's going on, then you'll have much more luck getting PXE boot working.

I do have a working system using TFTP and NFS on a FreeBSD 10.1-RELEASE box using DHCP on that box. When I change two lines in dhcpd.conf on that box to point at my FreeNAS box for those two services, the process hangs. But it only hangs when booting from FreeBSD's pxeboot. there is no problem if I use pxelinux.

On the client side I am booting directly from the LAN so there is little scope for getting things wrong.

I'm wondering if the problem could be the result of a timing issue.... The client is a relatively old ThinkPad. The FreeNAS server is much faster than the FreeBSD server.
 
Status
Not open for further replies.
Top