none
Sysprep - PC hangs at "Setup is starting services"

    Question

  • When attempting to load a Sysprep'ed image via imagex, the PC seems to be working perfectly, but once the initial install process gets to "Sysprep is starting services" it hangs there.

    I've read about many people having this problem (amongst others) when using Sysprep to image a Windows7 PC.

    In most cases the reason for this is an app or apps that you installed during the audit part of the sysprep process, so theoretically if you made an identical image without that program installed, the install process wouldn't hang at "Setup is starting services". In an attempt to narrow down the list of possible causes for the error, I've tried many things, including looking at log files as mentioned here by Jeff Harrison. Sadly, none helped.

    At this point, I have gone as far as to create a barebones, nearly empty image and answer file, and I'm still getting stuck at "Setup is starting services". Here's the setup I'm using:

    • Inserted Win7 Pro install CD and started install from scratch, hitting Ctrl+Shift+F3 at the first prompt to enter the PC into Audit mode.
    • Once in Audit mode, I INSTALLED NO SOFTWARE WHATSOEVER. I only did Windows Updates, restarting when prompted to do so (the PC restarts into Audit mode until you put it into OOBE mode).
    • At this point the only software that is installed is what was installed with a default install of Windows 7. i.e. Internet Explorer, no anti-virus, etc.
    • I put the machine into OOBE mode with "sysprep /generalize /oobe /shutdown"
    • I capture the image with WinPE+imagex to a place on my network.
    • On the target PC, I load the image from the storage place using WinPE+imagex.
    • The image loads fine, the PC restarts and begins the sysprep install process (OOBE).
    • The PC hangs at "Setup is starting services".

    I'm perplexed as to why the PC is hanging at "Setup is starting services" without any software installed. I've read about this problem in many many many posts all over the internet, but I still can't figure it out.

    Any help is much appreciated.

    -- UPDATE: 7/18/2011 9am --

    Read and replied to the responses left so far, no new ideas I haven't tried. Going to try re-partitioning from scratch again. Might try making an image without SP1 or any updates on it, just core Win7 install from disk. According to this link from Stephan Schwarz, Windows Live Essentials and Windows Updates can break your reference image, however, in the same link, the author notes that SP1 fixes that problem, so who knows what will happen. Will probably report back here on the results tomorrow.

    -- UPDATE: 7/18/2011 noon --

    Tried creating a new imagex .wim image WITHOUT USING AN ANSWER FILE, just to see if my measly 11-line-long answer file was somehow the problem. No change. Even without an answer file, and a simple default install of Windows 7 with updates, the PC hangs at "Setup is starting services".

    -- UPDATE: 8/9/2011 4:30pm --

    I have since abandoned WinPE+imagex method and switched to FOG method. FOG is a free open-source ghost solution that automates most of the process, and even has an html interface. I have gotten simple imaging set up successfully to the point at which I pull out my Android phone, click on a network PC, click "Deploy" and the computer restarts into a PXE server which pushes that machine's image out to it over the network using ghost (or a free version of it I guess). Once the PC is done recieving the image, it reboots into a chkdsk to check the hard drive, reboots again into my sysprepped image, I give it the room-based PC name, it finishes the sysprep process, and its sitting at the desktop logged in as local administrator, and the PC is already on the domain. As local administrator I make any alterations or modifications I would like, then log out or reboot and its ready for use in the lab.

    Very happy with FOG right now. I'm sure it has its downfalls, but it's a great solution to Microsoft's unstable imaging methods. It's sad that in Microsoft's own Technet forums for help, my best answer was to abandon Microsoft's solution. Thanks to Ang101 for the recommendation.

    Keep the suggestions coming!



    • Edited by GeekyAdam Tuesday, August 09, 2011 8:43 PM typos galore
    Tuesday, July 12, 2011 3:50 PM

