Adding a custom host task
-
@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.
-