MSFN Forum: Installing WinRE to hard disk - MSFN Forum

Jump to content


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Installing WinRE to hard disk Rate Topic: -----

#21 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 13 October 2011 - 07:41 PM

What is your OS, Vista or Win7?

If you mount your winre.wim and look at the structure, you should be able to make a functional WinPE to replace it. Or even you can try to add packages to the mounted winre.wim.

I've not tried to modify a Win7 winre.wim other than adding XML and injecting RAID drivers.


#22 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 14 October 2011 - 08:50 AM

View PostTripredacus, on 13 October 2011 - 07:41 PM, said:

What is your OS, Vista or Win7?

If you mount your winre.wim and look at the structure, you should be able to make a functional WinPE to replace it. Or even you can try to add packages to the mounted winre.wim.

I've not tried to modify a Win7 winre.wim other than adding XML and injecting RAID drivers.


Hey tripredacus

I already added HTA and SCRIPTING with DISM /image:C:\WINRE\MOUNT /addpackage /packagepath:PATH-TO-PACKAGE

worked well.... but when I boot to this image and run MY-HTA.HTA via CMD it don´t know with which programm the OS should open it (as windows does when the file-type is unknown) ... I could open with EDITOR, but i want to execute it ... maybe i have to open with MSHTA... I´ll try immediately

I do not have the MSXML-Package... Which Packages are nessassary for HTA? Or do I have to completely rebuild a WINRE.WIM and add the MSXML via
PEIMG before i /PREP the image?

or can I download the MSXML-Package.CAB somewhere

Greetings and thx so far....

EDIT:
Maybe i´ll build a new WINRE.WIM, so i simply can add the nessassary packages with PEIMG.EXE, but can´t remember what´s needed. For Vista i think there where 3 Packackes required, but can´t can´t remember and do not know if 7 is the same way...


SORRY, forgot to answer:
OS: Windows 7 SP1
%PROCESSOR_ARCHITECTURE%=x64
AMD64

This post has been edited by Schiiwa: 16 October 2011 - 08:54 PM


#23 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 16 October 2011 - 07:14 PM

I managed the MSHTA to work now and also have tryed to compile a exe

With Visual C++ and Quick Batch File Compiler ....

Description and Icon is fine, but it do not want to run. The problem:

The subsystem needed to support the image type is not present      


:realmad:

I guess the reason is the architecture. WinRE is x64 and the created exe is a Win32 application ... but maybe i am wrong

This post has been edited by Schiiwa: 16 October 2011 - 07:27 PM


#24 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 16 October 2011 - 08:56 PM

Work´s well now. you can see here:

http://www.msfn.org/...552#entry979552

Thx for assisstance tripredacus. I guess you´re bussy at the moment B)

#25 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,420
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 17 October 2011 - 03:58 AM

View PostSchiiwa, on 16 October 2011 - 08:56 PM, said:

Work´s well now. you can see here:

NO :angry: , I cannot, please review my comment there. :rolleyes:

jaclaz

#26 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 21 October 2011 - 03:21 AM

Im asking myself if it would have been possible to install the WIM with windows-setup (without answer-file), if I had set a /FLAG when i took the capture!??? :rolleyes:

Maybe anyone knows ;)

Bye and have a nice week-end!

This post has been edited by Schiiwa: 21 October 2011 - 03:22 AM


#27 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 21 October 2011 - 08:23 AM

View PostSchiiwa, on 21 October 2011 - 03:21 AM, said:

Im asking myself if it would have been possible to install the WIM with windows-setup (without answer-file), if I had set a /FLAG when i took the capture!??? :rolleyes:


Setup can install it, but if your captured image used /unattend switch with sysprep, the answer file is ignored. Your image (after setup) will boot to OOBE and all settings that would normally be done during sysprep first boot (Specialize, oobeSystem) are ignored.

#28 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 22 October 2011 - 11:56 AM

OK.... i didn't understand the /unattend-switch for sysprep till now :thumbup

