Windows – HP Recovery partition not accessable after repartitioning

bcdclonezillagpartedpartitioningwindows 7

I have HP Laptop that came with preinstalled Win 7. It actually had 4 primary partitions:

  • 200 MB System partition that is not visible in Windows
  • C: partition
  • HP_Recovery partition of about 15 GB
  • HP_Tools partition of about 5 GB

I wanted to add additional D: partition for data, which was not possible since all existing partitions were primary. What I did was:

  1. Made an image of HP_Tools partition with Clonezilla
  2. Deleted HP_Tools partition with GParted
  3. Created new Extended partition with GParted
  4. Copied existing Primary partition HP_Recovery inside Extended partition, thus creating a new Logical partition (again with GParted)
  5. I deleted original Primary partition HP_Recovery with GParted
  6. I created 6GB empty Logical partition HP_Tools with GParted
  7. I created partition D: and arranged sizes in GParted

I rebooted into Windows, there was a standard CHKDSK screen, after which Win 7 booted w/o problems.

However, when I tried starting Repair Your Computer at the startup menu, and I got the 0xc0000225 Error code and a message:
The selected entry could not be loaded because the application is missing or corrupt.

I tried this solution: Using GParted to Resize Your Windows 7 or Vista Partition, no success.

I also tried solving the problem with BCDEasy, manually pointing to *.wim file. But with BCDEasy I can only add a new entry (there's no entry for Repair Your Computer option). Either way, when I try this solution I get 0xc0000017 Error:
Ramdisk device creation failed due to insufficient memory

Anyone have an idea? I'm refusing to give up 🙂 since I believe I only need to point to the correct disk/file to get this working. But I just don't see how.

Best Answer

You have two options here. You could create a new boot entry, with the correct options for the boot entry (in particular, WinPEMode and RecoveryOS). Alternatively, you could fix your existing boot entry to point to the correct location.

Most BCD editing tools don't show the recovery entries for whatever reason. It is possible to edit those entries through the registry (HKEY_LOCAL_MACHINE\BCD00000000\Objects\), but that could get confusing quite quickly. Visual BCD Editor does display recovery entries, among others, in a friendly view.

I've personally gone through a similar process, and have more detailed steps here. You could either fix the existing entries as I did, or add a new entry with the correct options as seen in the screenshots on the linked answer. I have not tested adding a new entry, and am unsure if it will work or not.

Likely differences from the solution in that answer are as follows:

The first thing to do is make sure you edit the recovery entry the main OS entry's RecoverySequence points to. This is the one that will be loaded on startup.

The ApplicationDevice and OSDevice options must point to the location of the Windows Recovery Environment's image (.wim). For me, this is a 169,213,970 byte file called Winre.wim. Since you shuffled the partitions, it's likely the path is already there but the drive letter is missing. You must identify which partition contains the appropriate path and files. On a normal Windows installation, this is the main OS drive (C:).

I can see HP_Recovery partition in Windows and there I can find some *.wim files. For instance E:\Recovery\WindowsRE\winre.wim 160MB file is there.

That is likely the correct image. In your case, those options should have the drive letter set to E:.

I'm not sure WinRE can be loaded from a logical/extended partition. It's worth a try, otherwise you should probably restore the recovery partition back to a primary one. Or you could even try copying the image into the main OS partition. The worst that should happen is a failure to boot into the RE.