Here's a common scenario I encounter: I copy the contents of the Win7 installation ISO to a small ntfs partition on the disk I intend to install Windows to, boot into Windows setup, and install. During setup, Win7 uses this ISO partition as the boot partition that chainloads the real system partition. While this configuration boots, one can not install Win7SP1, for instance, because "bcdedit /enum" can't find the BCD entries.

Changing this without booting to WinPE is almost completely undocumented; the prevailing solution is to delete the ISO partition and repair using the DVD. This is 2013. I'm not going to use a DVD or any other boot media. Expecting that getting "bcdedit /enum" to not fail outright would fix this condition led me to a solution that doesn't require booting into another environment.

My solution, briefly:

  1. Copy the \boot from the ISO partition (e,g, D:) to c:\boot
  2. Destroy the ISO partition
  3. Use bcdedit /store c:\boot\bcd to tweak the values (Chiefly, fix the boot partition from D: to C:).
  4. In regedit, load c:\boot\bcd as a hive named BCD00000000 in HKLM
  5. Add to the regkey "HKLM\BCD00000000\Description" a value: name "TreatAsSystem", type REG_DWORD, value 0x1
  6. In HKLM\SYSTEM\CurrentControlSet\Control\hivelist, add value: name "\REGISTRY\MACHINE\BCD00000000", type REG_SZ, value "\Device\HarddiskVolume1\boot\bcd", where HarddiskVolume is the correctly numbered (see sibling values for hints).
  7. Test that "bcdedit /enum" works
  8. Reboot to C: rather than D: (I was using grub anyway)

(I discovered that the changes to hivelist are not persisted; I need to find out why)

The Windows boot process is madness. Here's hoping UEFI relegates all this nonsense.