Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
soc:2009:dverkamp:notes:windows_pe [2009/06/05 08:03]
drv created
soc:2009:dverkamp:notes:windows_pe [2009/06/09 14:51] (current)
drv
Line 16: Line 16:
  
 Success is defined as reaching WinPE'​s ''​X:​\Windows\system32''​ command prompt. Success is defined as reaching WinPE'​s ''​X:​\Windows\system32''​ command prompt.
 +
 +=== Detailed test procedure ===
 +
 +== Prerequisites ==
 +
 +  * Vista AIK (http://​download.microsoft.com/​download/​8/​6/​d/​86d6ba9c-98ff-444e-87ed-3e76772eb2a6/​vista_6000.16386.061101-2205-LRMAIK_EN.img)
 +  * Windows "​technician computer"​
 +  * TFTP server (tftpd-hpa)
 +  * DHCP server (ISC DHCPD)
 +
 +== AIK installation ==
 +
 +The Vista AIK is distributed as an image of an ISO 9660 filesystem. ​ Mount it on a Linux machine or otherwise extract it.  (TODO: this step should be more detailed)
 +
 +Run STARTCD.EXE from the CD image. ​ Select "​Windows AIK Setup" and follow the defaults until installation is complete.
 +
 +== WinPE setup ==
 +
 +Run the Windows PE Tools Command Prompt (//Start โ†’ All Programs โ†’ Microsoft Windows AIK โ†’ Windows PE Tools Command Prompt//​). ​ Note that administrative privilege is required for some of the following commands, so the command prompt must be run elevated (Right click -> //Run as administrator//​) if using Vista with UAC.
 +
 +Run the following commands in this command prompt:
 +
 +  mkdir C:\Temp
 +  call copype.cmd x86 C:​\Temp\Boot
 +  del /Q etfsboot.com
 +  move ISO\boot\boot.sdi boot.sdi
 +  rmdir /S /Q ISO
 +  imagex /mount winpe.wim 1 mount
 +  copy mount\Windows\Boot\PXE\pxeboot.n12 pxeboot.n12
 +  copy mount\Windows\Boot\PXE\bootmgr.exe bootmgr.exe
 +  copy mount\Windows\System32\bcdedit.exe bcdedit.exe
 +  imagex /unmount mount
 +  rmdir /Q mount
 +  bcdedit -createstore BCD
 +  set BCDEDIT=bcdedit -store BCD
 +  %BCDEDIT% -create {ramdiskoptions} -d "​Ramdisk options"​
 +  %BCDEDIT% -set {ramdiskoptions} ramdisksdidevice boot
 +  %BCDEDIT% -set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
 +  for /f "​tokens=3"​ %i in ('​%BCDEDIT% -create -d "​Windows PE" -application osloader'​) do set GUID=%i
 +  %BCDEDIT% -set %GUID% systemroot \Windows
 +  %BCDEDIT% -set %GUID% detecthal Yes
 +  %BCDEDIT% -set %GUID% winpe Yes
 +  %BCDEDIT% -set %GUID% osdevice ramdisk=[boot]\Boot\winpe.wim,​{ramdiskoptions}
 +  %BCDEDIT% -set %GUID% device ramdisk=[boot]\Boot\winpe.wim,​{ramdiskoptions}
 +  %BCDEDIT% -create {bootmgr} -d "​Windows Boot Manager"​
 +  %BCDEDIT% -set {bootmgr} timeout 30
 +  %BCDEDIT% -set {bootmgr} displayorder %GUID%
 +  del /Q bcdedit.exe
 +
 +Note that these commands cannot be directly entered into a batch file due to the extra % substition in the for loop.  (TODO: rewrite it so it works in a batch file)
 +
 +== TFTP server setup ==
 +
 +Copy ''​C:​\Temp\Boot''​ to the TFTP server'​s directory, so that the files are in /​Boot/​*. ​ Preserve case on filenames when copying.
 +
 +Configure the TFTP server to allow backslash as a directory separator (as in [[:​tftp_backslash]]). ​ Ensure the TFTP server is restarted after the configuration change.
 +
 +Add a DHCPD configuration file fragment to boot the Windows PE loader from the TFTP server:
 +
 +  filename "​\\Boot\\pxeboot.n12";​
 +  next-server tftp.server.ip.here;​
 +
 +Boot from gPXE as usual; after some time, the Windows PE command prompt should appear.
  

QR Code
QR Code soc:2009:dverkamp:notes:windows_pe (generated for current page)