Menu

Clone and Restore Windows 7

tarzan
2011-09-27
2013-04-05
  • tarzan

    tarzan - 2011-09-27

    Dear users
    it have been now a week since i was trying to restore a windwos 7 image to the same or another machine but with no luck. the restored machine always faild to boot with missing boot manager. i tried save disk, save parts with no luck. i even tried to format the partition into ntfs before installing windows 7 as it does not make the small 100Mb partition in this case.
    it works only when using ghost 11.5 but my pxe server is using clonezilla and am very happy with it. i have tried almost everything with no luck.
    i know the difference between IDE, AHCI and RAID so dont tell me to change the setting in BIOS i already tried this.
    already tried deleting " HKLM\System\MountedDevices\ except Default".
    the image that i am uploading to clonezilla is a golden image with drivers to multi-machine and as i said it work when with ghost 11.5.
    Greatest regards to all

     
  • Brad Clark

    Brad Clark - 2011-09-29

    I didn't even realized i referenced your own post in my reply!

     
  • tarzan

    tarzan - 2011-09-30

    Hi
    the image is a syspreped image for multiple machines "gold image".
    now booting with windows 7 cd or winre is not option as we clone machines almost everyday.
    starting with windows statup repair does not help.
    going into system recovery and writing these commands

    bootrec.exe /fixboot
    bootrec.exe /fixmbr
    bootrec.exe /rebuildbcd

    does not help.

    i just finished cloning and restoring an image using DD and it failed to start. even if it works it will no be a solution coz it takes about 3 hours to clone and restore and am used to clone and restore an XP machine in 2 min max.

    now the only question that i have right now "Are the developers of CloneZilla working on solution to the problem?" i have been using CZ for the passed 2 years and i haven't seen a better solution.

     
  • Brad Clark

    Brad Clark - 2011-09-30

    There is definitely something strange going on. I would say about 90% of the machines I image here are Windows 7 x64 that are then sysprep'ed. I don't use a single image for multiple hardware classes though, so maybe it's something with the sysprep itself? What happens when you try to clone the image before doing the sysprep /generalize step? Or clone a machine that has already completed sysprep? This way we can try to rule out whether or not the issue is with clonezilla itself or with something in the sysprep process.

    -Brad

     
  • Brad Clark

    Brad Clark - 2011-09-30

    Nevermind, I see you have it working using ghost. Tell me if removing the old bcd then rebuilding it from scratch works. Here are the commands (again from WinRE, Win 7 installation disc, or something else with these tools on it).

    Boot from the cd using the same steps as above and get to the command prompt. Assuming C: is the Windows boot partition, which may be different when booted into WinRE or the install disc then when you boot  straight to Windows.

    From: http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+from+the+DVD

    Fix the MBR and Boot Sector to point to the Windows bootloader:

    bootrec.exe /fixmbr
    bootrec.exe /fixboot
    bootsect.exe /nt60 all /force
    

    Backup and Delete the old BCD and rebuild it:

    bcdedit /export C:\BCD_Backup
    attrib -h -s C:\boot\BCD
    ren C:\boot\bcd bcd.old
    bcdedit.exe /createstore C:\boot\bcd.temp
    bcdedit.exe /store C:\boot\bcd.temp /create {bootmgr} /d "Windows Boot Manager"
    bcdedit.exe /import C:\boot\bcd.temp
    bcdedit.exe /set {bootmgr} device partition=C:
    bcdedit.exe /timeout 10
    attrib -h -s C:\boot\bcd.temp
    del C:\boot\bcd.temp
    bcdedit.exe /create /d "Windows 7" /application osloader
    

    After the last command you will get a message saying "The entry {GUID} was successfully created."

    Using that GUID, perform the following:

    bcdedit.exe /set {GUID} device partition=C:
    bcdedit.exe /set {GUID} osdevice partition=C:
    bcdedit.exe /set {GUID} path \Windows\System32\winload.exe
    bcdedit.exe /set {GUID} systemroot \Windows
    bcdedit.exe /displayorder {GUID}
    bcdedit.exe /default {GUID}
    

    Then reboot and see if your system will come up.

    They also have another tool that is easier to use than the command line for this that you can run from the recovery environment as well to rebuild the BCD: http://neosmart.net/wiki/display/EBCD/Recovering+the+Vista+Bootloader+with+EasyBCD

    According to this post below, you should be able to generalize the boot manager and memory tester before you sysprep the machine, which should prevent these kind of errors.

    bcdedit /set {bootmgr} device boot
    bcdedit /set {memdiag} device boot

    Source: http://social.technet.microsoft.com/Forums/en/w7itproinstall/thread/dfcd1e6e-b3c1-463c-9487-fab544a8234a

    Boot issues on Windows 7 and Vista can be a pain, hopefully something in here will be your solution!

    -Brad

     
  • tarzan

    tarzan - 2011-09-30

    well i will get back to you on monday. i think generilizing the boot manager will solve the problem but i have to test it.
    i started new installation today by installing windows 7 on one partition without the 100MByte but didnt have time to clone and restore. i will try to generalize and see.
    with may current image i run two phases, the first one is the sysprep with audit so to install all necessary drivers and then the second phase is the generalize. any way you will hear from me soon.
    thanx in advance

     
  • Brad Clark

    Brad Clark - 2011-09-30

    On our image I keep the 100MB system partition and haven't had any issues yet. Let me know how things turn out.

     
  • tarzan

    tarzan - 2011-10-03

    Hi
    Well am back behind my desktop now. i tested the old problematic image with these commands

    bcdedit /set {bootmgr} device boot
    bcdedit /set {memdiag} device boot

    with no luck. i got back to my new image with one partition "no boot partition" and tried cloning and restoring it to different machine with and without generalizing the boot partition and again no luck.

    it seems it does not work to clone from a machine to another using clonezilla and windwos 7. it works only when cloning from och to the same machine which means i have to have an image to every workstation and laptop.

     
  • Brad Clark

    Brad Clark - 2011-10-05

    I'm curious as to your exact steps you're taking, since my process is very similar and i'm not having issues.

    My Process:
    1. Build and configure machine image in Windows 7 sysprep audit mode.
    2. After software installation and customization, take image of machine BEFORE sysprep'ing (so I can update image without having to start from scratch).
    3. run sysprep /generalize /oobe /shutdown /unattend:%WINDIR%\System32\sysprep\unattend.xml
    4. Take image of machine with clonezilla.
    5. Deploy image to any number of machines, boot them up, change the pc name, join domain, give to user.

    I'm doing this on the same hardware, so I have an image for each hardware type I have (i.e. one for Dell latitude 6520's, one for Lenovo w510's) and have sysprep set to keep the existing drivers. I have never needed to generalize the boot manager and have not had any issues yet. I know you said you are using a "gold" image, but the process should still work the same. Perhaps something in your sysprep file is causing it?

    -Brad

     
  • tarzan

    tarzan - 2011-10-05

    these steps are the exact 100% am using.  it works on the same machine but not on another. i dont have that much in the unattended.xml file as i want the process to work before stating making the changes. i have only put the KMS key and keyboard layout. and one more thing is that we are using HP's.

     
  • tarzan

    tarzan - 2011-10-05

    Hi brad
    Well first of all thanx alot for your help. i got it solved now. i did this "still dont know where the problem was"

    1- installed windows 7 on a new machine "workstation with 80Gig harddisk". it was a normal installation with 2 partitions, one for the boot and the other for the systme
    2- i installed all my software and updates and drivers.
    3- created a folder named it drivers on C: and i put all my drivers "different machines" in it
    4- ran the command for sysprep with audit.
    5- it fired up so i ran the command for sysprep with oobe the one you wrote in step 3

    ofcourse i took an image after each step so i can get back in case the problem appears again.
    after step 5 i took an image and restored it on 2 machines and it worked.

    greatest thanx and regards

     
  • Brad Clark

    Brad Clark - 2011-10-05

    Congrats! I know how frustrating it can be when something isn't working and you can't figure out why. A few weeks ago new machines i was sysprep'ing were hanging after inputting the PC name. Turns out I had uncommented a line in my SetupComplete.cmd that was calling a vb script that I was not currently using (and didn't exist on the machine). Anyway, glad to hear you solved the issue.

    -Brad

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.