But want to use my EXE-->HTA-->CMD anyway....

Worked fine and had 4 successful recoverys in my test-procedure, yet !

But now ReAgent makes trouble and do not want to run! Can´t ENABLE/DISABLE/SET-A-SETTING. Also the suddenly appearing directory:

Z:\Recovery\System32\Recovery



Confuses me. It Contains the ReAgent.xml, which is normaly located at C:\Windows\System32\Recovery! But If I change any value in any of any ReAgent.xml, it doesn´t have affect on the output of:

"Re-Agentc.exe /info"


So where does ReAgentC.exe get the information which u can see with added /INFO - parameter?

I can´t exacly say, what caused this behaviour. Maybe the ID=27 was no good idea, as the partition is not in front of the system's one. I've read all the documentations month ago, but I wanted to force a hidden recovery-partition :angel Or maybe the fact, that I didn´t compress my WinRE-Image, which had over 500 MB, caused the problem. I think to remember that there is a limitation of the size of winre.wim. But I was on good spirits as everything went just perfectly, that I've had no doubts to change a few things at a time. Of course THEN the DOOM was happening :ph34r: (Maybe it's important to say, that I DIDN´T RUN THE RECOVERY at this time!!

This is what I certainly did before:
- exchanged the WinRE.wim
- removed the letter and set ID to 27 (on partition 4 )


I have the reasonable suspicion, that I can´t avoid a Re-Install :lol:

This post has been edited by Schiiwa: 24 October 2011 - 08:38 AM


#29 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 24 October 2011 - 08:42 AM

You would normally run Reagentc /info from Windows and not the PE.

What version of Windows 7 are you using?

#30 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 24 October 2011 - 09:09 AM

View PostTripredacus, on 24 October 2011 - 08:42 AM, said:

What version of Windows 7 are you using?


Windows 7 x64 SP1 (with all updates)

Yea... I ran it from windows also and it returns the following:

C:\Windows\system32>reagentc /info
Erweiterte Konfiguration für die Wiederherstellungsumgebung

    Windows RE aktiviert:        1
    Windows RE bereitgestellt:         1
    Setup aktiviert:        1
    Benutzerdefiniertes Wiederherstellungstool: 1
    WinRE.WIM-Verzeichnis:
    Wiederherstellungsumgebung:
    BCD-ID:               fbf3595f-fce2-11e0-811f-a6936763aab2
    Setupdateien:
    Wiederherstellungsvorgang:   4
    Vorgangsparameter:
    Boot Startschlüssel-Abfragecode    0x8500
REAGENTC.EXE: Vorgang erfolgreich ausgeführt



But where does it get the information from?? If i change any value in any ReAgent.xml....
C:\Windows\System32\Recovery\ReAgent.xml
C:\Recovery\System32\Recovery\ReAgent.xml
Z:\Recovery\System32\Recovery\ReAgent.xml


It does not change the output of this command mentioned above! Here is some more output:

C:\Windows\system32>reagentc /enable
REAGENTC.EXE: Vorgang fehlgeschlagen: 57

C:\Windows\system32>reagentc /disable
REAGENTC.EXE: Vorgang fehlgeschlagen: 2
Das System kann die angegebene Datei nicht finden.

C:\Windows\system32>reagentc /setreimage /path Z:\Recovery\Winre\Winre.wim /target C:\Windows
REAGENTC.EXE: Vorgang fehlgeschlagen: b7
Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist.




This post has been edited by Schiiwa: 24 October 2011 - 09:26 AM


#31 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 24 October 2011 - 10:48 AM

It gets the information from the BCD. If you type BCDEdit into your command prompt, you will see the data. Here is an example I had from previous troubleshooting.

Has a recovery partition:
Posted Image

Doesn't have a recovery partition:
Posted Image

#32 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 24 October 2011 - 01:40 PM

View PostTripredacus, on 24 October 2011 - 10:48 AM, said:

It gets the information from the BCD. If you type BCDEdit into your command prompt, you will see the data. Here is an example I had from previous troubleshooting.



