Pxe Boot Windows Install

Continuing the series of tutorials regarding RHEL/CentOS 7 PXE Network Boot Server Environment, where so far I have only discussed integrating and installing Linux distributions over PXE Server.

This tutorial will be concentrate around Windows based systems and will show you how to add and manually install Windows 7, both 32-bit and 64-bit architectures, over a PXE Server and Samba shares.

Requirements

If you are installing the PXE server on Windows Server 2008 R2 or Windows Server 2008, make sure that the Internet Information Server (IIS) 6 Metabase Compatibility component and the IIS 6 Metabase Management Console component are installed. Have you ever needed to troubleshoot or diagnose a problematic computer and you forgot where the utility CD is? We’ll show you how to utilize network booting (PXE) with FOG to make that problem a thing of the past. The next steps that should be made on the client-side in order to boot, access and install Windows 7 over network. Step 1: Install and Setup Samba Share on PXE Server. On the first step, login to PXE Server with root account and setup a fully accessed Samba share, where Windows 7 DVD installation sources will be deployed. Install Samba.

  1. A Samba fully accessed directory share setup on PXE Server machine.
  2. A computer with Windows 7 operating system installed.
  3. Windows Automated Installation Kit (AIK) installed on Windows 7 computer.
  4. Both Windows 7 32-bit/64-bit DVD ISO Images.

Before proceeding with the installation process, I will explain how this guide is structured.

The first part will cover the configurations needed to setup the environment on RHEL/CentOS 7 PXE Server premises, by installing and configuring a Samba fully accessed shared directory with no authentication needed, where both Windows 7 system architecture images will be deployed, and, also, editing PXE Server default configuration file with the options needed to boot WinPE ISO Image in order to manually proceed with Windows installation process.

The second part will be focused on building WinPE ISO image (Windows Preinstallation Enironment) with the help of Windows Automated Installation Kit (AIK) installed on a Windows 7 computer premises. This image will be then transferred to PXE Server machine via Samba shared directory and moved to TFTP server default location.

Pxe Boot Server

The next steps that should be made on the client-side in order to boot, access and install Windows 7 over network.

Step 1: Install and Setup Samba Share on PXE Server

1. On the first step, login to PXE Server with root account and setup a fully accessed Samba share, where Windows 7 DVD installation sources will be deployed. Install Samba daemon by issuing the following command.

Install Samba on PXE

2. Next, backup samba main configuration file and create a new configuration file with your favourite text editor by running the following commands.

3. Now add the following configurations to samba main file as presented in the below file excerpt.

Configure Samba for PXE

As you can see from this configuration file, I have created a shared folder named install which is located under /windows system path (on this path will copy Windows 7 DVD installation sources).

4. After finishing editing main samba configuration file run testparm command in order to check and validate the file for eventual errors or misconfigurations.

5. On the next step create the /windows directory under root path (the directory defined in samba conf file) and add SELinux contextual rules in
order to be fully accessed in case your system has enforced SELinux security.

Add Samba Selinux Rules

Step 2: Deploy Windows 7 Installation Sources on PXE Server

6. For this step both Windows 7 ISO DVD Images are needed. But before mounting and copy DVD content create two directories under /windows path
to separate Windows installation sources architectures.

7. Now it’s time to copy Windows Installation Sources to the paths created above. First put Windows 7 32-bit DVD Image ISO on your machine DVD drive, mount the image to /mnt path and copy all DVD mounted content to samba shared directory /windows/x32/. The transfer process can take a while depending on your system resources, and, after it finishes, unmount Windows 7 32-bit DVD Image.

Mount Windows Install DVD on PXE

8. Repeat the above process with Windows 7 64-bit DVD Image, but this time copy DVD mounted content to /windows/x64/ shared path.

Note: If your PXE server machine doesn’t have a DVD drive you can copy both Windows DVDs contents after you start samba server and access the “install” shared folder from a Windows computer.

9. After both DVD’s images are copied, issue the following commands to setup the right owner and permissions in order to make the share readable and fully accessible without authentication.

Grant Permission Windows Install Sources

Step 3: Add Firewall Rules, Start and Enable Samba System-Wide

10. If you are using a Firewall on your PXE Server premises, add the following rule to Firewalld service to open Samba to outside connections.

11. Now, start Samba daemons and enable it system wide, to automatically start after every reboot, by issuing the following commands.

Enable Samba Systemwide

12. To test Samba configuration move to a Windows computer and add the IP Address of your Samba server followed by the shared path name in Windows Explorer address bar and the shared folders should appear.

At this point you can now use the alternate method explained in the above note, and put Windows 7 ISO Images in your DVD drive and copy their content, depending on the system architecture, to x32 and x64 folders.

Step 4: Configure PXE Server

