Drive SnapShot - Restoring an OS image

Discussion in 'backup, imaging & disk mgmt' started by Brian K, Feb 12, 2008.

Thread Status:
Not open for further replies.
  1. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    I'd like to describe a different way to restore a Drive SnapShot OS image. The standard techniques are to restore from DOS or a BartPE CD. Sometimes these environments present problems so if you would like an alternative, read on.

    You double click a batch file, WinXP shuts down and the computer boots into your second WinXP OS (you must have two OS for this to work).
    Drive Snapshot runs the restore.
    The second OS shuts down and the computer boots into your restored WinXP OS.

    It's an adaptation of......

    https://www.wilderssecurity.com/showthread.php?t=195318&page=6#144

    Unlike IFW it's not completely unattended. You have to click OK to start the restore process but apart from double clicking the batch file, this is the only manual intervention.
     
  2. nexstar

    nexstar Registered Member

    Joined:
    Jun 23, 2004
    Posts:
    371
    Location:
    Southampton, UK
    Thanks for the info, Brian. A couple of questions :) .

    What does the batch file look like?
    How do you tell it to boot into the second OS...and vice versa?

    This got me thinking as UBCD can be frustratingly slow to boot, especially when you just want to do a quick bit of testing. I recently bought the IFW package, mainly for the Phylock/Rollback combination, and I couldn't help but be impressed by the startup time for IFD. So, I was thinking that if I could set up another bootable partition which would not be RB protected then I could avoid using the UBCD boot disk for most situations.

    Installing a multi-boot into the MBR seemed like a complication I didn't need with RB installed and so I thought that, effectively, a boot cd like IFD but with OS boot options would be great.

    [update]
    Hmmm....I think I've just discovered that that's exactly what I can do with BootIt NG which was part of the IFW package I bought :) .

    Graham
     
  3. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    Graham,

    Two ways. As you have BING, you can use BootNow. Let's say you have two WinXP OS called WinXP and SecondXP in the BING boot menu and they are partitions 1 and 2 on your first HD. The batch file to go from 1 to 2 is simply..

    bootnow 2

    and the batch file to return to WinXP is simply...

    bootnow 1

    This latter command will be at the end of your snapshot restore batch file. (A shortcut to this batch file will be in the Startup folder of SecondXP)

    Otherwise you can use pqboot32.exe from Partition Magic. The batch files are...

    pqboot32 /p:2

    and

    pqboot32 /p:1

    In the snapshot batch file you will be restoring to a hidden partition (without a drive letter) so you will need to use HD1:1 in this example instead of the usual C:
     
    Last edited: Feb 13, 2008
  4. Longboard

    Longboard Registered Member

    Joined:
    Oct 2, 2004
    Posts:
    3,238
    Location:
    Sydney, Australia
    Nice posts :thumb:
    ;) One BING to rule them all, and in the darkness bind them...

    @nexstar:
    Care to elaborate on this:
    "I recently bought the IFW package, mainly for the Phylock/Rollback combination.."

    ??
    What have you come up with ?
    How are you applying it ??

    Thx.
     
  5. nexstar

    nexstar Registered Member

    Joined:
    Jun 23, 2004
    Posts:
    371
    Location:
    Southampton, UK
    @Brian K
    Thanks for the info, Brian. I'll have a play around with this.

    It's none of my doing :) . It came out of the extensive research carried out by markymoo (the man deserves a medal :thumb: ). If you are a Rollback/Eaz-Fix user then you can use IFW combined with the Phylock add-on to image all of your snapshots from within Windows. You still need a mbr/track 0 which is saved from outside of Windows, but this is probably a one-time exercise unless your system setup changes.

    Graham
     
  6. Longboard

    Longboard Registered Member

    Joined:
    Oct 2, 2004
    Posts:
    3,238
    Location:
    Sydney, Australia
    Ok, got it, yeah; m-m did some very nice testing.
    I asked terabyte about IFW and RollBack some time ago and got a response relating to the 'raw' image function, but did not pursue it as RB was so buggy at the time: went with FDISR and no reason to change as yet.
    Nice to see RB getting some traction ( especially with the added utility of a good image with DS and Terabyte and tools for MBR.) sad that it was at the detriment to FDISR. Still don't understand that. ( mushroom factor heh )

    really pleased to see terabyte getting such great exposure and "demystifying" :)

    Kudos to all.
    Now..... Waiting for BING V2.....:cool:
     
  7. markymoo

    markymoo Registered Member

    Joined:
    Sep 25, 2007
    Posts:
    1,212
    Location:
    England
    Thats great i press the Brian button and its all restored :) glad to see you maximising the goldmine tools of Terabyte for an interesting superior restore to conventional ways. It very handy have an extra windows for restore and emergency maintenance of your primary windows even though alot don't take the trouble to have a dual-boot windows. Its good assurance having that i can boot into my other windows at any time and have install lots of essential recovery repair utils also. I suppose another way is you could alter the boot.ini in an automated way before shutdown to force it to boot into the other windows and then back into the original without using any extra tools. What's good with your interesting method is it dosent have to be restricted to another windows it could run from other sources too like Dos or CD Recovery. A long while ago i made boot.ini boot XP and either Dos so Dos could boot up your restore procedure too. I'm sure you smile when you walk away from your pc and you come back and its all restored. Lets hope more pissed off Acronis users find there way here.

    A big plus for stress free restore. Keep up the good work. :thumb:

    It seems Drive Snapshot is flavour of the month again. ;)

    Thanks Nexstar, Longboard(beard). I into details but i'm no woman lol and thats how i always find out stuff ;) .

    PS. I love hidden partitions and nice to be back been busy lately.
     
    Last edited: Feb 14, 2008
  8. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    markymoo,

    Have you noticed that Drive SnapShot images of hidden partitions are uncompressed? Any way around this?
     
  9. appster

    appster Registered Member

    Joined:
    Jun 19, 2007
    Posts:
    561
    Location:
    Paradise
    @Brian~ Sorry but while you have peaked my interest, you have left me confused. Is BING (which I do not own) required for your DS restore scheme of just executing a batch-file?
     
  10. markymoo

    markymoo Registered Member

    Joined:
    Sep 25, 2007
    Posts:
    1,212
    Location:
    England
    Is this everytime? Hmmmm. A hidden drive is exactly same as a unhidden except its flag has changed in the MBR to say it's hidden. There can be issues if the last partititon of an extended logical partition is hidden and treat it not as it is otherwise it must be an issue with DS. You set the ID in the MBR with a 1 in front to be hidden. NTFS is 07 always. Is this partition an NTFS? All the files are exactly the same to backup. Its still the same file structure. I will check this.

    As a sidenote talking about extended partitions MBRWiz doesnt detect logical partitions in extended partitions as the logical partition info is not kept in the MBR but in the partition and as MBRWiz looks to the MBR to get all its info thats why it does not. This isn't really an issue for those who use MBRWiz as restoring your image to a primary partition as most users are for recovery is the main use. I don't know anybody who backups there extended partitions as there main concern is protecting the system drive. Where do you keep your image of extended partition on C? lol. Seriously though if you got lots of drives,space then sure you can backup in a safe location.
     
    Last edited: Feb 14, 2008
  11. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    Graham,

    In my example above you could try these suggestions...


    In E:\backup put WinXP.sna

    In E:\backup\bootnow put...
    all the bootnow files
    both batch files
    snapshot.exe

    In the Startup folder of SecondXP, put a shortcut to the second batch file. Make sure E: drive is the same partition in both OS.

    The first batch file (This is the one you double click) is....

    bootnow 2




    The second batch file is....


    path=E:\backup\bootnow;%path%

    E:
    CD \backup

    if not exist WinXP.sna exit

    snapshot WinXP.sna -T -Go

    snapshot WinXP.sna HD1:1 -Go


    CD bootnow

    bootnow 1






    My partition layout is different so I haven't tried these numbers but mine works.
     
  12. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    appster,

    No, BING isn't compulsory. In the "bootnow" folder, put pqboot32.exe instead of the bootnow files. In the batch files, use...

    pqboot32 /p:2 instead of bootnow 2

    and

    pqboot32 /p:1 instead of bootnow 1



    PS you can use pqboot32.exe as an easy way to switch between OS partitions. A cut down boot manager.
     
    Last edited: Feb 14, 2008
  13. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    Mark, could you image a hidden OS partition sometime and see if you get an uncompressed image? It happens only with SnapShot, not with other imaging software.
     
  14. markymoo

    markymoo Registered Member

    Joined:
    Sep 25, 2007
    Posts:
    1,212
    Location:
    England
    Brian, i backed up my C XP in windows not in dos and i hide the partititon and unhide it and i get exactly the same image size both occasions. An exact same image size give or take a few bytes due the time difference. It's as expected as the only difference is the MBR flag. So i tried again with a 400gb data partition and hide and unhide it and same result. An exact same image size. So something is amiss at your end it would seem and that i can't pinpoint on the problem to get your result. Right now i'm thinking a different cluster size of the partition. Trying running chkdsk. What size difference of the images? It might be a bug as i seen a bug with DS where it did verify even though verify was unticked but of course this is a more serious error. If you running it by command line i would suggest you scrutinize your command line or gui interface for any differences otherwise Freaky.
     
    Last edited: Feb 14, 2008
  15. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    Mark, just to make sure we are doing the same thing. I have two WinXP partitions. If I image the hidden one from the working WinXP I get an image of around 1.6 GB. If I boot into that OS and create an image, the image is 0.8 GB.
     
  16. spm

    spm Registered Member

    Joined:
    Dec 9, 2002
    Posts:
    440
    Location:
    U.K.
    I doubt this is anything to do with compression (or lack thereof), but rather DS's auto-exclusions. When you image a partition, DS will exclude such files as the active OS's page file. If you image another OS's partition, DS won't exclude any page file there, resulting in a larger image.
     
  17. markymoo

    markymoo Registered Member

    Joined:
    Sep 25, 2007
    Posts:
    1,212
    Location:
    England
    It sounds like one windows is using ntfs compressed files and one is not. Right Click a drive in the XP you have the smallest image and and select Properties. Is 'Compress drive to save disk space' ticked? It could also be they using different size page files or the hibernate file ie enabled in one also. Have you shut the windows down properly before backup? Also files in use is another but thats a serious image size difference. Check all these factors. Try the VSS option and No VSS. Just out of interest backup the windows both in dos and compare the size too. Are they both using the same file structure and cluster size? Is it the same exact XP in both partitions? Have you checked how much data each partition is using?
     
    Last edited: Feb 14, 2008
  18. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    spm,

    Good thoughts. But neither OS have a page file or hibernation file.

    Mark,

    Both OS are just standard NTFS. I did another test. I imaged my main OS (with SnapShot) from Windows. The image was 4.3 GB. I booted into my secondXP which made the main XP hidden. I imaged my main OS and the image was 5.5 GB. There is 7.6 GB of data in the main OS so the image taken when the main OS was hidden was not uncompressed but it was at a different compression level.

    In both cases, imaging a hidden OS resulted in a larger image than imaging the OS from its "own" Windows. These findings only applies to SnapShot software.

    Any other ideas?
     
  19. markymoo

    markymoo Registered Member

    Joined:
    Sep 25, 2007
    Posts:
    1,212
    Location:
    England
    it won't be because its hidden it be another factor. try using VSS what other image software use and not DS own. when you dual boot you still create files on c like boot.ini this could be a factor oh how DS sees what to backup but this is a clutch straw. try use --forcevss if you doing exactly the same procedure with other software then its obviously down to DS options and its way.
     
  20. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    VSS wouldn't work, said it wasn't supported for HD1:3 (the hidden partition).

    I booted to ReatogoXPE and both OS were seen and imaged. The image sizes were the same as when they are done as visible partitions.

    It doesn't matter if you restore the larger or the smaller image. It still works.

    Again, this issue doesn't apply to other imaging software. Only SnapShot. Strange. It's not a "problem", it just is intriguing.
     
  21. nexstar

    nexstar Registered Member

    Joined:
    Jun 23, 2004
    Posts:
    371
    Location:
    Southampton, UK
    Thanks for the extra info, Brian. I'll try this out as soon as I manage to get Bing installed. I haven't tried in earnest yet, but I'm guessing it's not liking my mbr/track 0 for some reason.

    Is it possible to create your own Bing boot CD which would work even if you uninstalled Bing? Or is it dependent on using the MBR?

    Graham
     
  22. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    To install BING you need 8 MB of unallocated space somewhere. Even the 8 MB preceding an extended partition is fine. Or 8 MB at the end of a HD. It becomes a primary partition so you must start with 3 or less primary partitions. When the BING CD boots, say you don't want more than 4 primary partitions, let setup choose the partition for you and accept all the choices. It will use that 8 MB space. If you are using a CD you will get messages about not being able to backup the EMBR. That's OK.

    BING writes code to your MBR and the next 8 or so sectors. If you want to uninstall BING later, no problems. Ask questions. BING is easy, but not in the first few months.

    You must have BING installed to use bootnow.
     
  23. Longboard

    Longboard Registered Member

    Joined:
    Oct 2, 2004
    Posts:
    3,238
    Location:
    Sydney, Australia
    Can you be more specific about what you want to do?
    FWIW everything that the installed BING can do can be done from
    Bootable CD/Floppy afaicr ....
    Just not automated for 0300: ( although by that time of day I am my own automaton usually ;) ) needs manual input.

    Iirc BING will write to the MBR and needs same to do it's job: what changes might you have made?
    There are config changes with Vista boot loader and GRUb and Lillo and others ??
    Any other MBR installs?

    I'm still learning form you guys about .batchs and .scripts as I go.
    I have to push the buttons and go for coffee....
    At least I know it really works. :)

    heh I remember the first time...sweaty..palpitations..eyes glued to screens...oooohhhh fu%k what's happening now? ...lol

    Now serene.. still..nice coffee..ciggie..papers... heh heh.
    :thumb:
     
  24. nexstar

    nexstar Registered Member

    Joined:
    Jun 23, 2004
    Posts:
    371
    Location:
    Southampton, UK
    Thanks for the info. What I'd like to do is to set up a second partition with a basic OS installation, along the lines that Brian has done here, but which I would only boot to if I'd inserted the approriate boot cd.

    The complication I suspect with using Bing is that my main partition will have a Rollback/Eaz-Fix installation which will have taken over the MBR for its own purposes.

    So, it wouldn't be a problem to install Bing without Rollback just to set everything up and make the CD but, if Bing needs to be in the MBR to work then that's going to be a problem.

    Graham
     
  25. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,179
    Location:
    NSW, Australia
    I have no idea about the MBR interaction of these apps. Initially it may be safer to use pqboot32.exe because all it does is change the active flag in the partition table. On or off.

    All you need do is double click pqboot32.exe and choose 1 or 2 as the next OS to boot. Or use the pqboot32.exe batch files.You will put pqboot32.exe in a data partition so it's seen from both OS. No CD is needed to switch OS.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.