How to boot a Vista system from a locally stored WIM file

The Windows AIK provides excellent opportunities to create custom Windows PE based images. Those images are provided as WIM files and can be easily converted to ISO files to be burned on CD or DVD. WIM files can also be used to boot from the network using Windows Deployment Services. The Microsoft site also provides procedures to boot a WIM file from USB drive or a clean local hard drive. Unfortunately I was not able to find a complete description how to place a WIM boot image on the local hard disk and provide it as alternative boot option in the Vista boot Menu.

After combining various publications about the subject I managed to extract the procedure to add an option to the boot menu and boot a computer from the WIM file C:\Sources\boot.wim on the local hard drive:

  1. Copy boot\boot.sdi from the Windows Vista installation DVD to C:\boot (By default this folder is hidden in Windows Explorer)
  2. Use the following set of commands to create a ramdiskoptions object in the BCD store. The string "{ramdiskoptions}" is the well-known name for the object’s GUID.

    bcdedit /create {ramdiskoptions} /d "Ramdisk options"

    bcdedit /set {ramdiskoptions} ramdisksdidevice partition=c:

    bcdedit /set {ramdiskoptions} ramdisksdipath \boot\boot.sdi

       

  3. Create a new boot entry.

    bcdedit -create /d "Windows PE boot" /application OSLOADER

       

  4. Step 3 returns the GUID that is associated with the newly created boot entry. It is referred to as NewGUID in the remaining examples. Run the following set of commands to configure the boot entry.

       

    bcdedit /set {NewGUID} device ramdisk=[c:]\sources\boot.wim,{ramdiskoptions}

    bcdedit /set {NewGUID} path \windows\system32\boot\winload.exe

    bcdedit /set {NewGUID} osdevice ramdisk=[c:]\sources\boot.wim,{ramdiskoptions}

    bcdedit /set {NewGUID} systemroot \windows

    bcdedit /set {NewGUID} winpe yes

    bcdedit /set {NewGUID} detecthal yes

    bcdedit /displayorder {NewGUID} /addlast

 

Now when you boot the system, an extra boot option "Windows PE boot" is presented and can be used to boot from c:\sources\boot.wim

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s