@londonfog OK lets start out with how FOG works.
Your computer pxe boots and downloads and runs iPXE that is either undionly.kpxe or ipxe.efi depending on the target computer’s firmware.
Within that ipxe boot loader it has a script that finds the FOG server and then calls a file called default.ipxe. This file is in the /tftpboot directory on the FOG server.
Inside default.ipxe there is a chain call to boot.php which builds the iPXE menu.
I’ll stop here because that is the relevant bits.
Now with a windows computer using a web browser you can view the FOG iPXE menu by calling this URL http://<fog_server_ip>/fog/service/ipxe/boot.php?mac=00:00:00:00:00 That will display the text program that builds the FOG iPXE menu. If you can read programs this should be 100% understandable.
Now when you register target computers with FOG, the FOG UI will add the host definition into the MySQL database on the fog server. The database in question is fog, with the table of hosts. If you log into the mysql client program on the FOG server you can issue these commands
use fog;
select * from hosts;
To get a listing of hosts registered on the FOG server.
Now when you register FOG manually at the end of the registration it asks about some additional fields, Other1, Other2, and my be primary user. These are extra fields that FOG doesn’t touch or use during the imaging process. So for your custom code you could look (via sql query) at the other1 field, if that field has a specific value then you know you need to autoboot into the ubuntu auto installer.
OK NOW bringing it all together.
Create your own PHP web page (lets call it autoboot.php) that queries the fog database for the supplied mac address (this is supplied by ipxe). If the other1 field equals ‘yes’ then you will chain to the ubuntu installer code. If isn’t a match it called the FOG standard boot.php with its required parameters.
Now update default.ipxe on the fog server to call autoboot.php (your code) first. Then in turn autoboot.php will either create the ipxe script to call the ubuntu installer code or the standard boot.php
To say it another way, you will write a php program that will intercept the call to fog’s boot.php to run your code.