Skip to content
README.md 2.74 KiB
Newer Older
Lucas GRELAUD's avatar
Lucas GRELAUD committed
# 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>\`.
Lucas GRELAUD's avatar
Lucas GRELAUD committed
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 a linux ISO via TFTP
Lucas GRELAUD's avatar
Lucas GRELAUD committed
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>

### B. Boot a linux image using NFS
1. Open the folder `E:\RemoteInstall\Boot\<arch>\`.
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\<image_name>\`.
4. Open the folder `E:\RemoteInstall\OtherImages\vmlinuz\<image_name>`.
5. Copy all files from the extracted image to the directory.
6. Open the folder `E:\RemoteInstall\Boot\<arch>\`.
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 `<arch>` by the proper architecture type.

1. Open a PowerShell and run the following commands as admin : 
   ```powershell
   wdsutil /set-server /bootprogram:boot\<arch>\pxeboot.com /architecture:<arch>
   wdsutil /set-server /N12bootprogram:boot\<arch>\pxeboot.com /architecture:<arch>
   ```