Jump to content











Photo
- - - - -

Automated recovery help?


  • Please log in to reply
12 replies to this topic

#1 TheRookie

TheRookie

    Newbie

  • Advanced user
  • 156 posts
  • Location:in your mind
  • Interests:computers: (repairing, administration), reading: (technological info), outing: (having a good time), music (electronic, house, instrumental...) and hiking
  •  
    South Africa

Posted 14 October 2011 - 11:45 AM

Hello guys and gals,
please could you help me with the following scenario if you have any knowledge perhaps?
I am aware of some things, but, not sure what program to use and abit confused.
I have 2 partitions:
1. OS (71.0 GB primary, active)
2. Recovery (6.0 GB, primary hidden)
at boot time, I'd like a message to be flashing by something like:
press f10 to boot to recovery.
otherwise, if nothing is pressed, it will boot normally to the OS partition. and hide the recovery partition.
and if f10 is pressed,
it will boot to recovery partition, and restore the base image to the os partition.
Ok, so I think I may have the recovery thing sorted out by using MBldr.
But, if I use Mbldr, not sure what program to use which is free and supports commandline.
Aware of what, am I?
microsoft's reagentc which then the need of mbldr doesn't matter anymore,
I've tried using the reagentc just for a test however after it applies the wim image, it creates a windows.old directory. which takes up space.
but, what I actually want to achieve is something like:
0: Boot to winPE.
1. ask user whether they'd like to restore partition? If yes,
2. format first partition 71,0 gb
3. restore image
4 Restart.
If I used reagentc,
I could perhaps make a script that use diskpart to format first partition and imagex to apply the image, but my biggest fear is that,
how do I know that the first disk 0 will be the hard disk with both the partitions, what if for example a user adds another disk to the pc? and that disk, became disk 0 instead?

or, to keep things simple, using mbldr as the bootsector do I do something like:
1. place a copy of the winPE from AIK in to recovery partition.
2. modify the winPE image to contain a file that will do the following:
diskpart
sel dis 0
sel par 1
delete partition override
cre par pri
for fs=ntfs quick
assign letter=c:
exit
imagex /apply d:image.wim 1 c: (assuming d: is the letter of the recovery partition?)
cd c:windowssystem32
bcdboot c:windows /s c:
Sorry for the long post, and if you've read thus far, I appreciate your time in reading it and hope you may be able to point me in some direction here.
I'm highly confused to be honest here.
Regards,

#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 October 2011 - 03:32 PM

It seems to me like you have perfectly described a "correct" procedure in the last part of your post. :thumbsup:

Which is the problem with it? :unsure:

:cheers:
Wonko

#3 TheRookie

TheRookie

    Newbie

  • Advanced user
  • 156 posts
  • Location:in your mind
  • Interests:computers: (repairing, administration), reading: (technological info), outing: (having a good time), music (electronic, house, instrumental...) and hiking
  •  
    South Africa

Posted 14 October 2011 - 03:47 PM

Hello Wonko,

Thankyou for the thumbsup on the last part.
:)
The problem is:
If I use this method, will winPE consistantly apply the recovery partition as d: and the OS partition as c:?
what if, for example the user install another hdd, and wanted to use the autorecovery feature?
is there a way to have these partitions assigned no matter what happens?
also, if I use mbldr, and I boot to the recovery partition, will the OS partition be hidden since when I setup MBldr, i selected to hide drives at boot so that in windows I wouldn't be able to see the recovery partition, or is there some option in mbldr to have the windows partition show when booting from the recovery partition?

Regards,

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 October 2011 - 04:25 PM

Talking of disks seens as "fixed" (like all internal hard disk normally are).

Drive letter assignment can be of TWO types:
  • automatic (following a given set of "rules")
  • manual (by using a Registry entry)
Basically if a partiion/volume is detected and there is NOT already an entry in the Registry for it, the "automatic" letter assignment is used.

The entry for "manual" drive lettering is based on a Registry key that "couples" a letter to a partition/volume, this latter identified by TWO parameters:
  • Disk Signature
  • Partition/volume offset on disk
