Add a second PXE Boot Option

i am searching for a “best-practice” way to add a second PXE Boot option.

My scenario:

I have a FOG Server ( Running Version 1.3.5-RC-10 ) and a external DHCP. Now i have a second service in the network running or booting over PXE. I can not change the DHCP options so i would like to add sth. to FOG.

If there isn’t a match then the original (old default) menu is selected.

goto fog.local

If there is a match then the flow jumps down to the label

:chainboot

Sets the next server (dhcp option 66) and boot filename (dhcp option 67) to the new values required for OpenSLX and then chain boots (fwiw that should be on one line, its a bit deceiving because of the line wrap, that is all one line) into the new environment.

any reason you don’t want to set it for “hide menu” and a 1 second timeout?
your custom default menu item (which will be chosen even if the user doesn’t see it) can have a collection of conditions to test against to only make the relevant hosts boot to the OpenSLX server

For example: Room B has 64 Clients - if i would like to boot into OpenSLX i need to boot manually each client into the FOG BootMenu to start OpenSLX. If i select the “default” option as @Wayne-Workman mentioned - all other clients - e.g. room A - would be affected.

Thank you for your detailed information. I do see a path forward from here with a few potential failures.

FOG uses a number of other technologies to allow their magic to work. One of those technologies is from the iPXE project. iPXE gives fog the dynamic pxe boot capabilities. The FOG management code can build the iPXE boot menus and actions dynamically based on what the client should be doing at a specific point in time. While FOG can create iPXE menus dynamically, iPXE can’t directly interact with FOG so there is no way for the iPXE kernel (undionly.kpxe or ipxe.efi) to know what FOG knows about the target computers. The iPXE kernel can only know about what it finds out about via dhcp or what its been told by FOG creating the iPXE menu in a certain way.

Now to the issue.
From your post you have 2 rooms of computers. Both rooms (sets) of computers will be managed by FOG. One should boot through to the local hard drive and the second room should booth through to OpenSLX via an iPXE chain command. These computers are on the same subnet. During the iPXE mode, iPXE doesn’t know how to interact with FOG.

So the question is how can iPXE know which set a pxe booting computer belongs in? Remember we are dealing with computers so intrinsic knowledge is not possible. iPXE only has these commands avaialble: http://ipxe.org/cmd

The one answer I can think of is by the device’s mac address. You would have to maintain a list of mac addresses that a pxe booting computer would be tested against to identify which group the target computer falls in. If a mac address match is found then the pxe booting computer then could be redirected to OpenSLX.

We have here two rooms ( A and B ) on the same subnet with the same DHCP settings.

Both rooms are managed via one FOG-Server and have a local WIN7 image.

Now, we would like to use room B for OpenSLX virtualization. Therefore we need another next-server entry via DHCP. But this is not cool because we have to decide between FOG and OpenSLX. As a fact, OpenSLX uses a PXE boot too. So i thought there could be a way to use both.

Sure, i could add a new image to FOG with boots to OpenSLX but therefore i need to re-image the room all the time if someone needs WIN7.

I am thinking of managing both rooms via FOG and be able to start OpenSLX individually on a client.

Thanks to @george1421 i could add an option to the BootMenu. But the problem is, we are not using this menue at the time and it is not individually for the clients.

For example: Room B has 64 Clients - if i would like to boot into OpenSLX i need to boot manually each client into the FOG BootMenu to start OpenSLX. If i select the “default” option as @Wayne-Workman mentioned - all other clients - e.g. room A - would be affected.

So i was lokking for an option - sth. like a flag " Boot OpenSLX " - for each client and i found the “Host Bios Exit Type” option with is nearly what i need. But i do not need grub, i need sth. like a PXE boot to another IP.

I am new to the whole PXE Grub boot topic. As @Sebastian-Roth mentioned there is a way to edit the /var/www/html/fog/lib/fog/bootmenu.class.php for “other” grub commands.

So i am stuck at the point to connect grub to load from another server. I am not sure if booting into grub.exe is a step to far because i did not found a working way to connect grub to pxe. Something like @george1421 mentioned to chainload from another IP would be great. But i am not familar with that topic.

Would be nice if someone could help here. If there are any kind of questions feel free to ask!

Not sure, but if i select a option for “Menu Show with:” i cannot select a group of hosts?
The Problem here is i have different Computer-Rooms in one room i would like so start OpenSLX via PXE but the othe room should not be affected.

I think this could work if i add a new Menu Entry for my PXE Boot - but then, i need to activate the menu and select it - or? If i select the “Default Item:” then it will be applied to all clients - right?

What do you think? This method from @Sebastian-Roth seems to be the right way. I will check if i can chainload my PXE over it.

@Wayne-Workman Ok just for clarity then, if the OP turned off the boot from hard disk as the default option and created a new menu entry and set that as default, it would boot through to the second pxe server (assuming my chain command is correct)?