You don´t have to show me, how the BCD looks like with or without RE-Entry :whistle:
And i have to disagree:

Z:\Recovery>bcdedit /enum all /v

Windows-Start-Manager
---------------------
Bezeichner {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device partition=\Device\HarddiskVolume1
path \bootmgr
description Windows Boot Manager
locale de-DE
default {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}
resumeobject {8c379756-fd54-11e0-a85f-806e6f6e6963}
displayorder {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}
timeout 30

Windows-Startladeprogramm
-------------------------
Bezeichner {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}
device partition=C:
path \Windows\system32\winload.exe
description Windows 7 Ultimate
locale de-DE
inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence {a672b694-fd5c-11e0-8c9e-c1e0787e44b5}
recoveryenabled Yes
osdevice partition=C:
systemroot \Windows
resumeobject {8c379756-fd54-11e0-a85f-806e6f6e6963}

Windows-Startladeprogramm
-------------------------
Bezeichner {a672b694-fd5c-11e0-8c9e-c1e0787e44b5}
device ramdisk=[Z:]\Recovery\winre\Winre.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
path \Windows\System32\Winload.exe
description Windows Recovery Environment
inherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
osdevice ramdisk=[Z:]\Recovery\winre\Winre.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}
systemroot \Windows
nx OptIn
detecthal Yes
winpe Yes

Wiederaufnahme aus dem Ruhezustand
----------------------------------
Bezeichner {8c379756-fd54-11e0-a85f-806e6f6e6963}
device partition=C:
path \Windows\system32\winresume.exe
description Windows 7 Ultimate
locale de-DE
inherit {1afa9c49-16ab-4a5c-901b-212802da9460}
filedevice partition=C:
filepath \hiberfil.sys
debugoptionenabled No

Windows-Speichertestprogramm
----------------------------
Bezeichner {b2721d73-1db4-4c62-bf78-c548a880142d}
device partition=\Device\HarddiskVolume1
path \boot\memtest.exe
description Windows Memory Diagnostic
locale de-DE

Optionen zum RAM-Datenträgersetup
---------------------------------
Bezeichner {ae5534e0-a924-466c-b836-758539a3ee3a}
description Ramdisk Options
ramdisksdidevice partition=Z:
ramdisksdipath \Recovery\Boot\Boot.sdi


Now search this id....
fbf3595f-fce2-11e0-811f-a6936763aab2
and tell me where to find it :whistle:

This post has been edited by Schiiwa: 24 October 2011 - 01:42 PM


#33 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 24 October 2011 - 02:30 PM

It's no problem to create the nessessary entries to force the system being able to boot to winre! But I want to make REAGENTC.EXE able to work!

Solved it right now.... Had to replace

C:\Windows\System32\Recovery\Reagent.xml


with

C:\Windows\Winsxs\amd64_microsoft-windows-winre-recoveryagent_31bf3856ad364e35_6.1.7600.16385_none_16c18f8b899480af\Reagent.xml


then it worked again.

The problem was, that in my reagent.xml was the old ID. If i've set it to 00000000-0000-0000-0000-000000000000, i've probably been able to enable it.

but i can't set back the "already made recoveries" to 0! REAGENTC /INFO still says Wiederherstellungsvorgang: 4! Any other value can be changed through ReAgent.xml (for example <OemTool state="0"/>, wich will have affect on the output of "reagentc /info")

If i set <ScheduledOperation state="4"/> to 0, reagent won´t accept it (doesn´t matter whether i do that with enabled or disagled reagent) and if i disable or enable it, it is set to 4 again

So how can i set it back again to 0? it's not dokumented anywere and i'm pretty sure, that reagentc /info doesn't take this Information from BCD :lol:

This post has been edited by Schiiwa: 24 October 2011 - 07:11 PM


#34 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 25 October 2011 - 09:02 AM

View PostSchiiwa, on 24 October 2011 - 02:30 PM, said:

