Installing Windows 7 over PXE Network Boot Server on RHEL/CentOS 7 using WinPE ISO Image – Part 2

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.

Install Windows 7 over PXE Boot in Linux
Install Windows 7 over PXE Boot in CentOS

Requirements

  1. Configure PXE Server to Install Windows 7 over PXE Network Boot – Part 1

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.

  1. http://www.microsoft.com/en-us/download/details.aspx?id=5753
Download Windows Automated Installation Kit
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.

Mount Windows Automated Installation Kit
Mount Windows Automated Installation Kit
Welcome to Windows AIK
Welcome to Windows AIK

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.

Create WinPE ISO Image
Create WinPE ISO Image

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.

copype x86 C:\winPE_x86
copy "C:\Program Files\Windows AIK\Tools\PETools\x86\winpe.wim" C:\winpe_x86\ISO\Sources\Boot.wim
copy "C:\Program Files\Windows AIK\Tools\x86\Imagex.exe" C:\winpe_x86\ISO\
oscdimg -n -bC:\winpe_x86\etfsboot.com C:\winpe_x86\ISO C:\winpe_x86\winpe_x86.iso
Build WinPE Image
Build WinPE Image
Copy WinPE ISO Image
Copy WinPE ISO 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:
copype amd64 C:\winPE_amd64
copy "C:\Program Files\Windows AIK\Tools\PETools\amd64\winpe.wim" C:\winpe_amd64\ISO\Sources\Boot.wim
copy "C:\Program Files\Windows AIK\Tools\amd64\Imagex.exe" C:\winpe_amd64\ISO\
oscdimg -n -bC:\winpe_amd64\etfsboot.com C:\winpe_amd64\ISO C:\winpe_amd64\winpe_amd64.iso
To build Windows 8 32-bit WinPE bootable images run the following commands:
copype x86 C:\Win8PE_x86
MakeWinPEMedia /ISO C:\Win8PE_x86 C:\Win8PE_x86\WinPE_x86.iso
To build Windows 8 64-bit WinPE bootable images run the following commands:
copype amd64 C:\Win8PE_amd64
MakeWinPEMedia /ISO C:\Win8PE_amd64 C:\Win8PE_amd64\Win8PE_amd64.iso

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.20\install network location.

Copy WinPE ISO Image PXE Server
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.

# mv /windows/winpe_x86.iso  /var/lib/tftpboot/windows/

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.

Select Windows 7 from PXE Menu
Select 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
Loading Windows 7 over PXE Boot
Starting Windows 7 over PXE Boot
Starting Windows 7 over PXE Boot
Windows 7 Command Prompt
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.

net use z: \192.168.1.20\install\x32
Z:
setup.exe
Enter Windows 7 Installation Source
Enter Windows 7 Installation Source
Choose Windows 7 Language
Choose Windows 7 Language
Select Drive to Install Windows 7
Select Drive to Install Windows 7

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.

net use y : \192.168.1.20\install\x64
Y:
setup.exe
Choose Windows 7 Install Source
Choose Windows 7 Install Source
Select Windows 7 Home Basic
Select Windows 7 Home Basic

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

net use y : \192.168.1.20\install\x64  /user:samba_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
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.

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

97 thoughts on “Installing Windows 7 over PXE Network Boot Server on RHEL/CentOS 7 using WinPE ISO Image – Part 2”

  1. Very nice guide but when I launch the pxe boot it hangs at wpeinit, tried goggling but could not find a working solution. Have you come across this issue?

    Reply
  2. Hi Matei,

    This works perfect for me. Thanks!

    Now I have newer motherboards and the network don’t work. I think I have to include the NIC drivers for those board. Can you tell how to do that?

    Reply
  3. Is there a way to specify an unattend.txt answer file? Ideally I’d like to build the winpe to then get a just in time generated unattend.txt file from my katello/satellite6 server. My goal is to build win systems using Satellite that have puppet installed and use puppet for ALL post install work. The new systems would use a Satellite/katello capsule as the puppet master.

    Reply
  4. I have followed your guide, and well I have found some things to comment, and help this guide have the success that is expected, Then what I found and how to solve it:

    1.The file dnsmasq.conf, this line should be corrected dhcp-option=6,192.168.20.2,192.168.20.5, that my ip dns, use your property ip.

    2. In the case of the Samba server, if you have SELinux active as it should be my recommendation is to use these three additional commands so as not to inconvenience once you want to access from windows to the samba server.

    # setsebool -P samba_export_all_rw=1 samba_enable_home_dirs=1
    # setsebool -P samba_export_all_ro=1
    # setsebool -P samba_export_all_rw=1
    

    3. I had problems with the pxe when capturing the iso image, so I decided to make a change to use the same samba server to do the capture, leaving the menu as follows.

    #  nano /var/lib/tftpboot/pxelinux.cfg/default
    
    label 1
    menu label ^1) Install Windows 7 x32/x64
    KERNEL memdisk
    INITRD winpe_amd64.iso method=file:///192.168.20.5/windows
    APPEND iso raw
    
    Reply
  5. I would like to ask, after successfully configure linux in part 1 After that run on this step, the problem of windows installed Windows Automated Installation Kit it belong to? for sure in the previous step we just configure linux

    Reply
  6. Check permissions on the share, reboot the system, verify or turn off windows firewall and antivirus, check credentials, make sure the client has enough memory.
    Try to use the command as shown here:
    net use K: \\IP_of_share\path_to_share /user: your_share_user your_share password

    Reply
  7. Hi, used win 10 PE image, trying to install server 2012 over pxe.
    net use command gives the error: 58 the specified server cannot perform the requested operation
    Any help would be appreciated.

    Reply

Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.