Configure freenas for pxe

merecol

Cadet
Joined
Apr 14, 2020
Messages
3
hi guys:)I need to configure freenas 11.3 for pxe.I have set a tftp server and a windows share so i can see tftp files in windows.I have also put a windows 10 image in tftp server but what i miss are the directories used from pxe,the files like the boot file and other...how can i set all these files?Where can i see the directories' tree to replicate it in my server?Thanks in advance
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What precisely are you trying to PXE boot? If it is Windows, there should be some documentation on what to set up "over there".
I wrote a lengthy article (in German) about PXE installing FreeBSD:

First and foremost you need a DHCP server telling your PXE clients where they find which files. A DHCP server is not part of FreeNAS but can be set up in a FreeNAS jail ...
 

merecol

Cadet
Joined
Apr 14, 2020
Messages
3
Thanks for the replay:)So the DHCP server says where to find the data.Ok,but how can i save this data in tftp server?I haven't understood well
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You copy it there on the command line ... e.g. with scp.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You put in whatever files are appropriate. This is a little like saying "I have a server, but I don't know what files I need to store on it." We don't know either. :smile: You have to figure out what's correct for your situation. It's no different with PXE.

You might want to go figure out how to PXE boot whatever it is you're wanting to do. If this is for Microsoft Windows 10, Microsoft talks about this over at

https://docs.microsoft.com/en-us/windows/deployment/configure-a-pxe-server-to-load-windows-pe

There are some previous discussions of PXE on the forum, recently one at

https://www.ixsystems.com/community/threads/pxe-server.78682/

There isn't that much to this from the FreeNAS side, you put the files you need in the TFTP server's directory, and it serves them. Done.

However, actually getting PXE to work can be a lot more difficult than that, as you do not have a lot of beginner-level tools to help you debug. It's generally best to take it one step at a time.

Once you get the hang of handing off PXE clients via your DHCP server and get them loading a PXE boot file of some sort from the NAS, your options widen, but are still somewhat limited. Many PXE environments use pxelinux or a variant in order to provide support for an interactive menu which can then allow users to select what they want to load. You can find an example of what that looks like in the forum posting linked above at #9.

From the FreeNAS side, it's "just files". It is knowing what you want to put and where you want to put it and why you want to have it there. It might not be any more complicated than having a single pxeloader bootstrap that does what you need. Or you might want to make the PXE root a SMB share, as shown in the Microsoft docs, and then follow their guidance to get WinPE to boot.

I will note that I've had a lot of trouble getting a useful Win10 installer netbooted.

I've also had a lot of trouble getting FreeBSD netbooted, because FreeBSD's pxeboot is designed to bootstrap into an NFS mount. That part is actually trivially easy, and @Patrick M. Hausen has a very detailed guide on that, I just looked now and it's spot on. My problem is that what I want is for it to be able to launch an installer that can be able to install either i386 or amd64 variants of either 11.3R or 12.1R, and it needs to be able to build packages, and this gets hung up because 'uname -m' is going to be set to whatever the running kernel is, and there's not a good way to make that selectable within the installer. You can use an amd64 FreeBSD kernel to install an i386 FreeBSD distribution tree no problem, but then when you start building ports, some ports will mis-build because they believe themselves to be running on amd64 (which they are). You can use the jail osrelease capability to fudge OS versions but not the CPU architecture. Sigh.
 
Top