[an error occurred while processing this directive] PXE boot Windows PE (Vista)

PXE boot Windows PE (Vista)

This is unfinished and not tested!

The problem is that many manufacturers, such as Toshiba, only supply recovery media, rather than installation media, with their Vista pre-installed computers, despite lengthy telephone calls and pleading with their technical support. This means that there is no option to repair a Vista installation from external media, and recovery zaps the disk completely, including any other operating systems one may have installed.

You can access a repair function if you boot from the 1.5Gb recovery partition at the beginning of the internal hard disk by pressing f8 when booting into Vista.

The aim here is to netboot the necessary part of the 1.5Gb recovery partition, so that if the disk is damaged, there is a chance to repair it rather than being forced to destroy all its contents during recovery.

In brief:

  1. Get pxeboot.com from WAIK.
  2. Get boot.wim from the recovery partition.
  3. Make a boot configuration for it.
  4. Pop on the dhcp server.
  5. Cross fingers.

Finding the boot loader

cd C:\Program Files\Windows AIK\Tools\PETools
copype x86 c:\winpe

This changes directory to c:\winpe (as well as copy the right files, and alter the PATH - in fact, if you just want to alter the path, run pesetenv instead of copype).

imagex /info winpe.wim

tells us that image 1 in winpe.wim is Microsoft Windows Vista PE (x86).

imagex /mount winpe.wim 1 mount

mounts read-only image 1 in winpe.wim to the (empty) directory "mount" created by copype. The files necessary for PXE booting are now in c:\winpe\mount\Windows\Boot\PXE. So now, make a staging area for what will end up on the dhcp server.

mkdir c:\todhcp
copy c:\winpe\mount\Windows\Boot\PXE\*.* c:\todhcp
copy "C:\Program Files\Windows AIK\Tools\PETools\x86\boot\boot.sdi" c:\todhcp
[for now use easy to find winpe.wim, but will use the boot.wim from the recovery partition later]
copy c:\winpe\winpe.wim c:\todhcp

Creating a boot configuration

cd c:\todhcp
bcdedit /createstore BCD
bcdedit /store BCD /create {ramdiskoptions} /d "ramdisk options"
bcdedit /store BCD /set {ramdiskoptions} ramdisksdidevice boot
bcdedit /store BCD /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi
bcdedit /store BCD /create /d "winpe boot image" /application osloader

The last command returns a GUID value which we abbreviate to {osloader_guid}.

bcdedit /store BCD /set {osloader_guid} systemroot \Windows
bcdedit /store BCD /set {osloader_guid} detecthal Yes
bcdedit /store BCD /set {osloader_guid} winpe Yes
bcdedit /store BCD /set {osloader_guid} osdevice ramdisk=[boot]\boot\winpe.wim,{ramdiskoptions}
bcdedit /store BCD /set {osloader_guid} device ramdisk=[boot]\boot\winpe.wim,{ramdiskoptions}
bcdedit /store BCD /create {bootmgr} /d "boot manager"
bcdedit /store BCD /set {bootmgr} timeout 30
bcdedit /store BCD /displayorder {osload_guid}

That last line could have several guids, but here we only have one image to boot.

To avoid making the tftp transfer take more blocks than can fit in a 16 bit integer, the tftp block size can be increased to a maximum of 16384 bytes with:

bcedit /store BCD /set {ramdiskoptions} ramdisktftpblocksize 16384

We can check the boot configuration with:

bcdedit /store BCD /enum all

Useful links

Patrick Welche, Inference Group, Cavendish Laboratory.

AEGIS logo The Dasher project is supported by the Gatsby Foundation
and by the European Commission in the context of
the AEGIS project — open Accessibility Everywhere: Groundwork, Infrastructure, Standards)