Solved Restore OEM OS from base.wim in HP RECOVERY partition

iBenny

New member
Local time
12:15 AM
Messages
40
Hi everybody !

First visit in this forum. Hope you are more knowledgeable than three other one (HP amongst them) that failed soon to attempt a resolution...

My HP G62 / W7 Home Premium 64 jammed (maybe by interrupting a windows update) on every F8 modes with this error:

interactive logon process initialization has failed. please consult the event log for more details.

After that, I did an F11 to trigger the Recovery Manager and first did a file backup.

After that, I split the main partition in order to store the file backup and shuffled the partition at EOD (end of disk).

After that... NO more F11 was working and I was stucked. I reinstated the partitions to their OEM disposition to no avail; no more F11 available.

With a Hiren's USB stick (HBUS) I then tied in the mini 7 OS many attempts to tweak the BCDs in order to trigger the access the RECOVERY partition from the SYSTEM BCD but everything failed.

I decided to install a new instance of W7HP64 with my Windows 7 AIO installation DVD. Prior to that, I backed the RECOVERY partition in case the installation would mess with it. I red later on that I should also have baked the SYSTEM partition for it would be changed and that I could loose the F11 and/or the OEM recovery functions. After thoughts, I said to me that installing the same OS over itself should restore the recovery functions, F11 amongst them. So I thought; I was wrong.

All went ok for the new W7HP64 installation and... no OEM restoration could be triggered.

I red somewhere that I could access the RECOVERY partition by making it "Active", what I did, and after some tweaking of the RECOVERY BCD, I was able to get into it and see the Restore Manager RM:

HLpsQ7ppIFL_HP-Recovery-manager---fr1.png


The first option "Restauration du système Mircosoft" involves restoration points to an earlier state, what is not what we want.

The two other options involve the reformat of the "entire" HD ! as stated in the next information page, that is NOT what I want. I only want the WINDOWS partition to be reformatted and be restored to OEM (factory) condition with the base.wim image on the RECOVERY partition.. But If it formats the whole HD, how can it restore the RECOVERY partition itself ?

Anyway, after proceeding through the last option (It does the same anyway with the second option), an error message pops up saying that the restoration cannot be performed from the HD (if it does format it. this is understandable) and can only be performed with a restoration disk... that I don't have.

The question is this: since I booted from the RECOVERY partition, how comes I can't recover the WINDOWS partition without resorting to a restoration CD ? Everything needed to perform the recovery lies in the RECOVERY partition !!!

Laptop info :

Partitions:
1. (A) SYSTEM (no letter)
2. WINDOWS C:\
3. RECOVERY D:\
4. HP_TOOLS E:\

(A): active

"D:\Recovery\system32\Recovery\ReAgent.xml"
"D:\Recovery\WindowsRE\winre.wim" (271M, 1 partition)
"D:\Recovery\WindowsRE\boot.sdi"
"D:\boot\BCD"..... the recovery boot file
"D:\boot\boot.sdi"
"D:\EFI\Microsoft\Boot\BCD"
"D:\EFI\Microsoft\Recovery\BCD"
"D:\EFI\Microsoft\Boot\bootmgfw.efi"
"D:\system.sav\preload\base.wim" (3.2G, 4 partitions)
"D:\system.sav\FactoryUpdate\boot.wim" (246M, 1 partition)
"D:\system.sav\FactoryUpdate\BOOT.SDI"
" :\Boot\BCD"..... THE main boot file
"C:\boot\BCD"
"C:\Recovery\8bcc9453-faf9-11e8-8721-efb323ce4303\boot.sdi"
"C:\Recovery\8bcc9453-faf9-11e8-8721-efb323ce4303\Winre.wim" (162M, 1 partition)
"C:\Recovery\8bcc9457-faf9-11e8-8721-efb323ce4303\boot.sdi"
"C:\Recovery\8bcc9457-faf9-11e8-8721-efb323ce4303\Winre.wim" (162M, 1 partition)
"C:\Recovery\abe9fdd0-fb1f-11e8-a94f-86cbf4dd2403\boot.sdi"
"C:\Recovery\abe9fdd0-fb1f-11e8-a94f-86cbf4dd2403\Winre.wim" (162M, 1 partition)
"C:\Windows\Boot\EFI\bootmgfw.efi"
"C:\Windows\Boot\EFI\bootmgr.efi"
"C:\Windows\System32\Recovery\ReAgent.xml"

Thanks in advance for your involvement.

Best regards
iBenny
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
You can apply the image from the base.wim to a partition using for example winntsetup.

If base.wim contains 2 images, use the larger one.

Winntsetup is included in my boot media.It is under the start menu \Install folder

17514x86.iso

17514x64-v9.iso
 

My Computers My Computers

  • At a glance

    7 X64i5 84002x8gb 3200mhz
    Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • At a glance

    7x64g54008gb ddr4 2400
    Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Will try that SIW2

Base.wim contains 4 images and #4 is the fullest. There is also a fifth [Files] folder. What to do of it ? deploy it ? but where ?

Do you suggest to deploy on top of the existing OS of after a formatting ?

