I've built a developer image and am deploying it to workstations. It's a sysprepped image but I'm facing one issue at the end that I'm hoping someone can help me resolve which is where the machine is not bootable.

Because this is for a relatively small subset of people in the organisation (developers) I'm not using WDS or some other similar deployment mechanism, just a bootable USB key and Windows PE.

My commands are:

sel disk 0
cre par pri 500
format quick fs=ntfs
cre par pri
assign letter=c
dism /apply-image /imagefile:{foo.wim} /index:1 /applydir:c:\

(where {foo.wim} is the name of my WIM file)

The WIM file gets applied, and upon reboot the machine isn't able to boot. Fortunately it's easily solved by booting from an install disk and choosing to Repair. After this all's fine.

Screenshot at initial post WIM apply stage

I'd like however, not to have to do this last step so if someone could point out the step I'm missing I'd appreciate it.

I've added @Elliot Labs suggestion but that still isn't doing it, unfortunately

bootsect /nt60 C: /mbr
  • The WIM file gets applied, and upon reboot the machine isn't able to boot - How about giving us some details. What happens exactly? – joeqwerty Jan 31 '17 at 13:56
  • All the commands I run are listed in the question. It's the DISM command that applies the WIM file. Upon reboot I get a message that boot configuration data isn't accessible. The Repair option on the install disk fixes this – noonand Feb 1 '17 at 8:05
  • How many HDDs/SSDs are used in the deployment process (I am going to build you a command to rebuild the BCD from scratch)? – Elliot Labs Feb 3 '17 at 12:19
  • Check my new answer. It has information on how to rebuild your BCD. – Elliot Labs Feb 3 '17 at 12:48
  • So how exactly are you running these commands? I'm trying to figure out why an install.wim and media from MDT won't be available, especially since MDT makes a bootable image that you can run from a USB stick – Jim B Feb 3 '17 at 21:53

You are far better off using MDT to build your deployment. It looks like none of your steps create boot partitions.

  • Thanks for that, but I don't have the ability to do that in this instance. Do you have any idea which command I could use within the constraints of my existing process? – noonand Jan 31 '17 at 13:49

Complete rebuild of boot files

bcdboot X:\windows /s Y: /f ALL

The above command "installs" the BCD bootloader to the location of your choice. This should correct any BCD corruption by generating a new set of files.

Where X: is the drive to the active Windows folder (PE's windows directory) and Y: is the letter of the drive that is the target drive for the new BCD files. Usually the destination contains the deployed windows installation or is the system reserved partition, if you use such a beast.

/f ALL specifies that it should deploy both a UEFI and BIOS for maximum compatibility. Use /f BIOS or /f UEFI for a more minimal install.

/s Y: Specifies the destination drive for the bootloader deployment.

X:\Windows Specifies the windows directory that should be used as the source for the new boot files. This command does not generate new files by itself.

For more information use bcdboot /?

Boot sector:

You can deploy a boot sector to use a bootloader such as bootmgr (BCD) by using the following command:

You can do that by executing bootsect /nt60 X: /mbr

Where X is the mounted drive letter. Use /nt52 for Windows XP and the sorts. Use bootsect /? for more info

Extra info:

WIM files are file based (higher level) storage mediums and do not copy the sectors of a HDD/SSD. So you cannot copy the file system's boot code with the WIm format since boot code is more of a sector based thing (lower level).

If you did want to copy the boot code too then you might want to go with the VHD(x) format as that emulates an entire HDD and therefore the sectors which contain the bootcode can also be copied or deployed.


Your BCD database is corrupt. Rebuild it.

For good measure, reconfigure your boot sector too.

  • 1
    If you ever have the chance, MDT is an amazing tool. I understand if your infrastructure can't support it. MDT does have USB/CD/DVD modes if pxe/network is not an option. – Elliot Labs Feb 1 '17 at 18:22
  • I'm familiar with MDT and WDS but it's just in this instance none of those options are available to me hence the hand-rolling ;-) – noonand Feb 1 '17 at 20:40
  • Did my answer correct your issue? Thanks! – Elliot Labs Feb 1 '17 at 20:42
  • It's night time here (in Ireland) - I plan on trying tomorrow and will let you know then ;-) – noonand Feb 1 '17 at 20:44
  • Sorry, no joy. See edited question above – noonand Feb 3 '17 at 11:33

There other posible way, and it seems simply:

  1. Create USB boot key with Windows installer (copy disk image content to prepared flash drive)
  2. Remove from it sources\install.wim file
  3. Rename your WIM image to install.wim and place to sources\ folder on your USB key
  4. (Can be omitted) Prepare autounattend.xml file to your taste and place in root of your USB key (Windows SIM can help you)
  5. Boot from you USB key and installer will deploy your image!

Note! You WIM image must contains partition with Windows system installed. Windows system MUST be syspreped before WIM capturing (otherwise installed system will have guaranteed issues)

  • I did this in a circuitous fashion using ImgBurn, Rufus and Hyper-V. Alas it doesn't work and even refuses to boot. Sorry about that! – noonand Feb 10 '17 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.