The PreeXecution Environment (PXE) provides supporting BIOS systems a source from which to receive a bootable image and/or configuration. Allows a system to boot from the network to an OS without an OS being installed on any local disk.
Certainly Microsoft has its own flavor of PXE boot service, called Windows Deployment Server (WDS). They also provide free software for advanced Windows OS deployment, called Microsoft Deployment Toolkit (MDT). By using the configuration editor, called Deployment Workbench, you can design a “lite touch” deployment scenario for your Windows OS, including driver packages and 3rd party applications.
Microsoft Deployment Toolkit
The limitation of MDT and Deployment Workbench is that they only run on Windows systems. However, the PXE bootable image it creates can be loaded into a Linux PXE server
First install the Windows host for MDT
CPU: 2x vCPU in 1 socket
Mem: 8GB
HDD1: 40GB #OS storage
HDD2: 50GB #storage for deployment share
IP: 192.168.1.15
hostname: deploy
Admin: deployprojadmin
PW: deployprojadmin
OS: Windows 10
After the OS has been installed, install the appropriate version of the Windows ADK, selecting the following features:
Create a new deployment share in the secondary 50GB HDD. Setup of the MDT configuration is beyond the scope of this article - you’ll find some documentation for this in the previous link. However, to involve the PXE server we will need to generate a boot image from the MDT. To do this, right-click on the deployment share object in the left-hand navigation tree, in Deployment Workbench once you have it open. This will generate the first-time configuration and boot images, though with the deployment share being empty and unconfigured the boot images will need some tweaking before they are useful.
Back on the PXE server, bring over the boot image ISO and follow the steps in this article to mount the ISO and copy the boot files to the location the PXE server needs.
A Linux-based PXE server has 3 configuration components (in addition to your OS installation image, of course):
DHCP server options (could be from a co-hosted service or from a separate DHCP server)
TFTP/FTP server
PXE options and menu build
In this build I lace together the services of a DHCP server (previously established on a separate server) and a TFTP server (new). Both based on CentOS 7.
Begin by installing CentOS to a new virtual machine (VM)
Set DHCP options for the IP subnets you wish to access the PXE server. Here I’m assuming that you’re running a DHCP service in Linux, on the same or different service host.
vi /etc/dhcp/dhcpd.conf
In the subnet definition section of your file set the following options, with comment included to call out the PXE section
#IP of PXE Servernext-server 192.168.1.14;
filename "pxelinux.0";
…then in the general options section of the DHCP config file, add these lines
Now you should be able to access your PXE server connection when you boot a new computer/server/VM, using the PXE boot option of the available BIOS for your system.
Automated OS install with Kickstart file
I did not test this implementation, but the source article provided the following notes on setting a automation for the OS installation process
The kickstart file required a root password to complete the CentOS install (to set it for the root account in the installed OS). Since it will be stored in plain text in the kickstart file it is important to encrypt it. Here ‘Pxe@123#’ is the example root password. The command below outputs the encrypted password as string, which you substitute for [encrypted_root_pw] below
openssl passwd -1 Pxe@123#
The default kickstart file is /root/anaconda-ks.cfg, which you could reference for options. Create a blank file