PS : I agree with your signature...

Best regards
iBenny
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
Probably image 4.

You can format the target partition before applying the image. Suggest you use the windows partition ( probably the largest partition on the hard disk) to apply the image
 

My Computers My Computers

  • At a glance

    7 X64i5 84002x8gb 3200mhz
    Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • At a glance

    7x64g54008gb ddr4 2400
    Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Definitively image 4 ! I opened it and that's the Windows 7 Home Premium image...

Now, about WinNTsetup, in the bottom right section, I selected D: as "Mount installation drive" since it is the target drive to be recovered. Now, do I have to check something below like "drive letter assignment" or "mode" and select a mode ?
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
In the bottom right section - Mount Installation drive C: ( This is the letter windows will have when you boot into it)

Select Location of Installation drive D: ( This is the letter of the partition you are applying the image TO )

Do not check "drive letter assignment", do not check "mode"

Click Setup

at the next window, just click OK
 

My Computers My Computers

  • At a glance

    7 X64i5 84002x8gb 3200mhz
    Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • At a glance

    7x64g54008gb ddr4 2400
    Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Hi SIW2

With your EXCELLENT recovery CD, is there an app that can edit a wim image ? In the way of deleting a file and adding a file ? 7-Zip can open it but cannot delete, rename nor add a file...

Why the question ? because in the [1].xml file where all the parameters or the deployment is set, all the <Default> languages are set to en-EN instead of fr-FR. I managed to extract out that xml file and modified it, but can't get it back in to replace the current one.

Best regards
iBenny
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
Hi iBenny,

Welcome to SevenForums!

With your EXCELLENT recovery CD, is there an app that can edit a wim image ? In the way of deleting a file and adding a file ? 7-Zip can open it but cannot delete, rename nor add a file...

Why the question ? because in the [1].xml file where all the parameters or the deployment is set, all the <Default> languages are set to en-EN instead of fr-FR. I managed to extract out that xml file and modified it, but can't get it back in to replace the current one.

You can achieve this by using DISM++ to mount the image, make the changes, save and un-mount the install.wim file therefore committing the changes made. You will obviously need to unzip the install.wim first with something like 7-Zip as you have previously mentioned!

I hope this helps!
 

My Computer My Computer

At a glance

Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux...Intel(R) Pentium(R) CPU P6200 @ 2.13GHz4.00 GBIntel(R) Graphics Media Accelerator HD
Computer type
Laptop
Computer Manufacturer/Model Number
Fujitsu LIFEBOOK
OS
Win 7 HP SP1 64-bit Vista HB SP2 32-bit Linux Mint 18.3
CPU
Intel(R) Pentium(R) CPU P6200 @ 2.13GHz
Motherboard
FUJITSU FJNBB06
Memory
4.00 GB
Graphics Card(s)
Intel(R) Graphics Media Accelerator HD
Sound Card
[1] Realtek High Definition Audio [2] Intel(R) Display Audio
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 59 Hz
Hard Drives
TOSHIBA MK5076GSX
Antivirus
AVG FREE
Hi Paul,

Welcome and thanks for dropping by...

Not sure if you understand the whole implication of your suggestion.

