mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-15 18:33:43 +00:00
checking new topic
This commit is contained in:
177
windows/deploy/configure-a-pxe-server-to-load-windows-pe.md
Normal file
177
windows/deploy/configure-a-pxe-server-to-load-windows-pe.md
Normal file
@ -0,0 +1,177 @@
|
||||
---
|
||||
title: Walkthrough: Configure a PXE server to load Windows PE
|
||||
description: This topic describes how to configure a PXE server to load Windows PE so that it can be used with an image file to install Windows 10 from the network.
|
||||
keywords: windows pe, windows 10, upgrade, deploy, image
|
||||
ms.prod: w10
|
||||
ms.mktglfcycl: deploy
|
||||
ms.sitesec: library
|
||||
ms.pagetype: deployment
|
||||
author: greg-lindsay
|
||||
---
|
||||
|
||||
# Walkthrough: Configure a PXE server to load Windows PE
|
||||
|
||||
**Applies to**
|
||||
|
||||
- Windows 10
|
||||
|
||||
This topic describes how to configure a PXE server to load Windows PE so that it can be used with an image file to install Windows 10 from the network.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Deployment computer: A computer with the Windows Assessment and Deployment Kit (Windows ADK) installed (<https://www.microsoft.com/en-us/download/details.aspx?id=39982>).
|
||||
- DHCP server: A DHCP server or DHCP proxy configured to respond to PXE client requests.
|
||||
- PXE server: A server running the TFTP server service.
|
||||
- File server: A server hosting a network file share.
|
||||
|
||||
All four of the roles specified above can be hosted on the same computer if desired, but this is not required.
|
||||
|
||||
## Step 1: Copy Windows PE source files to the PXE server
|
||||
|
||||
### To copy source files to your PXE server:
|
||||
|
||||
1. On the deployment computer, click **Start**, and type **deployment**.
|
||||
2. Right-click **Deployment and Imaging Tools Environment** and then click **Run as administrator**. The Deployment and Imaging Tools Environment shortcut opens a Command Prompt window and automatically sets environment variables to point to all the necessary tools.
|
||||
3. Run the following command to copy the base Windows PE files into a new folder. The script requires two arguments: hardware architecture and destination location.
|
||||
|
||||
```
|
||||
copype.cmd <arch> <destination>
|
||||
```
|
||||
|
||||
The value of <arch> can be **x86**, **amd64**, or **arm** and <destination> is a path to a local directory. If the directory does not already exist, it will be created. For example:
|
||||
|
||||
```
|
||||
copype.cmd amd64 C:\\winpe\_amd64
|
||||
```
|
||||
|
||||
The script creates the destination directory structure and copies all the necessary files for that architecture. For example:
|
||||
|
||||
C:\\winpe\_amd64
|
||||
C:\\winpe\_amd64\\fwfiles
|
||||
C:\\winpe\_amd64\\media
|
||||
C:\\winpe\_amd64\\mount
|
||||
|
||||
4. Mount the base Windows PE image (winpe.wim) to the \\mount directory using the DISM tool. Mounting an image file unpacks the file contents into a folder so that you can make changes directly or by using tools such as DISM. To mount the image file, run the following command. Replace the directory names with the directory name that you used in the previous step.
|
||||
|
||||
```
|
||||
Dism /mount-image /imagefile:c:\winpe_amd64\media\sources\boot.wim /index:1 /mountdir:C:\winpe_amd64\mount
|
||||
```
|
||||
|
||||
5.Map a network share to the root TFTP directory on the PXE/TFTP server and create a \\Boot folder. Consult your TFTP server documentation to determine the root TFTP server directory, enable sharing this directory, and verify it can be accessed on the network. In the following example, the PXE server name is PXE-1 and the TFTP root directory is shared using a network path of \\PXE-1\TFTPRoot. See the following example:
|
||||
|
||||
```
|
||||
net use y: \\PXE-1\TFTPRoot
|
||||
y:
|
||||
md boot
|
||||
```
|
||||
|
||||
6. Copy the PXE boot files from the mounted directory to the \\Boot folder. For example,
|
||||
|
||||
```
|
||||
copy c:\winpe_amd64\mount\windows\boot\pxe\*.* y:\boot
|
||||
```
|
||||
|
||||
7. Copy the boot.sdi file to the PXE/TFTP server.
|
||||
|
||||
```
|
||||
copy C:\winpe_amd64\media\boot\boot.sdi y:\boot
|
||||
```
|
||||
|
||||
8. Copy the bootable Windows PE image (boot.wim) to the \\Boot folder.
|
||||
|
||||
```
|
||||
copy C:\winpe_amd64\media\sources\boot.wim y:\boot
|
||||
```
|
||||
|
||||
## Step 2: Configure boot settings and copy the BCD file
|
||||
|
||||
### To configure boot settings:
|
||||
|
||||
1. Create a BCD store using bcdedit.exe. For example:
|
||||
|
||||
```
|
||||
bcdedit /createstore c:\BCD
|
||||
```
|
||||
|
||||
2. Configure RAMDISK settings. See the following example:
|
||||
|
||||
```
|
||||
bcdedit /store c:\BCD /create {ramdiskoptions} /d "Ramdisk options"
|
||||
bcdedit /store c:\BCD /set {ramdiskoptions} ramdisksdidevice partition=C:
|
||||
bcdedit /store c:\BCD /set {ramdiskoptions} ramdisksdipath \winpe_amd64\media\boot\boot.sdi
|
||||
```
|
||||
|
||||
3. Create a new boot application entry for the Windows PE image. See the following example:
|
||||
|
||||
```
|
||||
bcdedit /store c:\BCD /set {GUID1} device ramdisk=[c:]\winpe_amd64\media\sources\boot.wim,{ramdiskoptions}
|
||||
bcdedit /store c:\BCD /set {GUID1} path \windows\system32\winload.exe
|
||||
bcdedit /store c:\BCD /set {GUID1} osdevice ramdisk=[c:]\winpe_amd64\media\sources\boot.wim,{ramdiskoptions}
|
||||
bcdedit /store c:\BCD /set {GUID1} systemroot \windows
|
||||
bcdedit /store c:\BCD /set {GUID1} detecthal Yes
|
||||
bcdedit /store c:\BCD /set {GUID1} winpe Yes
|
||||
```
|
||||
|
||||
4. Configure BOOTMGR settings. See the following example:
|
||||
|
||||
```
|
||||
bcdedit /store c:\BCD /set {bootmgr} timeout 30
|
||||
bcdedit /store c:\BCD -displayorder {GUID1} -addlast
|
||||
```
|
||||
|
||||
5. Copy the BCD file to your TFTP server. For example,
|
||||
|
||||
```
|
||||
copy c:\BCD \\PXE-1\TFTPRoot\Boot
|
||||
```
|
||||
|
||||
Your PXE/TFTP server is now configured.
|
||||
|
||||
Note: You can view the BCD settings that have been configured using the command “bcdedit /store <BCD file location> /enum all. See the following example:
|
||||
|
||||
```
|
||||
C:\>bcdedit /store C:\BCD /enum all
|
||||
Windows Boot Manager
|
||||
--------------------
|
||||
identifier {bootmgr}
|
||||
description boot manager
|
||||
displayorder {a4f89c62-2142-11e6-80b6-00155da04110}
|
||||
timeout 30
|
||||
|
||||
Windows Boot Loader
|
||||
-------------------
|
||||
identifier {a4f89c62-2142-11e6-80b6-00155da04110}
|
||||
device ramdisk=[boot]\boot\boot.wim,{ramdiskoptions}
|
||||
description winpe boot image
|
||||
osdevice ramdisk=[boot]\boot\boot.wim,{ramdiskoptions}
|
||||
systemroot \Windows
|
||||
detecthal Yes
|
||||
winpe Yes
|
||||
|
||||
Setup Ramdisk Options
|
||||
---------------------
|
||||
identifier {ramdiskoptions}
|
||||
description ramdisk options
|
||||
ramdisksdidevice boot
|
||||
ramdisksdipath \boot\boot.sdi
|
||||
```
|
||||
|
||||
#### The deployment process
|
||||
|
||||
The following summarizes the PXE client boot process.
|
||||
|
||||
1. A client is directed by DHCP options 066 and 067 to download boot\\wdsnbp.com from the TFTP server.
|
||||
2. Wdsnbp.com validates the DHCP/PXE response packet and then the client downloads boot\\pxeboot.com.
|
||||
3. Pxeboot.com requires the client to press the F12 key to initiate a PXE boot.
|
||||
4. The client downloads boot\\bootmgr.exe and the boot\\BCD file from the TFTP server. Note: The BCD store must reside in the \\boot directory on the TFTP server and must be named BCD.
|
||||
5. Bootmgr.exe reads the BCD operating system entries and downloads boot\\boot.sdi and the Windows PE image (boot\\boot.wim). Optional files that can also be downloaded include true type fonts (boot\\Fonts\\wgl4\_boot.ttf) and the hibernation state file (\\hiberfil.sys) if these files are present.
|
||||
6. Bootmgr.exe starts Windows PE by calling winload.exe within the Windows PE image.
|
||||
7. Windows PE loads, a command prompt opens and wpeinit.exe is run to initialize Windows PE.
|
||||
8. The Windows PE client provides access to tools like imagex, diskpart, and bcdboot using the Windows PE command prompt. Using these tools together with a Windows 10 image file, the destination computer can be formatted properly to load a full Windows 10 operating system.
|
||||
|
||||
See Also
|
||||
---------
|
||||
|
||||
#### Concepts
|
||||
|
||||
[Windows PE Walkthroughs](https://technet.microsoft.com/en-us/library/cc748899.aspx)
|
Reference in New Issue
Block a user