Create a Windows Vista/WinPE dual boot

For the guys who want to play with BCDEDIT, this is a good exercise !

  1. Create a custom WinPE image

    Execute "Windows PE Tools Command Prompt” from Start | Programs | Windows AIK

    1. copype.cmd x86 C:\WinPE_x86

      image

      The following folders are created with the listed content :

      image

    2. Mount the default winpe.wim

      Imagex /mountrw c:\winpe_x86\winpe.wim 1 c:\winpe_x86\mount

    3. Packages injection :

      1. peimg /install=*HTA* c:\winpe_x86\mount\Windows
      2. peimg /install=*WMI* c:\winpe_x86\mount\Windows
      3. peimg /install=*MDAC* c:\winpe_x86\mount\Windows
      4. peimg /install=*SCRIPT* c:\winpe_x86\mount\Windows
      5. peimg /install=*XML* c:\winpe_x86\mount\Windows
      6. Peimg /inf=e:\win_vista_32\b57nd60x.inf c:\WinPE_x86\Mount\Windows
    4. ImageX /unmount c:\winpe_x86\mount /commit

    5. Copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\Sources\boot.wim

    6. If you want to create an ISO of this WinPE image :

      Oscdimg –l"WinPE 2.0" -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso

  2. Copy C:\WinPE_x86\ISO to C:\WinPE

  3. Create the RAMDISK device in the BCD

    1. bcdedit /export C:\BCD_BKP -> hey, make a copy of the current BCD before altering it !
    2. bcdedit –store c:\boot\bcd /create {ramdiskoptions} /d "Ramdisk options"
    3. bcdedit /set {ramdiskoptions} ramdisksdidevice partition=c:
    4. bcdedit /set {ramdiskoptions} ramdisksdipath \WinPE\boot\boot.sdi
  4. Create a new loader entry in the BCD

    1. bcdedit -create /d “WinPE 2.0" /application OSLOADER
    2. A GUID has been assigned to the new loader entry, note that GUID by executing the following command line :
      bcdedit /enum all | more
  5. Create the OS Loader object

    1. bcdedit /set {NewGUID} device ramdisk=[c:]\WinPE\sources\boot.wim,{ramdiskoptions}
    2. bcdedit /set {NewGUID} osdevice ramdisk=[c:]\WinPE\sources\boot.wim,{ramdiskoptions}
    3. bcdedit /set {NewGUID} path \windows\system32\boot\winload.exe
    4. bcdedit /set {NewGUID} systemroot \windows
    5. bcdedit /set {NewGUID} detecthal yes
    6. bcdedit /set {NewGUID} winpe yes
    7. bcdedit /displayorder {current} {NewGUID}

Please be careful with the syntax as its quite strange sometime and that will be fine !

When you will restart your computer, you will see the Boot Manager menu that will let you choose between Windows Vista and WinPE.

This procedure works also for Windows Server 2008...

Note that this procedure is provided "as is" with no warranty nor supportability engagement. It does not engage Microsoft at all.
Nevertheless if you consider this not clear, incomplete or inadequate, please let me know !