iPXE discussion forum
pxe automatic os installation infinite installation. - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: pxe automatic os installation infinite installation. (/showthread.php?tid=7238)



pxe automatic os installation infinite installation. - papertigerv5 - 2014-03-14 03:19

Hi,all, i use the pxe + kickstart to install an os from network. But i met a huge problem after i finished the installation. I need to change the boot order manually. I'm an administrator for millions machines, so it's quite difficult for me to do such. I'm wondering if there is a way for pxe to re-direct to hard-disk instead of booting from network after the installation process finished.


RE: pxe automatic os installation infinite installation. - TheAmigo - 2014-03-25 02:32

The way I do it is:

1) set the dhcpd.conf param "next-file" to something like http://${dhcp-server}/ipxe.cgi?mac=${net0/mac}
2) write the ipxe.cgi script so that it gets the client's MAC address, lookups it up in a database that says if it should install the OS or not.
2a) If it's blank in the database, then generate an ipxe script that presents a tools menu with a few seconds of timeout. After timing out, exit from ipxe and let bios boot normally.
2b) If the database entry for that host isn't blank, generate an ipxe script that will install the OS (again: after displaying a tools menu with a short timeout that defaults to installing the given OS)
3) At the end of the automated install, run wget http://1.2.3.4/clearMe.cgi Which is a script that does a lookup of the remote IP address and clears out the OS install field in the database.

That keeps it so that other machines don't have access to the database directly.