13. Before editing PXE Menu configuration file, create a new directory named windows on TFTP server default system path. Under this directory you will later copy WinPE ISO image, created on the Windows 7 computer using Windows Automated Installation Kit program.

14. Now, open PXE Server default configuration file and add Windows Installation label to PXE menu, as described in the below menu excerpt.

Windows 7 menu label configuration.

Add Windows 7 to PXE Menu

That’s all you need to setup on RHEL/CentOS 7 PXE Server side. Still, don’t close the console yet, because you will need it later to copy WinPE ISO image to /var/lib/tftpboot/windows/ directory.

Further let’s continue with the procedure and move onto a Windows 7 Installation on PXE Network – Part 2 of this series, and don’t forget to give your valuable feedback about the article.

Continuing the series regarding installing Windows 7 over RHEL/CentOS 7 PXE Network Boot, where in the first part I have only covered setting up prerequisites on PXE Server, now in this article will be going to discuss how to build WinPE ISO image with the help of Windows Automated Installation Kit on Windows and then move the build image to PXE Server TFTP default location to access and install Windows 7 over PXE network.

Requirements

Linux pxe boot server install windows

Step 1: Download and Install Windows Automated Installation Kit

1. On this second part, logon to a Windows 7 Operating System computer, go to Microsoft Download Center and download Windows Automated Installation Kit ISO image file by using the following link.

Pxe Boot Windows Install

Download Windows Automated Installation Kit

2. After AIK ISO image finishes downloading, mount the image using a Windows mount software (Daemon Tools Lite Free Edition will do the job) and install Windows Automated Installation Kit software.

Welcome to Windows AIK

Linux Pxe Boot Server Install Windows

Step 2: Create WinPE ISO Image on Windows 7

3. After Windows AIK software is installed on your system go to Windows Start -> All Programs -> Microsoft Windows AIK -> right click on Deployment Tools Command Prompt and select Run as Administrator and a new Windows Shell console should open on your screen.

4. Now it’s time to build the Windows 7 Preinstallation Environment (WinPE) x86 boot image by issuing the following commands on Deployment Tools Command Prompt.

Build WinPE Image

5. Although for this tutorial just the WinPE x86 Boot ISO Image is required, below you can find the commands to build PE Images for Windows 7 64-bit and Windows 8 architectures also.

To build WinPE Boot images for Windows 7 64-bit use the following commands:
To build Windows 8 32-bit WinPE bootable images run the following commands:
To build Windows 8 64-bit WinPE bootable images run the following commands:

Step 3: Copy WinPE ISO Image to CentOS PXE Server

6. After Windows 7 Preinstallation Environment (WinPE) x86 boot image has been created, use Windows Explorer to copy winpe_x86.iso image located in C:winpe_x86 windows path to PXE Samba shared directory at 192.168.1.20install network location.

Copy WinPE ISO Image PXE Server

7. After WinPE x86 ISO file is completely transferred to Samba “install” shared directory go back to PXE Server console and move this image from root’s /windows directory to TFTP windows directory path to complete the entire installation process.

Step 4: Boot and Install Windows 7 over PXE Network on Client Side

8. In order to boot and install Windows 7 via network and PXE server, first instruct the clients machines to boot over network by modifying BIOS device boot order or hit a custom key during BIOS post to select a network boot device.

After the first PXE prompt appears press F8 and Enter keys to continue and then select Install Windows 7 from PXE menu.

9. After WinPE image finishes loading, a customized minimal image of windows starts and a Command Prompt window will be displayed on screen.

Loading Windows 7 over PXE Boot

Windows 7 Command Prompt

10. In order to install Windows 7 over a Network Share, in the Command Prompt window, map the Windows installation sources (use the architecture
path you want to install), configured on PXE Samba share directory, as a Network drive.

Then enter network drive share, by specifying the drive letter, and run setup.exe utility. Use the following commands to start the installation process (replace the samba network address location and network drive letter accordingly) and continue with the installation process as you normally do it from a local DVD media.

Choose Windows 7 Language

11. If you want to install the 64-bit architecture, map the specific 64-bit network path using a different letter and continue the installation procedure by following the same steps explained above.

Choose Windows 7 Install Source

12. In case the installation sources are configured with authentication use the following command switch to specify the username.

13. After both architectures installation sources had been mapped you can change between them by switching to the designated network drive letter as presented in the screenshot below.

Change Network Installation Source

Thats all! Performing Windows installations over PXE and network has a lot of advantages, such as cutting down the installation time drastically, allowing the installation process to take place the same time on multiple machines without the need to use a physical installation media.

You can also setup multiple Windows Installation Sources (using Windows or Samba shares) on different machines over your network to avoid a bottleneck on RHEL/CentOS PXE Server, in case you install Windows on multiple machines the same time, and direct the network drive maps to use those specific network sources on installation process.