While in the initial PE boot from CD the hard disk is partitioned and formatted NTFS with diskpart, then the boot loader configured with bcdedit, including "bootsect /nt60 c:". Then NTLDR, NTDETECT.COM, and boot.ini are copied to C:\ and the OS image applied to D:\ with D:\Sysprep\sysprep.inf getting customized. The reboot after that is able to load the PE WIM on C:, but if the Sysprep mini-install runs, the details for the PE WIM magically disappear.
Here's the command used to get Sysprep ready: Sysprep -pnp -reboot -mini -activated -reseal
Here's what's in Sysprep.inf:
CODE
[Unattended]
OemSkipEula=Yes
UnattendMode=FullUnattended
DriverSigningPolicy=Ignore
OemPnpDriversPath=*Lots of folders*
InstallFilesPath=\Sysprep\i386
; OemPreinstall=Yes
; ExtendOEMPartition=1
[WindowsFirewall]
Profiles = WindowsFirewall.TurnOffFirewall
[WindowsFirewall.TurnOffFirewall]
Mode = 0
[GuiUnattended]
OEMDuplicatorstring=*Description*
AdminPassword=*The password*
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1
AutoLogon=Yes
AutoLogonCount=1
[UserData]
ProductID=*ID*
FullName=*Name*
OrgName="*Name*"
ComputerName=*Custom Computer name*
[Identification]
JoinWorkgroup=*Workgroup Name*
[Networking]
InstallDefaultComponents=Yes
OemSkipEula=Yes
UnattendMode=FullUnattended
DriverSigningPolicy=Ignore
OemPnpDriversPath=*Lots of folders*
InstallFilesPath=\Sysprep\i386
; OemPreinstall=Yes
; ExtendOEMPartition=1
[WindowsFirewall]
Profiles = WindowsFirewall.TurnOffFirewall
[WindowsFirewall.TurnOffFirewall]
Mode = 0
[GuiUnattended]
OEMDuplicatorstring=*Description*
AdminPassword=*The password*
OEMSkipRegional=1
TimeZone=35
OemSkipWelcome=1
AutoLogon=Yes
AutoLogonCount=1
[UserData]
ProductID=*ID*
FullName=*Name*
OrgName="*Name*"
ComputerName=*Custom Computer name*
[Identification]
JoinWorkgroup=*Workgroup Name*
[Networking]
InstallDefaultComponents=Yes
Here are the commands used to configure the BCD:
CODE
xcopy %CDROM%:\BOOT\*.* /e /f /y C:\BOOT\
copy %CDROM%:\BOOTMGR C:\
IF EXIST C:\BOOT\BCD DEL C:\BOOT\BCD
IF NOT EXIST C:\TEMP MD C:\TEMP
IF EXIST C:\TEMP\BCD DEL C:\TEMP\BCD
bcdedit -createstore C:\TEMP\BCD
bcdedit -store C:\TEMP\BCD -create {bootmgr} /d "Boot Manager"
bcdedit -store C:\TEMP\BCD -set {bootmgr} device boot
bcdedit -store C:\TEMP\BCD -create {ramdiskoptions} /d "WinPE"
bcdedit -import C:\TEMP\BCD
bcdedit -set {ramdiskoptions} ramdisksdidevice partition=C:
bcdedit -set {ramdiskoptions} ramdisksdipath \BOOT\BOOT.sdi
for /f "tokens=3" %%a in ('bcdedit -create /d "WinPE" -application osloader') do set guid=%%a
bcdedit -set %guid% device ramdisk=[C:]\BOOT\BOOT.WIM,{ramdiskoptions}
bcdedit -set %guid% path \WINDOWS\SYSTEM32\BOOT\WINLOAD.EXE
bcdedit -set %guid% osdevice ramdisk=[C:]\BOOT\BOOT.WIM,{ramdiskoptions}
bcdedit -set %guid% systemroot \WINDOWS
bcdedit -set %guid% winpe yes
bcdedit -set %guid% detecthal yes
bcdedit -displayorder %guid% -addlast
bcdedit -create {ntldr} /d "Microsoft Windows XP Professional"
bcdedit -set {ntldr} device boot
bcdedit -set {ntldr} path \ntldr
bcdedit -displayorder {ntldr} -addfirst
bcdedit -default {ntldr}
bcdedit -timeout 5
bootsect /nt60 C:
IF EXIST C:\TEMP\BCD DEL C:\TEMP\BCD
bcdedit
Here's what bcdedit shows before Sysprep:
CODE
Windows Boot Manager
--------------------
identifier {bootmgr}
device boot
description Boot Manager
default {ntldr}
displayorder {ntldr}
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
timeout 5
Windows Legacy OS Loader
------------------------
identifier {ntldr}
device boot
path \ntldr
description Microsoft Windows XP Professional
Windows Boot Loader
-------------------
identifier {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
device ramdisk=[C:]\BOOT\BOOT.WIM,{ramdiskoptions}
path \WINDOWS\SYSTEM32\BOOT\WINLOAD.EXE
description MAINT
osdevice ramdisk=[C:]\BOOT\BOOT.WIM,{ramdiskoptions}
systemroot \WINDOWS
detecthal Yes
winpe Yes
...and after Sysprep:
CODE
Windows Boot Manager
--------------------
identifier {bootmgr}
device boot
description Boot Manager
default {ntldr}
displayorder {ntldr}
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
timeout 5
Windows Legacy OS Loader
------------------------
identifier {ntldr}
device boot
path \ntldr
description Microsoft Windows XP Professional
Windows Boot Loader
-------------------
identifier {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
Does anyone have any thoughts on this? My initial C:\boot.ini has "timeout=5", but after Sysprep runs it has "timeout=30", so Sysprep is obviously doing something to modify the boot process, I just can't wrap my head around what it could do to my BCD.
