Rebuilding revocery partition BCD

3,003 views
Skip to first unread message

Brett

unread,
Jun 3, 2013, 9:55:44 PM6/3/13
to visua...@googlegroups.com
Hello,

I'm trying to get a bootable laptop recovery partition working.  After pressing F11 to try and enter recovery mode, the error I get is:

Status:  0xc0000034
Info:  An unexpected error has occurred

I guess it's possible this is not even BCD related?

Attached are images from Visual BCDE with the recovery partition BCD file open and the result of 'bcdedit enum all /v'.

I'm in over my head tbh, any help is much appreciated.

thanks
2013-06-04 11_36_19-Visual BCD Editor - E__boot_BCD.png
2013-06-04 11_36_56-Visual BCD Editor - E__boot_BCD.png
2013-06-04 11_37_17-Visual BCD Editor - E__boot_BCD.png
bcdedit.txt

boyans

unread,
Jun 4, 2013, 8:03:11 AM6/4/13
to
Hi Brett,

On first reading there is nothing wrong with BCD contents.
Can you access files in recovery folder (should be 2 files: winre.wim and boot.sdi) ?

If the files are there (and BCD seems correct) then there is an additional place to look - 
C:\Windows\System32\Recovery\ReAgent.xml which duplicates parameters in BCD.

To manipulate recovery setup you can use the utility "ReAgentC.exe".

ReagentC.exe /info  - gives status info

ReAgentC.exe /disable - clears recovery for current OS loader in BCD and copies files "winre.wim" and "boot.sdi" back to
c:\windows\system32\recovey folder.

ReAgentC.exe /enable - sets recovery for current OS loader in BCD and copies files "winre.wim" and "boot.sdi" to
c:\Recovery\{GUID}\  folder and amends file C:\Windows\System32\Recovery\ReAgent.xml


This is the contents of an "empty" ReAgent.xml file:


<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<WindowsRE version="2.0">
<WinreBCD id=""></WinreBCD>
<WinreLocation path="" id="0" offset="0"></WinreLocation>
<ImageLocation path="" id="0" offset="0"></ImageLocation>
<PBRImageLocation path="" id="0" offset="0" index="0"></PBRImageLocation>
<PBRCustomImageLocation path="" id="0" offset="0" index="0"></PBRCustomImageLocation>
<InstallState state="0"></InstallState>
<OsInstallAvailable state="0"></OsInstallAvailable>
<CustomImageAvailable state="0"></CustomImageAvailable>
<WinREStaged state="0"></WinREStaged>
<ScheduledOperation state="4"></ScheduledOperation>
<OperationParam path=""></OperationParam>
<OsBuildVersion path=""></OsBuildVersion>
<OemTool state="0"></OemTool>
</WindowsRE>

Hope this can bring you further.
Bo

Brett

unread,
Jun 5, 2013, 8:19:08 PM6/5/13
to visua...@googlegroups.com
Hi Bo,

Thanks for the reply.

Do you mean the recovery folder on C or on the recovery partition (E)?

C:\Recovery has both of those files, E:\Recovery has winre.wim but not boot.sdi in another folder named WindowsRE.

ReAgent /info:

Extended configuration for the Recovery Environment

    Windows RE enabled:   1
    Windows RE  staged:   0
    Setup enabled:        0
    Custom Recovery Tool: 0
    WinRE.WIM directory:
    Recovery Environment: \\?\GLOBALROOT\device\harddisk0\partition2\Recovery\6f870d59-ccb4-11e2-a62c-00271332d2c1
    BCD Id:               6f870d59-ccb4-11e2-a62c-00271332d2c1
    Setup Files:
    Recovery Operation:   4
    Operation Parameter:
    Boot Key Scan Code    0x0
REAGENTC.EXE: Operation successful

Contents of ReAgent.xml

<?xml version='1.0' encoding='utf-8'?>
<WindowsRE version="1.0">
    <WinreBCD id="{6f870d59-ccb4-11e2-a62c-00271332d2c1}"/>
    <WinreLocation path="\Recovery\6f870d59-ccb4-11e2-a62c-00271332d2c1" id="1560802729" offset="115153920" guid="{00000000-0000-0000-0000-000000000000}"/>
    <ImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/>
    <OsInstallLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/>
    <InstallState state="1"/>
    <OsInstallAvailable state="0"/>
    <WinREStaged state="0"/>
    <OperationParam path=""/>
    <OsBuildVersion path="7601.17514.x86fre.win7sp1_rtm.101119-1850"/>
    <OemTool state="0"/>
    <BootKey state="0"/>
    <IsServer state="0"/>
    <ScheduledOperation state="4"/>
</WindowsRE>

I tried before this email reagentc /disable and /enable which fixed the 'Repair Your Computer' option when f* is pressed on start-up, but didn't help booting off the recovery partition.  One strange thing is it appears that the wim file that's loaded when choosing repair your computer isn't compatible with the OS, could it be the wim file is 64bit for a 32 bit OS?

Another thing i should add is I followed the instructions in this forum post to install the HP factory image onto the laptop, which worked fine but I can't get F11 working.

thanks again
Brett

boyans

unread,
Jun 9, 2013, 2:15:49 AM6/9/13
to visua...@googlegroups.com
1) Microsoft technet ReAgentC command help:

2) Windows 7/64 - untouched Winre.wim is 161 MB (169,213,970 bytes)
(I don't have Win 7/32)


3) Command syntax:
REAgentC {option} [argument] 

3)a) option -  /setreimage /path <Windows_RE_location> [/target<offline_OS>] [/bootkey<scancode>]

3)b)
Key ScanCode 
F1 0x3b00 
F2 0x3c00 
F3 0x3d00 
F4 0x3e00 
F5 Do not use (reserved)
F6 0x4000 
F7 0x4100 
F8 Do not use (reserved) [ =DEFAULT ]
F9 0x4300 
F10 0x4400 
F11 0x8500 
F12 0x8600 
 
4) In your case (winre.wim is in c:\windows\system32\recovery (disabled) + set bootkey to F11)
reagentc  /setreimage  /path C:\windows\system32\recovery\   /bootkey 0x8500
this tells place to take recovery file from and what bootkey to use later.

after that reagentc /enable !


Reply all
Reply to author
Forward
0 new messages