See here (some of th einfo here is related to XP but the disk signature/offset part is valid for *any* NT based system):
http://www.911cd.net...showtopic=19663

So, as long as TWO conditions are met:
  • Disk signature is NOT changed (or duplicated)
  • Partition/volume is NOT "moved" (i.e. "moved" to a different offset on disk)
Any given NT install will "keep" the drive lettering no matter how many disks/partitions you add.

About mbldr I don't see the problem, but there are also other bootmanagers capable of doing this simple "switch":
http://reboot.pro/8296/
The actual problem with mbldr may be the use of F11, but F10 should be allright, see here:
http://www.msfn.org/...d/page__st__105
(also given as reference in the above mentioned thread)

:cheers:
Wonko

#5 TheRookie

TheRookie

    Newbie

  • Advanced user
  • 156 posts
  • Location:in your mind
  • Interests:computers: (repairing, administration), reading: (technological info), outing: (having a good time), music (electronic, house, instrumental...) and hiking
  •  
    South Africa

Posted 16 October 2011 - 03:25 PM

Hello sir Wonko,

Thanks for the info provided, I'm now able to use f10 option with mbldr.
I've followed the instructions on how you have shown to use mbldr with the following change:
I've ticked hide partition at boot time, so that when I boot to OS partition, recovery partition doesn't show.
but even if I boot to recovery partition, OS partition doesn't show, which would be a problem to restore the image.
so I've done the following:
installed g4d to recovery partition
made a menu like:
timeout 2
default 0
title automated recovery
unhide (hd0,0)
chainloader (hd0,1)/bootmgr
this works,
but for the drive assignment,
I'd like to ask you a few questions please:
1. If I boot to OS partition, and because the partition will be assigned as c:, could I then assign the recovery partition r: and then copy the respective keys in the registry and modify the registry of winPE to include them?
2. If that might not work, would booting to winPE, and then copying the specific keys containing the drive assignments and modifying the winPE to include them work?

Thanks for your time,

Regards,

#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 October 2011 - 06:57 PM

1. If I boot to OS partition, and because the partition will be assigned as c:, could I then assign the recovery partition r: and then copy the respective keys in the registry and modify the registry of winPE to include them?

Sorry, I don't get it. :w00t:
If you chose to HIDE the "recovery" partition when "main OS" is booted, then you CANNOT assign a drive letter to the.recovery partition. :dubbio:

2. If that might not work, would booting to winPE, and then copying the specific keys containing the drive assignments and modifying the winPE to include them work?

I still dont' get it. :ph34r:

Can you try to expand/better explain BOTH qurestions? :unsure:

:cheers:
Wonko

#7 TheRookie

TheRookie

    Newbie

  • Advanced user
  • 156 posts
  • Location:in your mind
  • Interests:computers: (repairing, administration), reading: (technological info), outing: (having a good time), music (electronic, house, instrumental...) and hiking
  •  
    South Africa

Posted 16 October 2011 - 07:10 PM

Hello Wonko,

what I ment was:
1. Using mbldr, and booting to the OS partition, the recovery partition will be hidden. If I then unhide the recovery partition, using a program like bootice, assign the recover partition as r: would it work if I then copied the keys from the registry for the drive letter assignments of c: and r: and modify the registry of winPE to include them?
If it wouldn't work,
would:
2. using mbldr, press f10 to boot to recovery. whilst I'm booting to recovery, g4d is unhiding the OS partition so that it will be assigned a drive letter in winPE.
once booted in to winPE, could I then copy the x:windowssystem32config directory to drive c:config so that when I'm in normal OS, look at how winPE has assigned the drive letters, and then copy the respective keys in to the registry of the winPE which I had just booted from?


I hope it makes sense.

sorry for my bad explanation.

