# PXELinux setup on Windows Deployment Server

## 1. Setup the Windows Deployment Server (WDS)
To install the WDS service, please go to the official Microsoft documentation [here](https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj648426(v=ws.11)) or follow the instruction given in the __"Frogg's web tools"__ blog post available in the folder [backup_sources](backup_sources).

## 2. Setup the PXELinux boot environment 
Theses actions need to be repeted for each processor architecture (i.e: x64, x86, ...).
Please replace `<arch>` by the proper architecture type.

1. Open the folder `E:\RemoteInstall\Boot\<arch>\`.
2. Duplicate the file `pxeboot.n12` in place and rename it to `pxeboot.0`.
3. Duplicate the file `abortpxe.com` in place and rename it to `abortpxe.0`.
4. Copy in the folder all files from the directory `pxelinux_config/<arch>\`.
5. Open a PowerShell and run the following commands as admin : 
   ```powershell
   wdsutil /set-server /bootprogram:boot\<arch>\pxelinux.com /architecture:<arch>
   wdsutil /set-server /N12bootprogram:boot\<arch>\pxelinux.com /architecture:<arch>
   ```

## 3. Add a new boot entry
### A. Boot an linux ISO 
1. Open the folder `E:\RemoteInstall\Boot\<arch>\`.
2. Download and copy the boot image to the folder `Images\iso\`.
3. Open and edit the file `pxelinux.cfg\menu_linux.conf` to add the new ISO:
   ```conf
   LABEL <image_name>
       MENU LABEL ^<IMAGE NAME>
       Kernel memdisk
       append iso raw initrd=Images/iso/<image_name>

   ``` 

## 4. Deactivate the PXELinux boot environment
