Tripredacus Posted October 24, 2011 Posted October 24, 2011 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:Doesn't have a recovery partition:
Schiiwa Posted October 24, 2011 Posted October 24, 2011 (edited) 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 And i have to disagree:Z:\Recovery>bcdedit /enum all /vWindows-Start-Manager---------------------Bezeichner {9dea862c-5cdd-4e70-acc1-f32b344d4795}device partition=\Device\HarddiskVolume1path \bootmgrdescription Windows Boot Managerlocale de-DEdefault {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}resumeobject {8c379756-fd54-11e0-a85f-806e6f6e6963}displayorder {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}timeout 30Windows-Startladeprogramm-------------------------Bezeichner {a672b693-fd5c-11e0-8c9e-c1e0787e44b5}device partition=C:path \Windows\system32\winload.exedescription Windows 7 Ultimatelocale de-DEinherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}recoverysequence {a672b694-fd5c-11e0-8c9e-c1e0787e44b5}recoveryenabled Yesosdevice partition=C:systemroot \Windowsresumeobject {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.exedescription Windows Recovery Environmentinherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}osdevice ramdisk=[Z:]\Recovery\winre\Winre.wim,{ae5534e0-a924-466c-b836-758539a3ee3a}systemroot \Windowsnx OptIndetecthal Yeswinpe YesWiederaufnahme aus dem Ruhezustand----------------------------------Bezeichner {8c379756-fd54-11e0-a85f-806e6f6e6963}device partition=C:path \Windows\system32\winresume.exedescription Windows 7 Ultimatelocale de-DEinherit {1afa9c49-16ab-4a5c-901b-212802da9460}filedevice partition=C:filepath \hiberfil.sysdebugoptionenabled NoWindows-Speichertestprogramm----------------------------Bezeichner {b2721d73-1db4-4c62-bf78-c548a880142d}device partition=\Device\HarddiskVolume1path \boot\memtest.exedescription Windows Memory Diagnosticlocale de-DEOptionen zum RAM-Datenträgersetup---------------------------------Bezeichner {ae5534e0-a924-466c-b836-758539a3ee3a}description Ramdisk Optionsramdisksdidevice partition=Z:ramdisksdipath \Recovery\Boot\Boot.sdiNow search this id.... fbf3595f-fce2-11e0-811f-a6936763aab2and tell me where to find it Edited October 24, 2011 by Schiiwa
Schiiwa Posted October 24, 2011 Posted October 24, 2011 (edited) 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 replaceC:\Windows\System32\Recovery\Reagent.xmlwithC:\Windows\Winsxs\amd64_microsoft-windows-winre-recoveryagent_31bf3856ad364e35_6.1.7600.16385_none_16c18f8b899480af\Reagent.xmlthen 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 againSo 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 Edited October 25, 2011 by Schiiwa
Tripredacus Posted October 25, 2011 Posted October 25, 2011 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 againSo 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 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?
Schiiwa Posted October 28, 2011 Posted October 28, 2011 (edited) I can't do a recovery test on this system because I need it for other things atm. You don´t have toI 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 /mbrbootrec /fixbootbootrec /fixmbrbootrec /rebuild bcdTWICEThe 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: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 Thx for the standby .... SchiiwaAlso I don't like reagent very much, because it puts the winre.wim in this nasty GUID-subdir 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! Edited October 28, 2011 by Schiiwa
Tripredacus Posted October 28, 2011 Posted October 28, 2011 Also I don't like reagent very much, because it puts the winre.wim in this nasty GUID-subdir 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.
Schiiwa Posted December 5, 2011 Posted December 5, 2011 (edited) 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!) Edited December 5, 2011 by Schiiwa
Tripredacus Posted December 5, 2011 Posted December 5, 2011 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.
Schiiwa Posted December 5, 2011 Posted December 5, 2011 (edited) 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 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: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 WinRE2nd WindowsDo i have to use 3 to make that work:1st WinRE2nd System-Reserved3rd 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! Edited December 5, 2011 by Schiiwa
Tripredacus Posted December 5, 2011 Posted December 5, 2011 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 Reserved2. Recovery3. WindowsThe 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.
Schiiwa Posted December 5, 2011 Posted December 5, 2011 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. You already mentioned this at least 2 times, but i know that already, as the first experimentations happened under Vista, now i try to understand 7's 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 Reserved2. Recovery3. WindowsMaybe i will try this layout and hope to be able to boot to win-r.e. without 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. I know that is possible, because i created successful a Recovery as the 4th partition (behind 1system-res.,2nd windows, 3rd data)... But i wanted to have no access to it to prevent it from viruses or incompetent access (remember, this PC is for my lil' brother) I now remember, that the location at the beginning is always mentioned in relation with the ID27-partition! When i tryed to give the ID27 to this 4th partition, my problem was, that i recaptured the Winre.wim, which wasn´t bootable. This created the failture at booting, but i thought the id27 is the problem... Question1: (don´t think this will work)Gremo used the 1st partition as active as u can see here:Is ist possible to set it active without booting in loops to winre?? Or is it just active because he booted to winre (thats what i expect, as he start with: "I'm booting into WinRE from and hidden partition." Question2: (should work because the new active part. would be the Sys.-Res. and not the windows one!?)Do you think when i use your suggestion to include a Sys.-Res.-Partition, will it be bootable without Windows-Partition and WITHOUT winpe to set it active manually?Additional:http://technet.microsoft.com/en-us/library/cc766149%28WS.10%29.aspxThere it says: "To back up and to restore the Windows RE partition, the partition must not be hidden."so i should set the ID to 7 before capturing or applying the recovery-partition-image?? (i want to include this, to do the recovery from DVD in case of HDD-replacement)
Tripredacus Posted December 6, 2011 Posted December 6, 2011 Question1: (don´t think this will work)Gremo used the 1st partition as active as u can see here:Is ist possible to set it active without booting in loops to winre?? Or is it just active because he booted to winre (thats what i expect, as he start with: "I'm booting into WinRE from and hidden partition." Question2: (should work because the new active part. would be the Sys.-Res. and not the windows one!?)Do you think when i use your suggestion to include a Sys.-Res.-Partition, will it be bootable without Windows-Partition and WITHOUT winpe to set it active manually?Additional:http://technet.microsoft.com/en-us/library/cc766149%28WS.10%29.aspxThere it says: "To back up and to restore the Windows RE partition, the partition must not be hidden."so i should set the ID to 7 before capturing or applying the recovery-partition-image?? (i want to include this, to do the recovery from DVD in case of HDD-replacement)1. It was marked active during install/deployment. Basically how the recovery partition works is that it is hidden. If you want to boot into it, you need to send a command that unhides it and sets it as the first boot volume. The trick is that after doing your work in WinRE, that a script or program runs to hide the partition again. ID changes to partitions do not take immediate effect, as the BIOS only reads the partition IDs during POST. 2. If you want a scenario where you have:- System Reserved (active)- WinRE (hidden)- Blank partitionYou will need some sort of BIOS level software to handle unhiding the partition and allow booting into it, since Windows isn't there to handle the boot request. I used the MBR.EXE program from Terabyte Unlimited in this old project:Additional: Yes well the public MS documentation is hard to figure out sometimes I'd agree. Basically it is telling you it can't be hidden because if it is, you won't be able to capture it with the supported tools. Sector based imaging software such as Acronis or Ghost can because they don't care if it is hidden or not.
Schiiwa Posted December 9, 2011 Posted December 9, 2011 (edited) 1. It was marked active during install/deployment. Basically how the recovery partition works is that it is hidden. If you want to boot into it, you need to send a command that unhides it and sets it as the first boot volume. The trick is that after doing your work in WinRE, that a script or program runs to hide the partition again. ID changes to partitions do not take immediate effect, as the BIOS only reads the partition IDs during POST. Just verified the partitions on the particular Windows 7-pc ... and this is the detail of the 1st partition taken with diskpart within Windows..Partition 1Typ : 27Versteckt: JaAktiv : JaOffset in Byte: 1048576 Volume ### Bst Bezeichnung DS Typ Größe Status Info ---------- --- ----------- ----- ---------- ------- --------- --------* Volume 3 Recovery NTFS Partition 14 GB Fehlerfre VersteckNow I also remembered, that I set it active when creating it. It got ID27 and was set active before I installed Windows 7!!!2. If you want a scenario where you have:- System Reserved (active)- WinRE (hidden)- Blank partitionYou will need some sort of BIOS level software to handle unhiding the partition and allow booting into it, since Windows isn't there to handle the boot request. I used the MBR.EXE program from Terabyte Unlimited in this old project:this cannot be 100% true, because when i format OS-Partition, it also boots to winre without any windows-tools! Just when i remove the partition, winre is un/inaccessable... Why is windows that stupid!!! I just removed the OS-partition for testing... Taking the MBR.EXE won't help me, as the WinRE is already the active partition!Maybe I'm gonna try this partitioning or alternatively this one:- WinRE (hidden)- System Reserved (active)- WindowsAdditional: Yes well the public MS documentation is hard to figure out sometimes I'd agree. Basically it is telling you it can't be hidden because if it is, you won't be able to capture it with the supported tools. Sector based imaging software such as Acronis or Ghost can because they don't care if it is hidden or not.Of course this was related to imagex. Did you try that already. I could imagine that it works also with ID27 to capture or apply an image on or from an ID27-partition *not verified*EDIT:The attachment is the DISKPART script i used for the last configuration! Really strange that BOOTMGR or BCD insist on the Windows-partition and deny if not presend° CreatePartitions.txt Edited December 9, 2011 by Schiiwa
Tripredacus Posted December 10, 2011 Posted December 10, 2011 this cannot be 100% true, because when i format OS-Partition, it also boots to winre without any windows-tools! Just when i remove the partition, winre is un/inaccessable... Why is windows that stupid!!! I just removed the OS-partition for testing... Taking the MBR.EXE won't help me, as the WinRE is already the active partition!The attachment is the DISKPART script i used for the last configuration! Really strange that BOOTMGR or BCD insist on the Windows-partition and deny if not presend° Well if it boots to WinRE then something was done to change it or that it was initially created in a non-standard way. There would be no reason that the hidden partition would be unhidden and bootable after formatting the OS volume. If there is any MBR tools used to control the WinRE, formatting OS volume may not remove it, making it possible to still have the control code in that partition for WinRE. For your script, i don't know the relevance of setting ID 0x27 so soon. The newer WinPE is fast enough to possibly detect changes in partitions, which I ran into with doing XP recovery. Usually I would only change partition IDs at the end of all my work.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now