All replies

  • I had/have similar issues to what you describe, and I think one of the problems is at:

     

    " I put the machine into OOBE mode with "sysprep /generalize /oobe /shutdown /unattend:unattend.xml""

    Instead of capturing the system with imagex, you need to let it reboot and run setup once again. Fill in what regional and user settings you need to -- unattend could probably be utilized here --, and then immediately go back to audit mode.

    Also, be sure to check HKLM:\Software\Microsoft\WindowsNT\CurrentVersion\ProfileList and verify that no other keys exist aside from the builtin ones, and the one whose profile path is C:\users\administrator. You will have to delete the one created during the second windows setup.

     



    Tuesday, July 12, 2011 5:11 PM
  • I'm also stuck at the same point you are.  I found that if I remove the "/generalize" option the PC will boot normally.  Now, I'm not sure exactly what /generalize does, but it seems to screw up the subsequent setup process, that's for sure.

    dpm

     

    Tuesday, July 12, 2011 5:47 PM
  • I think you're mistaken. When you put the computer into OOBE mode using an unattended answer file, the next time it boots up it will use the answer file to setup the PC with whatever settings you chose. For this reason, you wouldn't put a PC into OOBE mode, then let it reboot, and then capture an image of it. And you wouldn't go from OOBE mode back to Audit mode, Audit mode is used to prepare for OOBE mode, not the other way around.

    Tuesday, July 12, 2011 6:09 PM
  • From Microsoft:

    "generalize

    Enables you to minimally configure the sysprep /generalize command, as well as configure other Windows settings that must persist on your reference image.

    The sysprep /generalize command removes system-specific information. For example, the unique security ID (SID) and other hardware-specific settings are removed from the image.

    The generalize pass runs only if you run the sysprep /generalize command."

    Most importantly, it resets/removes the SID, so that you can deploy the same image to multiple PCs on the same network without communication errors between machines.

    Tuesday, July 12, 2011 6:12 PM
  • Since you mention a Windows 7 (non SP1) disk as source, and only Windows Updates is by any chance Windows Live Essentials installed on the PC?

    If so, this might be your problem (and solution): http://www.stephan-schwarz.net/?p=13

     

    Kind regards,

    Stephan Schwarz.

     

     


    If one of these posts answered your question or issue, please click on "Mark as answer".
    My Blog | Twitter @Schwarz_Stephan | MCTS, MCITP, MCC.
    Wednesday, July 13, 2011 8:11 AM
  • Well, I went back to my pre-sysprep image, then ran "sysprep /audit".  Sysprep thrashed around a bit, then rebooted.  This time I ran "sysprep /oobe /generalize /unattend:<my_unattend_file.xml>".  After a reboot it failed in exactly the same way: Windows gets to the "Windows is starting services" point, then throws up a messagebox which says "Windows could not finish configuring the system.  To attempt to resume configuration, restart the computer." 

    Any time I run sysprep with the "/generalize" option the resulting image fails to boot in exactly this way.

    I thought the correct procedure is:

    1. Create the image;
    2. Run "sysprep /audit" and reboot;
    3. Make any changes (none in my case) then run "sysprep /oobe /generalize /unattend:<my_unattend_file.xml>";
    4. Boot WinPE and capture the image.

    Am I missing something?

    Thanks,

    dpm

     


      

    Wednesday, July 13, 2011 1:18 PM
  • Hi dpm1, did you check out the link I provided in the post above you?

    Are you using Windows 7 RTM to build the image or Windows 7 with SP1 images from technet/msdn/dvd's?

    Not sure what you mean with step 1. create the image? However I create my reference images the following method.

    1. Install Windows 7 (with SP1 already in the image "slipstreamed")

    2. Boot into Audit mode, by skipping the OOBE using Ctrl+Shift+F3 (or using an unattend.xml that specifies the OOBE mode)

    3. Customize the OS, apply updates, install software if applicable.

    4. Run sysprep with generalize option (optional is to supply a unattend.xml)

    5. Boot into WindowsPE, and use Imagex to capture the OS to a .wim image.

     

    Kind regards,

    Stephan Schwarz.


    If one of these posts answered your question or issue, please click on "Mark as answer".

    My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCC.
    Wednesday, July 13, 2011 2:27 PM
  • Stephan,

    I created my image using a 32-bit RTM image (install.wim).  I then installed Office 2007 and let it auto-update, including SP1.  To the best of my knowledge WLE was NOT included.  Updating required a few reboots.  Finally I installed Norton Security Suite.

    Then I executed steps 2-4 in my procedure above.

    Now, are you saying that the procedure should be:

    1. Perform a clean W7 install;
    2. Run "sysprep /audit" and reboot;
    3. Install Office/updates/NSS, but do NOT allow any reboots;
    4. Run "sysprep /oobe /generalize /reboot /unattend:<my_unattend_file.xml>";
    5. Capture image.

    Thanks,

    Dean

     

    Wednesday, July 13, 2011 3:56 PM
  • Hi GeekyAdam,

     

    I would like to verify if the issue is resolved. If not, try to format the partition with diskpart from WinPE before applying the image. For example:

     

    Select disk 0

    Clean

    Create partition primary size=100

    Select partition 1

    Active

    Format fs=ntfs quick

    Create partition primary

    Select partition 2

    Format fs=ntfs quick

    Exit

     

    Here is a similar post for reference.

    http://social.technet.microsoft.com/Forums/el-GR/w7itproinstall/thread/ea27f1fa-a7f1-40b7-931c-20f3dcca3b99

     

    Best Regards,

    Niki


    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thursday, July 14, 2011 9:24 AM
    Moderator
  • Stephan,

    I created my image using a 32-bit RTM image (install.wim).  I then installed Office 2007 and let it auto-update, including SP1.  To the best of my knowledge WLE was NOT included.  Updating required a few reboots.  Finally I installed Norton Security Suite.

    Then I executed steps 2-4 in my procedure above.

    Now, are you saying that the procedure should be:

    1. Perform a clean W7 install;
    2. Run "sysprep /audit" and reboot;
    3. Install Office/updates/NSS, but do NOT allow any reboots;
    4. Run "sysprep /oobe /generalize /reboot /unattend:<my_unattend_file.xml>";
    5. Capture image.

    Thanks,

    Dean

     


    Hi Dean,

    Please do not pre-install your antivirus software prior to capturing the system. Antivirus programs often cause problems if a system is sysprepped with the generalize option.

    If you could, please try to perform your install, install office and all updates and then run sysprep again with your unattend file. Capture the image, and apply it (although you can simply reboot the system as well if it's a VM and using snapshots, since the issue isn't with applying the image, it's that the windows config gets messed up by something).

    Kind regards,

    Stephan Schwarz.


    If one of these posts answered your question or issue, please click on "Mark as answer".

    My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCC.
    • Proposed as answer by dpm1 Monday, July 18, 2011 6:08 PM
    Thursday, July 14, 2011 12:25 PM
  • Live Essentials are not installed. I don't do any of the optional updates, just the important ones.
    Monday, July 18, 2011 12:42 PM
  • I tried cleaning the disk and re-partitioning from scratch using DiskPart a couple times, no luck.
    Might try again.
    Monday, July 18, 2011 12:43 PM
  • Please do not pre-install your antivirus software prior to capturing the system. Antivirus programs often cause problems if a system is sysprepped with the generalize option.

    Agreed. In my weeks working on this problem, one of the biggest problems is anti-virus software usually not playing nice when some services are initially started up during the OOBE.

    My image doesn't have anti-virus installed, which is why I'm perplexed at my problem.

    Monday, July 18, 2011 12:47 PM
  • After a reboot it failed in exactly the same way: Windows gets to the "Windows is starting services" point, then throws up a messagebox which says "Windows could not finish configuring the system.  To attempt to resume configuration, restart the computer."

    Just wanted to let you know, that error probably means you can fix your problem. It's most likely something you installed that has a service that OOBE doesn't like. For instance, a few weeks back I tried putting TightVNC on my image so when we need to work on a PC in a lab, we can do so from our IT desk. Long story short, I kept getting errors because of the TightVNC service.
    I've long since stopped putting TightVNC on my image, but getting an error screen is useful. My problem (as with many others), is that I get no error pop-up, it just sits and sits and sits forever. If I hard-reboot the machine (probably not a good idea while in the middle of OOBE), I then get the error you did, but I haven't been able to figure out anything new.
    Monday, July 18, 2011 12:52 PM
  • Followed your DiskPart commands exactly (PC hdd was disk 0 as well, no USB flash drives or anything), and all seemed well...but upon restart I got an error; "BOOTMGR is missing, Press Ctrl+Alt+Del to restart"

    I know that doing a quick Win7 install from CD would solve the problem because it would automatically re-partition and reformat the drive, but that seems like the wrong answer.

    It seems like I need to install a bootloader or something (I'm used to using linux and Grub, but unfamiliar with the musings of Windows' boot processes).

    Let me know if you know what I need to do.

    Monday, July 18, 2011 3:34 PM
  • Tried using a Win7 CD to do a "Startup Repair" to no avail. Also tried using Win7 CD to open Command Prompt and do "bootrec /fixboot", it said "Operation completed successfully", but still getting "BOOTMGR is missing" on reboot.


    Monday, July 18, 2011 5:20 PM
  • Yep, that was it: I built a reference image without NSS and it deployed just fine.

    Now, I think this is a problem.  I'm building a corporate image, and EVERYONE needs antivrius.  Now I have to install it separately on each deployed desktop.  A pain in the a** and prone to forgetfulness.  What good is "automated" deployment if it can't handle something fundamental like antivirus?

    Thanks for your help, Stephan.

    dpm

     

    • Proposed as answer by dpm1 Monday, July 18, 2011 6:07 PM
    • Unproposed as answer by dpm1 Monday, July 18, 2011 6:08 PM
    Monday, July 18, 2011 6:07 PM
  • A possible solution for you is to turn off the anti-virus's service(s) when in Audit mode, then add an entry to your unattend.xml that runs a batch script after the OOBE process that re-enables and starts the service.

    I looked into it for getting TightVNC to work a while back and its not that hard, considering you read up on it first. I can't say honestly that I got it working because, after realizing that TightVNC wasn't necessarily my problem, I abandoned the method and instead started focusing on getting an image to deploy without TightVNC at all.

    Monday, July 18, 2011 6:52 PM
  • I thought of that too, but NSS prevents manually disabling its service, for obvious reasons.

    The solution is to make the sysprep process less cranky, or have a way to let sysprep disable otherwise-undisableable services.  Or be smart enough to recognize and turn off services that interfere with what it has to do.

    dpm

     

    Wednesday, July 20, 2011 2:56 PM
  • I agree that Windows needs to do some work on sysprep and the whole imagex+sysprep process for Windows 7. Windows XP imaging was nearly painless, but with the changes to the way Windows 7 uses SIDs (sort of per-user now rather than per-machine like XP), they should really update the imaging tools (Windows AIK, SIM, sysprep, etc).

    However, you should be able to manually disable the NSS service(s) while in audit mode when making the source image. You're probably thinking of manually disabling the service somehow in the NSS settings, but that's not what you want to do...here's how to manually disable any Windows service for a sysprep image:

    1. Open the "Run..." popup box by pressing Win+R.
    2. Type "services.msc" and press enter.
    3. Find the service(s) you'd like to disable, double click
    4. Under "Startup type", select "Disabled"

    Just be sure to use a script of some sort that runs on first automatic login that re-enables the  service(s). I have a nice tutorial for this whole process in my bookmarks somewhere, let me know if you don't make any headway and I'll dig it up.

    Wednesday, July 20, 2011 3:12 PM
  • Nope - NSS has all tasks greyed out.  It comes up started, and there's no way I can find to stop it.  I also tried "sc stop N360" and I get "access denied".

    I assume this is done to prevent a virus from stopping the service, but there's no way I can sysprep an image with this running.

    dpm

     

     

    Thursday, July 21, 2011 6:42 PM
  • Oh, well, maybe you need local administrator rights on the PC? But that shouldn't be a problem because when you're in Audit mode, you're using the local administrator account.

    The problem could be that the local administrator account is disabled even though you're logged in as local administrator while making your image. Upon boot up of Audit mode, Sysprep logs you in as local administrator and once you get to your desktop it disables the local administrator account. This is why you can't lock the computer (Win+L) while in Audit mode because you won't be able to log back in, you have to restart. However, since you're logged in as Administrator, you should have the rights to disable any services, no matter if the account is disabled or not.

    If you want to try a workaround anyway, try going into users and enabling the Administrator account and then try to disable the services.

    Good luck.

    Monday, July 25, 2011 1:03 PM
  • I don't see any evidence that the admin account is disabled in audit mode.  I can navigate to ControlPanel>UserAccounts and see the Administrator account; it's not marked as disabled, and all normal modification items are available (change password, delete password, ...).

    dpm

     

    Monday, July 25, 2011 3:31 PM
  • Try this way:

    Start menu > Right-click on "Computer" > "Manage" > "Local Users and Groups" > "Users" > Double-click on "Administrator" > Check if "Account is disabled" is checked

    To the best of my knowledge, the Administrator account is automatically disabled when entering Sysprep's Audit mode.


    • Proposed as answer by Ang101 Monday, July 25, 2011 4:06 PM
    • Unproposed as answer by Ang101 Monday, July 25, 2011 4:06 PM
    Monday, July 25, 2011 4:01 PM
  • have you looked into using fog?

     

    its a free linux based distribution program.  Will capture and deploy images for you after sysprepping them.  I found that imagex has problems with the boot sectors in win7


    http://www.fogproject.org/
    Monday, July 25, 2011 4:08 PM
  • Well, you're right - the admin account is marked as disabled.  But after I enabled it, the control buttons on the NSS service remain unchanged.

    dpm

     

    Monday, July 25, 2011 4:28 PM
  • Thanks Ang101, will check that out. At this point, I'm surprised there's a decent piece of image deployment software out there I haven't heard of, but willing to try anything.

    Just wanted to be able to use imagex because was hoping to set up WDS on our Windows 2008 server eventually.

    Monday, July 25, 2011 5:26 PM
  • Weird. Like I said, enabling the account shouldn't matter, since you're logged into it when you're in Audit mode.

    I'd start Googling for "disabling Norton services" or something similar (seems like a Norton thing, rather than a Windows thing).

    Monday, July 25, 2011 5:27 PM
  • I think you will be surprised with how much fog can do then if you were looking into WDS
    Monday, July 25, 2011 5:52 PM
  • Been researching FOG all day...I'm curious, what does FOG use for the image cloning? i.e. what is FOG's equivalent to imagex?
    Tuesday, July 26, 2011 2:52 PM
  • it makes .img files...its similar to clonezilla if you've ever used that. i think its partclone

    Tuesday, July 26, 2011 3:23 PM
  • Really getting into Fog now...

    Gotten a couple bare images uploaded/deployed successfully just for testing. Next is tweaking for our network environment (adding printers, joining domain, etc.).

    Have you had problems with getting Fog's little status icons to work correctly Ang101? I only see the red circles that say "Host unreachable" or the red circles with exclamation marks in them that say "Unable to resolve hostname". I've read online that it can be because of DHCP/DNS communication problems. I know that Fog can also act as a DNS server, but I'm not using that option because we have our own DNS server and DHCP server. Settings look ok, still messing around, but haven't got it working yet. Have you dealt with this as well?

    Monday, August 01, 2011 5:47 PM
  • I am new on this forum, i have also same problem.

    Accidently i deleted window7 partion. and whe start to recover using recovery partition it not worked.

    then i use WinPE+imagex to mount the image on windows partition. this process complet sucessfully. when i run the window i hangs at " Setup is starting services".

    Please suggest me what i do to rum windows7.

    the procedure i applied using WinPE+imagex is

    1. inatll the WAIK3.0 on the diffrent window7 sstem and get the folder Tools from the installation.

    the tools fiolder has subfilders amd64,1a64.X86.Image mager, Servicing,etc...

    2. run my laptop using WINPE and run command prompt, go to removalbe drive which have tools foder.

    and select amd64 folder

    3.run command ' imagex.exe /apply C:\HPFactory.wim 1 E:\

    this option move the files present in the image file to laptop windows partition.

    4. operation complete sucessfilly and the i type exit from command prompt and resart the sytem,

     The window  hangs at " Setup is starting services".

     

    what i do with it, and run windows

     

     

    Thursday, December 15, 2011 5:43 AM