Fresh VM and Fog 1.2.0 install having issues with iPXE boot
-
Just an update, I am able to upload and deploy images (once chose the right options for the image lol).
Really the only things that I need to fix now seem to be the TFTP server needing to be input during the boot. I was able to find out the settings that are needed for my Adtran router and switches to TFTP correctly. On the router I had to enable BPDU filter in the Spanning Tree options, then enable edge port mode on the switch ports that have clients. Also make sure your content filter isn’t blocking the Fog server (facepalm). Maybe this can help any one with a similar set up to ours.
-
@jcook If you are being questioned about the fog server IP during booting then your dhcp server is not sending out dhcp option 66 {next-server}. On the image you posted, I see a spot for tftp server (which is blank in the picture), did you enter the IP address of the fog server there?
Thinking a bit longer, if you are being prompted for the up address of the FOG server, then the ipxe kernel is making it to the target computer. Can you confirm that you have RSTP or port-fast enabled on the network port that is connected to the target computer? The network port will wink as it transitions between the PXE ROM, and the iPXE kernel. If the port isn’t forwarding (because its still in spanning tree learn mode) the iPXE kernel may not hear the next server reply.
-
@george1421 The switches and routers are showing they are in RSTP as far as I can tell. I was reading up on “edge-port mode” for this equipment and it said that “will transition directly in to the forwarding state.” I haven’t put the unmanaged switch between the client and the manage switch again but will see if that helps. I will also add fog to the TFTP field and see if it helps (i think I have before but doesn’t hurt).
I will probably also reach out to my switching support and see if they can help me with option 66 if adding it to the TFTP field doesn’t help.
EDIT: Adding the Fog ip the empty TFTP field didn’t help, also the unmanaged switch between client and core has the same result, still asking for TFTP ip. Is there a way to hard code this somewhere is Fog?
-
@jcook said
EDIT: Adding the Fog ip the empty TFTP field didn’t help, also the unmanaged switch between client and core has the same result, still asking for TFTP ip. Is there a way to hard code this somewhere is Fog?
See that information is suppose to come from the second dhcp request from the iPXE kernel. To answer your question, yes you can hard code it in, but you will need to build your own ipxe kernel (not hard at https://rom-o-matic.eu/)
This might get you started https://forums.fogproject.org/topic/6347/usb-boot-bios-client-into-fog-menu
-
@george1421 Thanks for the info. I will probably give that a try later, and see how it goes.
I have the option to make the DHCP options be given in either ASCII or as an IP address or hex for that matter. Does is make a difference what I choose?
-
@jcook said:
I have the option to make the DHCP options be given in either ASCII or as an IP address or hex for that matter. Does is make a difference what I choose?
You can try ASCII instead of IP address but I kind of doubt this will make a difference. But please add another option (number: 60, type: String, value: PXEClient) and see if that helps.
-
@jcook If you experience no joy on this we may need to get a pcap file (tcpdump) of the dhcp discovery process to see what is or isn’t being sent. As long as the pxe client and fog server are in the same subnet/vlan its pretty easy to collect.
While this part isn’t specifically a FOG issue, it is one of the more common problems to setup. If you hang in there we can usually help you through this part. While PXE booting is not difficult to setup, there are a few parts that need to be configured in a specific order.
-
Fog worked great before so I’m definitely gonna get it working again one way or another. Since our school is fairly small I actually have time over the summer to image computer individual if I need too. At the moment though, I have all the computers on the campus with this Fog server network booting by default. Some of the teachers can handle pressing escape to skip it, so I have to go do it for them. But its a minor inconvenience compared to the power of Fog! I am going to call my switching support and see if they can help me see if the options are being passed. If not I can temporarily move fog to the same sub net and do the tcpdump on it again. If I have to do the capture I will post file.
-
I built my own iPXE kernel with this:
#!ipxe dhcp set next-server 172.18.164.6 set filename undionly.kpxe chain tftp://${next-server}/${filename}
Then saved the file to my fog server and updated option 67 to the file name. Also changed owner and group. Boot client and at first it didn’t ask for the IP, but it loops and never loads the Fog menu. I think I can see why its doing it but don’t what change.
-
@jcook That is because you have it looping itself.
It’s ALWAYS going to be loking to get the next-server and filename which is the same you’re telling it to request.
Your ipxe kernel file should be
#!ipxe dhcp set next-server 172.18.164.6 chain tftp://${next-server}/default.ipxe
-
It still asks me for the IP of the Fog server. This stuff is mostly beyond me but maybe that will help yall out lol.
-
@jcook What’s the contents of your /tftpboot/default.ipxe file?
-
#!ipxe cpuid --ext 29 && set arch x86_64 || set arch i386 params param mac0 ${net0/mac} param arch ${arch} param platform ${platform} param product ${product} param manufacturer ${product} param ipxever ${version} param filename ${filename} isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme :bootme chain http://172.18.164.6/fog/service/ipxe/boot.php##params
-
Here is a packet capture from the router that the support team was able to set up. Maybe it will shine some light.
0_1461165877412_000001_FOG_1461164083.pcap
undionly.kpxe.new is actaully the original that came with Fog that I renamed.
-
Have your tried my last suggestion yet?
But please add another option (number: 60, type: String, value: PXEClient) and see if that helps.
In that pcap file I see option 67 set to undionly.kpxe.new… No wonder you are back to the tftp server prompt…
-
@Sebastian-Roth I added the option 60, but it didn’t seem to help, but it did give this"
PXE-E51: No DHCP or proxyDHCP offers were received.
-
How can I download/overight the files in /tftpboot/ to be the defaults? I should just given them new names but now I can’t remember what I renamed them to 100%.
-
Tom, when I use that iPXE kernel you suggested i get something similar to the following (transcribed from a video i had to freeze frame to catch lol) :
tftp://172.18.164.6/default.ipxe... ok params: command not found Could not boot: Exec format error (http://ipxe.org/2e022001)
Not sure if it matter, but my cell phone videos is hard to read the 0’s or 8’s in that url.
-
@jcook just guessing this is the ipxe file you created?
-
Ok, this thread has gone on for 3 pages now. I think we need to regroup and understand where things are at.
My first recommendation is for the OP to upgrade to the latest trunk version (if not already there). Trying to chase issues with 1.2.0 doesn’t add value since its so old. That way we will have the latest kernel and inits as well as a known configuration for ipxe. My recommendation would be to spin up a new VM and install the trunk version directly on the vm and bypass upgrading from 1.2.0 stable.
Secondly we need to identify the dhcp server being used here and if at all possible use either a microsoft dhcp server or a linux dhcp server. Lets try to remove any (random) dhcp server and proxy dhcp issues from the picture.
Third, I think we have the networking environment fixed with the portfast setting in the switch.
(this will sound a bit condescending but its not intended to be that way). Setting up the environment for hosting FOG is just not that difficult when we are using a consistent build and a standard pxe booting resources. Simply if your dhcp server doesn’t support pxe booting properties, then get a different one.