Table of Contents#
- Prerequisites
- Setting up the PXE Server on RHEL/CentOS 7
- Installing Required Packages
- Configuring TFTP Server
- Configuring DHCP Server
- Preparing the Boot Files
- Configuring WDS on a Windows Server
- Installing WDS Role
- Importing Windows 7 Boot Images
- Configuring the Boot Image
- Testing the PXE Network Boot and Installing Windows 7
- Troubleshooting
- Conclusion
- References
1. Prerequisites#
- A RHEL/CentOS 7 server with root access.
- A Windows 7 installation ISO file.
- A Windows Server with Windows Deployment Services (WDS) role installed.
- Sufficient disk space on the RHEL/CentOS 7 server to store the boot files.
- A network environment where the PXE - enabled clients can communicate with the PXE server and WDS server.
2. Setting up the PXE Server on RHEL/CentOS 7#
Installing Required Packages#
First, you need to install the necessary packages for the PXE server. These include the TFTP server, DHCP server, and syslinux which provides the PXE bootloader.
yum install tftp - server dhcp syslinux - yEnable and start the TFTP and DHCP services:
systemctl enable tftp - socket
systemctl start tftp - socket
systemctl enable dhcpd
systemctl start dhcpdConfiguring TFTP Server#
The TFTP server is managed by systemd. Enable and start the tftp.socket:
systemctl enable tftp.socket
systemctl start tftp.socketCreate the TFTP root directory and ensure it exists:
mkdir -p /var/lib/tftpbootConfiguring DHCP Server#
Edit the /etc/dhcp/dhcpd.conf file to configure the DHCP server to provide PXE boot information to the clients. Here is a sample configuration:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
option routers 192.168.1.1;
option domain - name - servers 8.8.8.8;
next - server 192.168.1.2; # IP address of the PXE server
filename "pxelinux.0";
}Restart the DHCP service:
systemctl restart dhcpdPreparing the Boot Files#
Copy the necessary boot files from the syslinux package to the TFTP root directory:
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/
cp /usr/share/syslinux/chain.c32 /var/lib/tftpboot/Obtain the wdsnbp.com file from your WDS server's %windir%\system32\boot\ directory and copy it to the TFTP root directory:
cp /path/to/wdsnbp.com /var/lib/tftpboot/Create a pxelinux.cfg directory in the TFTP root directory:
mkdir /var/lib/tftpboot/pxelinux.cfgCreate a default configuration file default in the pxelinux.cfg directory. This configuration redirects clients to the WDS server:
default menu.c32
prompt 0
timeout 300
MENU TITLE PXE Boot Menu
LABEL wds
MENU LABEL Windows Deployment Services
KERNEL chain.c32
APPEND wdsnbp.com3. Configuring WDS on a Windows Server#
Installing WDS Role#
On your Windows Server, install the Windows Deployment Services role:
- Open Server Manager and click "Add roles and features".
- Select "Windows Deployment Services" and complete the installation.
- Start the WDS service.
Importing Windows 7 Boot Images#
- Open the Windows Deployment Services console.
- Right - click on "Boot Images" and select "Add Boot Image".
- Browse to the sources folder on your Windows 7 ISO and select
boot.wim. - Complete the wizard to import the boot image.
Configuring the Boot Image#
- Right - click the imported boot image and select "Create Capture Image".
- Follow the wizard to create a capture image that can be used to install Windows 7.
- Alternatively, use the standard boot image and configure a task sequence for Windows 7 deployment.
4. Testing the PXE Network Boot and Installing Windows 7#
- Make sure the PXE - enabled client is connected to the same network as the PXE server and WDS server.
- Set the client's BIOS to boot from the network.
- Power on the client. It should display the PXE boot menu.
- Select the "Windows Deployment Services" option.
- The client will boot into WinPE via WDS and you can follow the deployment wizard to complete the Windows 7 installation.
5. Troubleshooting#
- Client not getting an IP address: Check the DHCP server configuration and make sure it is running correctly. You can use the
dhcpd - tcommand to test the DHCP configuration. - Boot files not being loaded: Check the TFTP server configuration and make sure the boot files are in the correct location. You can use the
tftpclient on the PXE server to test the TFTP connection. - WDS not responding: Ensure the WDS service is running and the firewall is configured to allow WDS traffic.
- Windows 7 installation fails: Check the integrity of the Windows 7 installation ISO file and verify that the boot images are properly configured in WDS.
6. Conclusion#
By following the steps outlined in this blog post, you have successfully set up a PXE network boot server on RHEL/CentOS 7 in conjunction with Windows Deployment Services to install Windows 7 over the network. This method provides a reliable and scalable solution for deploying Windows 7 on multiple machines in corporate environments.
7. References#
- Red Hat Enterprise Linux 7 Documentation
- CentOS 7 Documentation
- Microsoft Windows Deployment Services documentation
Remember to adjust the IP addresses and file paths according to your specific environment.