PXELINUX for booting of ISO images
1. ABSTRACT
In the previous post we've gone through the network booting via iPXE and PXELINUX in details (from the iPXE perspective). The idea of the current post is to expand the knowledge base, by explaining how we could network boot an ISO image with the PXELINUX network boot loader. This method could be useful in performing for example Windows network installations, without depending on the Microsoft tool set. In the below example we will show how to load a WinPE image, which could be configured to deploy Windows 7 or Windows Server 2008.
2. BACKGROUND
The main idea for this solution came from the requirement to boot a WinPE image (needed for Windows network deployment) from a HTTP server rather than from the TFTP server as required from PXE by default. This requirement was introduced by the fact that TFTP server was not able to provide the corresponding speed to a HTTP server, and also because of the relatively high load, which TFTP server was having when multiple computers try to network boot the WinPE image simultaneously.
By default WinPE WIM image could be network booted by PXELINUX from TFTP server relatively easy. The drawback is that in order to complete this we have to use the Microsoft boot loader, loaded by PXELINUX, which unfortunately supports only TFTP server as a source for the WinPE WIM image. How to perform this will be a topic of a separate article.
3. ENVIRONMENT
The environment used for this solution is the same like in the network booting via iPXE and PXELINUX post, so we will not cover here the same details. The main difference will be in the PXELINUX configuration file, because we have to explain to PXELINUX how to load the ISO image. Below is an example of the modified configuration file.
/tftpboot/pxelinux.cfg/default
DEFAULT menu.c32 MENU TITLE Installer PROMPT 0 TIMEOUT 150 MENU WIDTH 80 MENU MARGIN 16 MENU ROWS 15 MENU TABMSGROW 20 MENU CMDLINEROW 20 MENU TIMEOUTROW 21 MENU HELPMSGROW 22 LABEL CLIENT MENU DEFAULT MENU LABEL Boot WinPE KERNEL memdisk INITRD winpe.iso APPEND iso raw |
4. SOLUTION EXPLANATION
The main part of this solution is the usage of the MEMDISK auxiliary module (for more information read here). What basically will happen is explained below in more details:
Step 1: After pxelinux.0 network boot loader is loaded, the menu is displayed based on the configuration file above.
Step 2: After the timeout defined in the configuration expires OR a selection in the menu is done, the MEMDISK module is loaded and it loads in the memory the ISO image specified as INITRD. In order to successfully boot the WinPE ISO we need to pass to MEMDISK via APPEND the following parameters: iso and raw. The first one instructs MEMDISK that an ISO image will be loaded, and the second one instructs it to enter protected mode directly.
From this point on the WinPE is loaded and it takes control. It is important to mention here that the memory on the system, which is being network booted, has to be enough to support this method. What we mean by enough is that it should have at least 2x the size of the WinPE image, because during the booting, MEMDISK first copies the ISO image to memory, and then boots the WinPE from that ISO in the memory, which results in double memory requirement. This for the WinPE is not a problem, because the size is around 180MB, which means that any system with at least 512MB memory should have no problem. This in combination with the Windows system requirements makes it not a problem, if we would like to deploy Windows OS, because the system requirements anyway exceed this 512MB.
!!! Important point is that during WinPE ISO creation we have to make sure that the bootfix.bin file from the \ISO\boot folder is deleted. This is important, because otherwise if a partition is detected on the HDD the WinPE will ask us to press any key to boot the ISO, which we do not want in unattended installation. See this link for more details, plus this link for a tutorial on how to create a custom WinPE ISO.