PXE boot hangs

Status
Not open for further replies.

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
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.

I have no idea what you're currently doing, what you've accomplished already, and what specifically is giving errors.

For starters, what does "booting directly from the LAN" even mean? Are you properly booting from the TFTP server or not? When you say "the process hangs", what process? Any errors? Are you not POSTing? Do you begin booting, but the boot process hangs?

Let's go through this one at a time:
  1. Have you been able to successfully boot using PXE?
  2. If you were able to successfully boot, what was your setup that let you boot? How were those services configured?
  3. If it's not working, what are any errors you are getting?
  4. If it's not working, have you confirmed that you can access the TFTP server, and that you are receiving an IP address from the new DHCP server?
---
I know this has been said before, but I'm going to repeat it, because I think you're you're thinking this is way more complicated than it needs to be:

PXE is only two services: DHCP and TFTP. No more, no less. You must add a simple config to the DHCP server to tell a PXE-compatible network card to look at the TFTP server and the PXE configuration file. On the TFTP server, you much have that PXE configuration file setup so that the PXE-compatible NIC knows what files to start booting.

Once you have TFTP set up, you're done with anything related to FreeNAS. However you set up the PXE configuration file is completely independent of your FreeNAS setup. That's up to you to decide what to boot/how to boot it; FreeNAS doesn't care. It just serves the files.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
I have no idea what you're currently doing, what you've accomplished already, and what specifically is giving errors.

I did try to fully explain the situation in the first msg in this thread.

I will re-iterate:-

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.


For starters, what does "booting directly from the LAN" even mean?

It means that I have selected LAN as my first boot option in the client's BIOS.

Are you properly booting from the TFTP server or not? When you say "the process hangs", what process? Any errors? Are you not POSTing? Do you begin booting, but the boot process hangs?

Let's go through this one at a time:
  1. Have you been able to successfully boot using PXE?
  2. If you were able to successfully boot, what was your setup that let you boot? How were those services configured?
  3. If it's not working, what are any errors you are getting?
  4. If it's not working, have you confirmed that you can access the TFTP server, and that you are receiving an IP address from the new DHCP server?
As you can see above, the client has picked up various parameters from the dhcp server (which is not on my FreeNAS box)

pxe_open: server addr: 192.168.0.4
pxe_open: server path: /mnt/nas/tfptroot/
pxe_open: gateway ip: 192.168.0.1

192.168.0.4 is my FreeNAS box

---
I know this has been said before, but I'm going to repeat it, because I think you're you're thinking this is way more complicated than it needs to be:

PXE is only two services: DHCP and TFTP. No more, no less. You must add a simple config to the DHCP server to tell a PXE-compatible network card to look at the TFTP server and the PXE configuration file. On the TFTP server, you much have that PXE configuration file setup so that the PXE-compatible NIC knows what files to start booting.

Once you have TFTP set up, you're done with anything related to FreeNAS. However you set up the PXE configuration file is completely independent of your FreeNAS setup. That's up to you to decide what to boot/how to boot it; FreeNAS doesn't care. It just serves the files.

I understand the principle, but I can't figure out why it isn't working. As far as I can tell I have configured everything correctly but the boot process hangs. The same setup works on FreeBSD but not on FreeNAS, albeit different hardware is involved. Also pxebooting is successful on FreeNAS using pxelinux, but FreeBSD's pxeboot hangs. I'm trying to figure out why... and would appreciate any suggestions as to where I should look to see what I may have overlooked, rather than being told that I should not be trying to use FreeNAS as a PXE boot server.
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
You said pxelinux works fine. This says its not a problem on freenas.

You said pxeboot doesn't work. Ever think that it might be the pxeboot image you're using?
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
You said pxelinux works fine. This says its not a problem on freenas.

You said pxeboot doesn't work. Ever think that it might be the pxeboot image you're using?

I know that the same pxeboot works on another system running FreeBSD 10.1-RELEASE.

What I don't know is where the hang takes place - whether it is pxeboot or the program that follows on...
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
I'm really confused.

You say you can't boot from FreeNAS, but then you say you were able to do it using pxelinux. If you can boot anything from FreeNAS, then FreeNAS is working.

You say the same setup works on FreeBSD but not FreeNAS. I guarantee you, if it was exactly the same, it would be working, or we're now in bug land.

Are you sure your server path has the correct pxe config files? Are the paths adjusted for the new file structure? Do you have all the permissions set correctly on your files?
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
If the paths or permissions were incorrectly set I would get an error. Believe me, I made plenty of errors before getting this working at all. With the FreeNAS set up there is no visible error. The process simply hangs. Whilst both systems have more or less the same setup, they are running different versions of FreeBSD and on different hardware. I did wonder whether there might be some timing issue causing the hang...

Is there any way to run pxeboot with debug information switched on just to see how far it gets?
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
That would require you to configure PXE on your network card. My guess is no.

You didn't answer my earlier question: have you ever successfully booted anything from FreeNAS? You made it sound like you were able to get linux booted earlier.

My money is still on permissions. If I have to guess, I think your problem is likely that the NFS server doesn't have a proper authorized network or authorized hosts set up (check under "Advanced Mode" in your NFS share).
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Under 'Advanced Mode' the permissions are Maproot User -> root


[root@freenas ~]# showmount -e 192.168.0.4
Exports list on 192.168.0.4:
/mnt/nas/tftproot Everyone
[root@freenas ~]#

I have just noticed that if I switch off NFS, the client gets to the same point, which I find strange as I would have expected an error msg to appear, so, you're right, it does look as though the NFS service is not working as it should.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Solved!!!!!

As it turned out it was an NFS problem.... After I ticked the 'Serve UDP NFS clients:' option the client booted up to the normal FreeBSD boot screen.

Thanks for all the help!
 
Status
Not open for further replies.
Top