In my understanding (correct me if I'm wrong) :

1- DISM can surely deploy ("mount" in your Unix term?) an image;
2- 7-Zip can surely unzip an image;
3- Deploy and unzipping are not the same;

You ask two things here : #1 and #2 ! Not sure really of your scenario here... or I don't understand.

First you ask to deploy base.wim on a partition (formatted I presume). It will be in en-EN.

Next you ask to fix it ! Fix what ? Convert the OS in fr-FR, then repack it in an image to be redeployed on my Seven D:\ partition ? If I could convert the OS strait out of the bat like this in fr-FR, I should do it strait after a deployment directly to the Seven D:\ partition from the get go !

Or fix the [1].xml file ? Will the image deployment "spit" out the [1].xml somewhere to be tweaked ? Of course I already did extract it with 7-Zip, yes, but then, how do we re-image the deployed image (easy with DISM... ok), but how do we include the [1].xml in the process ? AND... in the deployment we did, only the sub-image #4 (out of 4 sub-images) was deployed. If we re-image that sole OS, won't the [1].xml instructions be all ****ed up and render the next deployment impossible since it deals with 4 sub-images and now tries to instruct to deploy a single image out of four when now there are no sub-images but only a single one ? In the case of no-sub images, no xml are needed for deployment !? or only to instruct about the default language pack to use; but then it's a quite trimmed down xml that is needed and I don't know how to correctly configure it... My turn to be UN-understandable isn't it ?

And I don't know the usefulness of unzipping base.wim after that. Or I messed up your instructions !!!

Best regards and ... sorry for not having understood.
iBenny
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
Did you check that the image contains multiple languages?
 

My Computers My Computers

  • At a glance

    7 X64i5 84002x8gb 3200mhz
    Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • At a glance

    7x64g54008gb ddr4 2400
    Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
The [1].xml configuration file lists two languages en-EN and fr-FR (confirmed by their presence in the windows folder) and declares en-EN to be the default one. Maybe I'll Hex edit the base.wim file and change the default to fr-FR if you don't have an easier way to do it...
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
But gosh... a wim file is compressed so... the strings "might" also be compressed and un-findable : (
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
You can use wimlib-imagex.exe info command to change the xml image properties information.

wimlib-imagex.exe info "PATH_TO\sources\install.wim" 4 --image-property "WINDOWS/LANGUAGES/LANGUAGE=fr-FR" --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"

[Note - as above - it seems you have to change LANGUAGES/LANGUAGE as well as LANGUAGES/DEFAULT]


Wimlib-imagex.exe is included in the boot media in the Program Files\Tools\x64\wimlib folder.

So right click the Program Files\Tools\x64\wimlib folder and select command prompt.

Then enter the command into the prompt.

WIMINFO


--image-property NAME=VALUE
Specify an arbitrary per-image property to set in the XML document of the WIM file. VALUE is the string to set as the property value. NAME is the name of the image property, for example "NAME", "DESCRIPTION", or "TOTALBYTES". The name can contain forward slashes to indicate a nested XML element; for example, "WINDOWS/VERSION/BUILD" indicates the BUILD element nested within the VERSION element nested within the WINDOWS element. A bracketed number can be used to indicate one of several identically-named elements; for example, "WINDOWS/LANGUAGES/LANGUAGE[2]" indicates the second "LANGUAGE" element nested within the "WINDOWS/LANGUAGES" element. When adding a list of elements in this way, they must be specified in sequential order. Note that element names are case-sensitive. This option may be specified multiple times.

You will have to check your xml to work out the precise changes. You can use gimagex ( gimagex shortcut is in the start menu\install folder) to see if the changes worked correctly.
 
Last edited:

My Computers My Computers

  • At a glance

    7 X64i5 84002x8gb 3200mhz
    Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • At a glance

    7x64g54008gb ddr4 2400
    Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Hi SIW2,

it seems you have to change LANGUAGES/LANGUAGE as well as LANGUAGES/DEFAULT]

Respectfully, guessing is not my cup of tea...

I might have found an easier and more elegant solution that you surely might be VERY interested to know about : WINXML ! What do you think about it ?

Here is my [1].xml file. the colored lines are the one to be chaged. The most relevant for our purpose is the green line. Since I have already modified a copy of [1].xml, the above suggestion might be a good solution. What do you think ?

HLsqXEqbJdL_-1-.xml.png


Regards
iBenny
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
Wimlib does the job for me, and it does plenty of other things as well.

It seems you could use winxml you linked to replace the xml file - I don't have any experience of that program.
 

My Computers My Computers

  • At a glance

    7 X64i5 84002x8gb 3200mhz
    Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • At a glance

    7x64g54008gb ddr4 2400
    Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Okdo so... according to my [1].xml, what should be the exact (no guessing) command line to type ?

Maybe:

wimlib-imagex.exe info "[path]\base.wim" 1 --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"
wimlib-imagex.exe info "[path]\base.wim" 2 --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"
wimlib-imagex.exe info "[path]\base.wim" 3 --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"
wimlib-imagex.exe info "[path]\base.wim" 4 --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"

Regards
iBenny
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
So right click the Program Files\Tools\x64\wimlib folder and select command prompt.
Inside the Explorer of your booted Recovery CD, there is no such "Command prompt" option in the right clic window. So I copied the wimlib-imagex.exe and its dll in the location of the wim image to tweak and will reboot in normal Windows mode and do the modification there.

Doing so and renaming wimlib-imagex.exe to xml.exe shortens the command to :

xml info base.wim 1 --image-property WINDOWS/LANGUAGES/DEFAULT=fr-FR
xml info base.wim 2 --image-property WINDOWS/LANGUAGES/DEFAULT=fr-FR
xml info base.wim 3 --image-property WINDOWS/LANGUAGES/DEFAULT=fr-FR
xml info base.wim 4 --image-property WINDOWS/LANGUAGES/DEFAULT=fr-FR

Next episode to come...

iBenny
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
Result : SUCCESS !!!

[1].xml successfully modified in base.wim !

Now, the image deployment...

iBenny
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
Image deployment SUCCESSFUL !!! :D

Many thanks SIW2 for your help ! You rock man. You're a PRO...

Best regards
iBenny
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium 64 bit
Computer type
Laptop
Computer Manufacturer/Model Number
HP G62
OS
Windows 7 Home Premium 64 bit
Great :D
 

My Computers My Computers

  • At a glance

    7 X64i5 84002x8gb 3200mhz
    Computer type
    PC/Desktop
    OS
    7 X64
    CPU
    i5 8400
    Motherboard
    gigabyte b365m ds3h
    Memory
    2x8gb 3200mhz
    Hard Drives
    various
    PSU
    pure power 11 400w cm
    Case
    Coolermaster
    Cooling
    cryorig m9i
  • At a glance

    7x64g54008gb ddr4 2400
    Computer type
    PC/Desktop
    OS
    7x64
    CPU
    g5400
    Motherboard
    ga b365m ds3h
    Memory
    8gb ddr4 2400
    PSU
    xfx pro 450w
Back
Top