下面要用到微软 PXE 启动的几个文件 :startrom.n1_,setupldr.ex_,ntdetect.com ,这几个文件在光盘中都可以找到,我这里将使用 windows2003 光盘中的,因为之前从 XP 光盘中提取出来的,在启动过程中会出现 inf &#$b#$%c xxxx error, status 21. 这样的一些错误 .
1. 拷贝文件 :
#cp /mnt/win2003/i386/{startrom.n1_,setupldr.ex_,ntdetect.com} /tftpboot/
2. 用 cabextract 解压上述文件 :
#cabextract startrom.n1_
将得到一个 startrom.n12
#cabextract setupldr.ex_
将得到一个 setupldr.exe
3. 配置上述文件 :
# sed -i -e ‘s/NTLDR/xpldr/gi’ startrom.n12
# sed -i -e ‘s/ntldr/xpldr/gi’ startrom.n12
#mv /tftpboot/startrom.n12 /tftpboot/winxp.0
# sed -i -e ‘s/winnt\.sif/winxp\.sif/gi’ setupldr.exe
# sed -i -e ‘s/ntdetect\.com/ntdetect\.wxp/gi’ setupldr.exe
#mv /tftpboot/setupldr.exe /tftpboot/xpldr
#mv /tftpboot/ntdetect.com /tftpboot/ntdetect.wxp
4. 创建 winxp.sif
#vi /tftpboot/winxp.sif
如下 :
[data]
floppyless = "1"
msdosinitiated = "1"
; Needed for second stage
OriSrc = "\\10.1.8.60\reminst\winxp\i386"
OriTyp = "4"
LocalSourceOnCD = 1
DisableAdminAccountOnDomainJoin = 1
[SetupData]
OsLoadOptions = "/fastdetect"
; Needed for first stage
SetupSourceDevice = "\Device\LanmanRedirector\10.1.8.60\reminst\winxp"
[Unattended]
UnattendMode=ProvideDefault
OemPreinstall=No
TargetPath=\WINDOWS
FileSystem=LeaveAlone
NtUpgrade=No
OverwriteOemFilesOnUpgrade=No
[GuiUnattended]
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=210
[UserData]
ProductKey=BYCMB-R844W-KJBQX-J3D9F-V3Y6G
FullName="admin"
OrgName="augusta"
ComputerName=desktopbj-
[Display]
BitsPerPel=32
Xresolution=1024
YResolution=768
Vrefresh=60
[TapiLocation]
CountryCode=86
[RegionalSettings]
LanguageGroup=10
SystemLocale=00000804
UserLocale=00000804
InputLocale=0804:00000804
[SetupMgr]
DistFolder=C:\windist
DistShare=windist
[Identification]
JoinDomain=%MACHINEDOMAIN%
DoOldStyleDomainJoin=Yes
[Networking]
InstallDefaultComponents=Yes
ProcessPageSections=Yes
[RemoteInstall]
Repartition=Yes
[OSChooser]
Description="Windows Professional - Standard Installation"
Help="This will install Windows Professional in a standard configuration."
LaunchFile="%INSTALLPATH%\%MACHINETYPE%\templates\startrom.com"
ImageType=Flat