# 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 `` by the proper architecture type. 1. Open the folder `E:\RemoteInstall\Boot\\`. 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\\`. 5. Open a PowerShell and run the following commands as admin : ```powershell wdsutil /set-server /bootprogram:boot\\pxelinux.com /architecture: wdsutil /set-server /N12bootprogram:boot\\pxelinux.com /architecture: ``` ## 3. Add a new boot entry ### A. Boot a linux ISO via TFTP 1. Open the folder `E:\RemoteInstall\Boot\\`. 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 MENU LABEL ^ Kernel memdisk append iso raw initrd=Images/iso/ ``` ### B. Boot a linux image using NFS 1. Open the folder `E:\RemoteInstall\Boot\\`. 2. Download the linux image and extract it. 3. Copy the boot files (vmlinuz, initrd.img) from the extracted image to the folder `Images\vmlinuz\\`. 4. Open the folder `E:\RemoteInstall\OtherImages\vmlinuz\`. 5. Copy all files from the extracted image to the directory. 6. Open the folder `E:\RemoteInstall\Boot\\`. 3. Open and edit the file `pxelinux.cfg\menu_linux.conf` to add the new ISO: ```conf LABEL gparted_live MENU LABEL ^GParted LiveCD KERNEL Images/vmlinuz/gparted/vmlinuz APPEND boot=live noswap noprompt nosplash vga=788 netboot=nfs nfsroot=172.16.4.17:/otherimages/vmlinuz/gparted -- INITRD Images/vmlinuz/gparted/initrd.img ``` ## 4. Deactivate the PXELinux boot environment Theses actions need to be repeted for each processor architecture (i.e: x64, x86, ...). Please replace `` by the proper architecture type. 1. Open a PowerShell and run the following commands as admin : ```powershell wdsutil /set-server /bootprogram:boot\\pxeboot.com /architecture: wdsutil /set-server /N12bootprogram:boot\\pxeboot.com /architecture: ```