Customize windowsPE image for PXE server

本文最后更新于:2024年8月9日 晚上

Work Env

Download Intel LAN Drivers for My PC

Why need this step:

Sometimes we need using WinPE OS network to communicate with Internet or access internal CIFS share like below:

image-20240408173225778

Intel LAN Drivers v29.0:

https://www.intel.com/content/www/us/en/download/15084/intel-ethernet-adapter-complete-driver-pack.html

https://downloadmirror.intel.com/816410/Release_29.0.zip

Extract Release_29.0.zip to somewhere , I extract to E:\winpe\Release_29.0

Customize Windows PE ISO

  • Start the deployment Cli with admin privilege

image-20240408171723269

  • Customize Windows PE ISO

image-20240408172015857

image-20240408172124379

  • Add LAN Drivers to WinPE

image-20240408174110498

NOTE

I have the Samba server running on 192.168.3.200 and its FQDN is pxe.srv, make sure the path is accurate.

image-20240408175609533

image-20240408175136413

if you want more auto settings, edit E:\winpe\mount\Windows\System32\startnet.cmd

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# E:\winpe\mount\Windows\System32\startnet.cmd
net use M: \\pxe.srv\data\pxe\win /user:jason
echo Windows 10 installer PATH: M:\win10\setup.exe
echo Windows 11 installer PATH: M:\win11\setup.exe
echo Windows 2k22 installer PATH: M:\winsrv\setup.exe

@echo off
echo Please enter OS you want to install (win10,win11,w2k22)
set /p os=
if "%os%"=="win10" (
M:\win10\setup.exe
) else if "%os%"=="win11" (
M:\win11\setup.exe
) else (
M:\winsrv\setup.exe
)

image-20240408180928043

All commands here:

1
2
3
4
5
6
copype amd64 E:\winpe
Dism /mount-image /imagefile:E:\winpe\media\sources\boot.wim /index:1 /mountdir:E:\winpe\mount
Dism /Image:E:\winpe\mount /Add-Driver /Driver:E:\winpe\Release_29.0 /Recurse
echo net use M: \\pxe.srv\data\pxe\win /user:jason >> E:\winpe\mount\Windows\System32\startnet.cmd
Dism /unmount-image /mountdir:E:\winpe\mount /commit
MakeWinPEMedia /ISO E:\winpe E:\winpe\WinPE.iso

Customize windowsPE image for PXE server
https://git.msft.vip/2024/04/08-Customize-windowsPE-image-for-PXE-server/
作者
Jas0n0ss
发布于
2024年4月8日
更新于
2024年8月9日
许可协议