iPXE discussion forum

Full Version: pxe automatic os installation infinite installation.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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 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.
Reference URL's