but i can't set back the "already made recoveries" to 0! REAGENTC /INFO still says Wiederherstellungsvorgang: 4! Any other value can be changed through ReAgent.xml (for example <OemTool state="0"/>, wich will have affect on the output of "reagentc /info")

If i set <ScheduledOperation state="4"/> to 0, reagent won´t accept it (doesn´t matter whether i do that with enabled or disagled reagent) and if i disable or enable it, it is set to 4 again

So how can i set it back again to 0? it's not dokumented anywere and i'm pretty sure, that reagentc /info doesn't take this Information from BCD :lol:


Wiederherstellungsvorgang = RecoveryOperation.
On a fresh install, while still in audit mode, the Recovery Operation value is 4 and the BCD Id is all 0s.
After sysprep /oobe, Recovery Operation = 4 but the BCD Id has a new value.

I can't do a recovery test on this system because I need it for other things atm. I wonder if that BCD Id ever changes after a recovery... but its obvious that Sysprep makes some changes once it goes into oobeSystem pass.

Anyways, I don't think ScheduledOperation state is the amount of recoveries run. Perhaps 0 is an invalid value? I've seen online some examples of 3, 4 and 5. Also Reagent.dll has the ability to write XML, so maybe if it sees an invalid value it changes it to whatever the default is?

#35 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 28 October 2011 - 06:19 AM

View PostTripredacus, on 25 October 2011 - 09:02 AM, said:

I can't do a recovery test on this system because I need it for other things atm.

You don´t have to

View PostTripredacus, on 25 October 2011 - 09:02 AM, said:

I wonder if that BCD Id ever changes after a recovery... but its obvious that Sysprep makes some changes once it goes into oobeSystem pass.


I found spoted that a disabled reagentc resets the BCD-ID to 000.....(in reagent.xml). I deleted the whole BCD and did a reset of my startupfiles with these:
bootsect /mbr
bootrec /fixboot
bootrec /fixmbr
bootrec /rebuild bcd


TWICE

The first time, everything went fine and I could re-enable it, because when I did the reset, the reagent was disabled. Btw. REAGENT also builds the nessassary BCD-entries for Rec.-Env.!!!

The second time i obviously did the reset with enabled reagent, so the ID in reagent.xml couldn't find the ID in my BCD. It was also strange to me, that the rec.-env. entries didn't appear again in the BCD without creating them manually. I created them, but with another ID, so reagent still couldn't find the ID from the xml :rolleyes: :rolleyes:

Now, everything is discovered, also with the RecoveryOperation-parameter, you are right. So stupid that i interpreted it as the count, because i did 4 recoveries, when i looked in reagent.xml the first time :wacko: :blink:

Thx for the standby .... Schiiwa

Also I don't like reagent very much, because it puts the winre.wim in this nasty GUID-subdir :lol: Just use it, to have the bootkey-option, because it uses 2 lines in BCD and i don't know how to create it manually!

This post has been edited by Schiiwa: 28 October 2011 - 06:37 AM


#36 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 28 October 2011 - 08:20 AM

View PostSchiiwa, on 28 October 2011 - 06:19 AM, said:

Also I don't like reagent very much, because it puts the winre.wim in this nasty GUID-subdir :lol: Just use it, to have the bootkey-option, because it uses 2 lines in BCD and i don't know how to create it manually!


I am going to think that its possible your WinRE is set up differently from mine. I have not seen a time where the winre.wim goes into a GUID directory. But never fear, at least we have Reagentc now... in Vista there was no such thing and frankly I'm glad Windows 7 WinRE is so much easier. I only had to build 1 recovery partition using the Vista tech and it was for Server 2008 Embedded Web. I'm glad about it and have mostly forgotten how exactly it was done.

#37 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 04 December 2011 - 07:12 PM

Hey guyz!

Can't unterstand that as well. Maybe you used the reagent of the pre-SP1-Windows (7600). Mine always created the Guid-dir as subdir (7601).
I now am using the first partition as boot/recovery-partition. Second is windows. Why does the system not want to boot, when deleting the second one?

