Creating a Flat Boot WinPE

You will need to prepare your own WinPE/WinFE build before proceeding with this walkthrough. For an easy to use method to create a minimal WinPE build check out the following projects -

You will need -

  1. boot.wim
  2. bootmgr
  3. bcdedit.exe
  4. A method for creating a bootable USB drive with BOOTMGR code written to the Volume Boot Record (aka Partition Boot Sector, etc)
  5. A method of extracting the contents of boot.wim
1 and 2 can be obtained from your WinPE build files. 3 and 4 are available in Windows Vista/7/8/8.1 etc. There are several options for step 5 - one of which is detailed below.

To create a bootable USB drive using DiskPart in Windows Vista/7/8/8.1 please follow the steps detailed here.

Once a bootable USB drive has been created, you will need to copy the required boot files. Copy bootmgr to the root of the stick. Make a new boot directory at the root of the disk. Create a BCD (Boot Configuration Database) store in the boot folder (see below). Your USB disk should have the following files -

For those not familiar with the BCD store it's basically a registry hive containing boot entries. The commandline tool bcdedit.exe is able to create this file and is included in Windows Vista/7/8/8.1. The following may be useful -

Please note that the batch file will need to be run as administrator.

The final step is to extract the contents of boot.wim to the root of your USB drive. There are several tools for achieving this including the Microsoft imagex and DISM tools. My preferred method is wimlib-imagex - as this open source tool is released under the GNU GPL version 3.0 licence.


Instructions - download wimlib-imagex (see link above) and run using the following command syntax -