:(

Regards,

#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 October 2011 - 07:37 PM

I don't get it.
Hide the Recovery partition.
Make it NOT Active.
Make active the OS partition.
Boot the OS.
Which drive letter takes the OS partition? (I presume C: )

Unhide the recovery partition.
Leave it's status to NON active.
Leave the OS partition Active.
Boot the OS.
Which drive letter takes the OS partition? (I presume still C: )
Which drive letter takes the "Recovery partition"? (let's say "E:", go to disk management and change it to "R:")

Boot the Recovery OS (by chainloading the bootmgr on (hd0,0))
How are drive letters assigned?
Possibly the Recovery is C: and the OS is (say) E:
Jolt down this data, reboot, access OFFLINE the Recovery Registry and replace the "DosDevicesC:" with "DosDevicesR:" and the "DosDevicesE:" with "DosDevicesC:", and delete all other keys, save the wim or whatever and try again booting the Recovery OS.

:cheers:
Wonko

#9 TheRookie

TheRookie

    Newbie

  • Advanced user
  • 156 posts
  • Location:in your mind
  • Interests:computers: (repairing, administration), reading: (technological info), outing: (having a good time), music (electronic, house, instrumental...) and hiking
  •  
    South Africa

Posted 22 October 2011 - 05:21 PM

Hello Wonko,
Thanks a million for your help on making this topic happen.
:)
i've almost got it going now.
:)
but please, may I ask you just few more questions?
Do you know of anyway to hide some text appearing on the screen?
for example, I have it going like this:
in startnet.cmd I've placed a file called r.cmd
now when the PE boots up,
it shows:
x:windowssystem32
wpeinet
r.cmd
and then some of the contents of r.cmd like:
formatting...
imagex...
etc
I'd simply like it to display:
are you sure you'd like to restore the image?
of which I have going, (thanks to you), but is there someway to hide like the results of formatting and then it shows the results of the format, , the progress of imagex applying the image, the output of bootsect where it says something like: ... has been updated with bootmgr bootcode. and also, that thing of x:windowssystem32, wpeinet etc?
again, I cannot thankyou enough for your help thus far, you are really helping me loads here sir.
Even if there is no way to hide the text, I'm still so ever grateful, for what I've asked for has been accomplished and it wouldn't have happened without your help!
:)
:)
:)
:woot:
Regards,

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 23 October 2011 - 08:33 AM

Well :), most probably you can redirect the Console and Standard error to NUL.
You have to modify the batch I mean.
Post the batch contents and I may help further or directly learn about redirection and do it yourself:
http://www.robvander...redirection.php

Or try using any of the various "hiding" utilities, I have no idea if they would work in your setup, though, a normally used one is
http://www.nirsoft.n...ils/nircmd.html

Or you can cheat :w00t: and experiment with "COLOR" (please note the US spelling :ph34r:) command, color 01 or color 19 are pretty much UNreadable, if you add a few CLS, you won't see much. :dubbio:

:cheers:
Wonko

#11 TheRookie

TheRookie

    Newbie

  • Advanced user
  • 156 posts
  • Location:in your mind
  • Interests:computers: (repairing, administration), reading: (technological info), outing: (having a good time), music (electronic, house, instrumental...) and hiking
  •  
    South Africa

Posted 23 October 2011 - 11:31 AM

Hello Wonko,

:)

Thanks a mill!
:)

Its all good now, you are the man!
:worship:
:w00t:

I've all got it going now, and I'm very happy! thank you!

:)
Thanks for not giving up with me since my English, or what I'm trying to put across seems vague.

Regards,

:cheers:

#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 23 October 2011 - 05:14 PM

I've all got it going now, and I'm very happy! thank you!

:)


Very good. :)
Now, why not attempting to make someone else happy by providing a full description of your setup so that if anyone else is wanting to do something similar will have a guideline? :unsure:

:cheers:
Wonko

#13 TheRookie

TheRookie

    Newbie

  • Advanced user
  • 156 posts
  • Location:in your mind
  • Interests:computers: (repairing, administration), reading: (technological info), outing: (having a good time), music (electronic, house, instrumental...) and hiking
  •  
    South Africa

Posted 23 October 2011 - 06:23 PM

Hello Wonko,

I definitely will write some tutorial on this. It is currently in the writing stage as I speak. With all your help you have given me, it is most unfair that I didn't write something about it. I will put it up really soon. I promise.
:)

Thanks again for the wonderful help, and support.
:)

:cheers:




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users