Adding a custom host task
-
OK, if I understand what you want to do (Add a custom ipxe boot menu item). I have been able (on paper) put together a partial solution for you. This solution assumes you are running a SVN trunk upgrade from the core 1.2.0 release.
If you go into the FOG settings and add a custom IPXE menu item. Add these settings:
Menu Item: Dutch.Exams
Description: Dutch Exams ExampleParameters:
kernel /bootimages/facet/vmlinuz0 rootflags=loop initrd=initrd0.img root=live:/configured-bcld.iso rootfstype=auto ro rd.live.image rd.live.ram rd.luks=0 rd.md=0 rd.dm=0
initrd /bootimages/facet/initrd0.img
boot || goto MENUThen press save.
You can view the results of this setting by pointing your browser at the following url
http://<fog_server_ip>/fog/service/ipxe/boot.phpThis will show you the ipxe menu that will be presented to the ipxe menu application
The file path on the fog server is (on rhel) /var/www/html/fog/service/ipxe/
Now the part I don’t know about. You will notice that in my ipxe menu I have a path for the boot kernel. I don’t know if we can create a symbolic link from the path above to where your files are stored and then include that in the ipxe menu command. Or just go the easy route and dump your exam kernel and initrd files in /var/www/html/fog/service/ipxe I think it would be safer for your files to have a sym link from /var/www/html/fog/service/ipxe/<something > to your file location.
As I said (on paper) this should work without having to dig into the FOG code if you are willing to use the SVN trunk.
I found a wiki that talks about setting up dban under FOG: https://wiki.fogproject.org/wiki/index.php/Include_any_ISO_in_the_FOG_Bootmenu
-
@Sebastian-Roth said:
Not sure if you are aware of this. The boot menu is mostly generated by /var/www/fog/lib/fog/BootMenu.class.php which itself is called when clients access http://ip.of.fog.srv/fog/service/ipxe/boot.php
You can simulate this by opening the URL in your browser and adding a parameter with a MAC address of one of your clients: http://ip.of.fog.srv/fog/service/ipxe/boot.php?mac=aa:bb:cc:dd:ee:ff
You should see the full menu code in your browser. Hope I could give you a little more insight into this.
Tagging this for the wiki
-
@StefanTS @george1421 I did recently ask the iPXE guys about network booting… They said something to the effect of - not all filesystems support being accessed over HTTP, and they recommended mounting the ISO as read only via NFS, and then having the boot menu entries point to that.
Booting DBAN over HTTP works, but in my experience, most other ISOs won’t work over HTTP.
Here’s the iPXE thread: http://forum.ipxe.org/showthread.php?tid=7859
Those guys give solid advice, this needs added to the wiki -
@StefanTS maybe I’m misreading but are asking to create a new task as in download/upload? If you are is ask that you upgrade to trunk as I have created a plugin that will allow you to define a new task type. Of course it would also mean you need to edit your own init once complete so they can interact appropriately for your new task type.
-
@Wayne-Workman said:
@StefanTS @george1421 I did recently ask the iPXE guys about network booting… They said something to the effect of - not all filesystems support being accessed over HTTP, and they recommended mounting the ISO as read only via NFS, and then having the boot menu entries point to that.
See that’s where we need a bit of clarification on the OP post. Looking at the additional information provided, I don’t see any reference to an ISO in his commands (even though he did mention it in his OP) What I see from his commands are sending the kernel and init file system to a target machine via a menu item, much like how FOG works. But then he also mentions tasks and the task type table. Which makes me think he might be trying to deploy this to a client machine and not via the FOG ipxe menu as I originally thought.
-
@george1421
I get the confusion with the ISO after rereading, my bad. The ISO was the initial test. After that we’ve used the PXE client, ie vmlinuz0 + initrd0.img. In fact, the ISO wouldn’t boot via pxe (problems mounting its filesystem)@Tom Elliott
What I wanted to do, and did via the hack, is indeed use the webinterface in fog. We have a group made for all computers in a classroom so we can simply click on the group > basic tasks > start facet. That way all 32 computers in the classroom boot the exam interface. When the exams are done we remove the facet task and the computers go back to booting form the harddisk with their regular image.
Using the iPXE bootmenu for this was not a solution (apart from testing network boot itself) as we’d have to manually boot 32 PC’s or give students access to the boot menu. (it’s passworded)
I’ll upgrade my testserver at home and see if the latest version offers better support for this out of the box.I understand hacking the code should not be the way to go. Unfortunately in 1.2.0 this option seems to be hardcoded. Upgrading obviously would be better in the long run, but as it is it’ll be too much of a hassle. 0.32 > 1.2.0 came with enough issues for us already. I’ll save that task for next year. (meaning jan-feb)
As for ISO over HTTP. It works fine for us most of the time (we have a rich collection of ISO’s to boot from the regular iPXE menu) Several DOS images to flash the BIOS of several PC models, ultimate bootcd, partwiz, all kinds of handy tools.
-
@StefanTS If this tasking is really just a form to tell the system what to boot to (i suppose tasking could do it too), the SVN/Trunk/Dev versions of FOG do allow you to create your own menu options AND tell the system which option to boot to (default). Meaning, new menu items can be added to the default menu and you can tell it if you want it passworded or not. The “default” option tells the system that it’s the default selected item and when the timeout is met, it will boot that default option.
-
@Tom-Elliott Can it be set for just a particular group though?
-
@Wayne-Workman I don’t understand what you mean?
-
@Tom-Elliott Perhaps @StefanTS does not want to set this testing software as the default item for all the systems in his environment? Perhaps he only wants to set it for a specific group of computers. That’s what I was asking.
-