- Published on : 08 March 2014 at 19:32 UTC
- By Lionel Eppe
The Preboot eXecution Environment (PXE, also known as Pre-Execution Environment; sometimes pronounced "pixie") is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.
The image can be recovered and the gross operating system or the software components with custom operating system (office suite, utilities, security packages, scripts, etc ...).
To enable PXE, we must first configure it in the BIOS. For this, follow our tutorial : "Enable and configure the network boot (PXE)".
PXE booting is done in several steps :
- Looking for an IP address from a DHCP / BOOTP server and the file to boot;
- Download the file to boot from a Trivial FTP server;
- Execution of the file to boot.
The size of the file to boot does not "boot" directly Linux kernel, for example, but we need the software to initiate the download and executes itself.
Firstly to create a custom PXE boot, we will use some files from syslinux. Syslinux is used by several program PXE boot and some Live CD like Ultimate Boot CD for example.
We will start by creating the tree of our PXE server. The tree is the following : C:\PXE\TFTPRoot\boot\pxelinux.cfg
Warning : pxelinux.cfg is a folder and not a file as you might think.
Then download the "4.05" version of syslinux on the website of the publisher.
Once downloaded syslinux, we will get the following files and place them in the folder "C:\PXE\TFTPRoot\boot" :
To install this server we will have to download on the internet because Microsoft does not provide a "role" to install only a TFTP server.
For this tutorial, we'll use "SolarWinds TFTP Server".
Avant d'installer ce serveur TFTP, il faut d'abord installer "Microsoft .NET Framework 3.5" car ce serveur en a besoin pour fonctionner. Vous pouvez soit télécharger la version Web Installer soit la version Standalone qui vous évitera de retélécharger tout le fichier d'installation à chaque fois que vous le réinstallerez.
Info : La version Standalone permet d'économiser 59 Mo de téléchargement
Before installing the TFTP server, you must first install "Microsoft. NET Framework 3.5" because this server needs to function. You can either download the Web Installer or install the Standalone version which saves you redownload the whole installation file every time you reinstall.
Info : The standalone version saves 59 MB of download.
Accept the license terms. Then click "Next" and the server is installed.
Info : No need to try to change the installation path of the server, it is installed in the default folder to which it was programmed.
Once installed, go to the start menu -> SolarWinds TFTP Server and run "TFTP Server".
For communication between the TFTP server and future clients can be properly, you will have to open the port on which the TFTP server is listening. By default it's the UDP port 69.
To open port 69, you must configure the firewall in Windows Server 2008 (the one you have installed if it's the case). To do this, go to the Start menu and double click on "Control Panel".
In the Control Panel, double-click on "Windows Firewall".
Click "Allow a program through Windows Firewall".
Click "Add Port ...".
Specify a name and specify the port number to open. As the program tells us that communicates by UDP Protocol, select UDP.
Check the box next to "SolarWinds TFTP Server" is checked otherwise the firewall will block this port.
In the TFTP Server window, go to "File -> Configure".
In the "Storage", click "Browse" and select the "C:\PXE\TFTPRoot" folder.
Then go to the "Save" tab and select "Display Language : English" (if this isn't the case) and check the "Send error messages to customers in English language" box.
Type "Folder Options".
Go to the "View" tab and uncheck "Hide extensions for file types is known". This will later serve to create a file named "default" without extension. The Windows Notepad tends to add the "txt" extension when the extension is omitted, we will rename the file manually by Windows Explorer.
Made a right on "Computer" and click on "Properties". You will need the name of the computer (marked in red on the image) to configure your DHCP server to work with PXE.