P.S.: The BOOT\BCD is stored on PARTITION1 (Windows did this when starting setup!)

This post has been edited by Schiiwa: 04 December 2011 - 07:26 PM


#38 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 05 December 2011 - 09:18 AM

If used as intended, the recovery partition is hidden by default. It can only be made active by selecting the option in the Windows boot menu. If you have removed Windows, you can't access the boot menu to do this. You'd need to boot into a PE of some sort and use diskpart to unhide and make the recovery partition active.

#39 User is offline   Schiiwa 

  • Junior
  • Pip
  • Group: Members
  • Posts: 74
  • Joined: 23-December 10
  • OS:none specified
  • Country: Country Flag

Posted 05 December 2011 - 12:40 PM

I recovered the deleted Partition with Testdisk just to see the behaviour on some other event... I tryed a few things, for example renaming the Windows-dir to BLA... and the automatic-windows-repair did not renamed it back to Windows, instead it adapted the BCD-entries to the BLA-dir. Good job windows-guyz... whats so difficult to search for a file or in the registry, where windows was installed :rolleyes:

But it booted to windows anyway, but nearly no services been available... Renamed it, after a funny windows-boot ...

Anyway, this all doesn't matter to my question:

View PostTripredacus, on 05 December 2011 - 09:18 AM, said:

If used as intended, the recovery partition is hidden by default. It can only be made active by selecting the option in the Windows boot menu. If you have removed Windows, you can't access the boot menu to do this. You'd need to boot into a PE of some sort and use diskpart to unhide and make the recovery partition active.


This is another strange thing to me! Why should the WinRE-partition be the first? I 've read, that the main for this reason is, that there is the possibility to boot to winre, even if the OS-Partition gets corrupt! But why the h... won't it boot without Windows. All this could be simplyfied if the WinRE-Partition would ALWAYS be the active one!?? Isn't it the Case, that normaly the 100MB-partition is the active one?

I have 3 partitions at the moment:
  • 1st WinRE
  • 2nd Windows

Do i have to use 3 to make that work:
  • 1st WinRE
  • 2nd System-Reserved
  • 3rd Windows??????

I ask because i think to remember that the System-Reserved is the Active one, isn't it?

Slowly i begin to understand why u guys don't use the Windows recovery B)

So i could have left the Recovery-Partition as the 4th one without ANY disadvantages!!

P.S.:
I have no access to the PC right now, but ...
i'm sitting in front of a Vista-notebook, which has also a WinRE... I looked at the details of partition1(winre), and as u said, it is not the active one. But strangly here there are 2 BCDs, one on the Windows, and another one on the WinRE. The Mini-desktop with Windows 7 has just one on the recovery-partition!

This post has been edited by Schiiwa: 05 December 2011 - 01:16 PM


#40 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 05 December 2011 - 03:34 PM

Vista and 7 used slightly different boot methods to get to their WinRE. I find this great because Vista was a pain to do compared to 7.

Anyways, the System Reserved partition may not be 100% required, but since creating it with a recovery partition is required (for support purposes) I never tried to deploy it without one. But yes, the SR partition is marked as active. The order should be:

1. System Reserved
2. Recovery
3. Windows

The reason why it boots into Windows and not WinRE each time is because the WinRE partition is marked as a hidden boot volume. So in this case, the BIOS of a computer picks the first available boot volume, the one with Windows on it because it can't see the WinRE partition.

The reason to put the recovery partition first, or the service partition even back in XP days at the beginning of the disk did have some sort of reason for it. I forgot it by now. But you can definately have a recovery partition after the OS volume, for example I always installed the SoftThinks recovery partition (for XP) at the end of the disk just because it was easier to do, and they didn't seem to care what partition it was when dealing with support issues.

It would appear that none of my Microsoft documentation talks about the relevance of the location of the recovery partition. :}

Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

3 User(s) are reading this topic
0 members, 3 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy