none
How to use imagex for Windows 7 Enterprise with system reserved partition

    Question

  • I understand WIM files only see 1 partition. Using ImageX to capture both partitions created by the install routine for Windows 7 Enterprise, I am able to configure the hard drive manually,  (could probably script if I knew how), then apply the system reserved WIM file, then the OS WIM file and all appears to be well. However, I don't want to go through those steps! Can I capture this configuration in a VHD file and use WDS to deploy it faster - more easily? I want to take a machine already in use, and through the deployment process, wipe the drive and end up with Windows 7 Enterprise with the hidden system reserved partition in the same condition as a DVD installation (with all the apps and other goodies already there from my sysprepped image, of course :) ).

    I've seem some ideas outlined but no step by step instructions on using ImageX with the SYstem Reserved partition. I'm new (as in never used it) to WDS, and have only scratched the surface of the Deployment Toolkit. Does anyone have these steps or any links that would spell it out and not a general idea?

    Tuesday, September 15, 2009 11:38 AM

Answers

  • I figured out one way to do it, although I'm now shifting gears to try to perform the "lite touch" deployment through WDS or MDT 2010, then the zero touch through SCCM 2007 R2. Here is the "sorta lite touch" that I've come up with:

    Create the image through manual installation steps.
          Install Windows 7 Enterprise
          Install any drivers needed
          Install any applications needed
          Configure any settings in the applications as needed
    Note: If you're going to use Virtual XP mode, this may not be the time to configure it because it is only RC! But remember to set the BIOS Virtualization to on in preparation for it.
          Sysprep, OOBE, generalize
    This will give you the base image.

    Boot to ImageX
    The installation of Windows 7 Enterprise will create the hidden System Reserved partition and the Boot partition. ImageX sees them as the C (System Reserved) and D (Boot).
    If you want to make sure these are the letters assigned, you can check by entering this:

    diskpart
    select disk 0
    list volume

    Map a network drive where you want the WIM files to be stored. (Y drive in this example)
    Run Imagex /capture c: y:\HP2710pBase1SR.wim "This is the first generation System Reserved partition image for HP2710p models"
    This should only take a few seconds.
    Run Imagex /capture d: y:\HP2710pBase1.wim "This is the first generation Base image for HP2710p models"
    This will take longer. To test, I used just the Windows 7 image without any apps or updates, it took about 3GB of space and less than 15 minutes to capture to my network drive.

    To deploy:
    Boot to ImageX
    Map the network drive where your images are located
    Copy the following text to a "diskpartscript.txt" file, and save on a USB drive or network share
    Run this script by typing "diskpart /s y:\diskpartscript.txt where y is the mapped network drive - or replace with the drive letter of the USB drive - (or if entered manually add "diskpart" before "select disk 0")

    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

    Your drive is now prepped for the application of the WIM files.
    Again, you can double check the volume letters created and alter the ImageX command to reflect the drive letters assigned

    Run ImageX /apply y:\HP2710pBase1SR.wim 1 c:
    Run ImageX /apply y:\HP2710pBase1.wim 1 d:

    This is working for me, although a little more manual than I want. Hope you find it useful!
    • Proposed as answer by Noel Fairclough Thursday, October 01, 2009 4:58 AM
    • Marked as answer by Vivian Xing Monday, October 05, 2009 6:31 AM
    Friday, September 25, 2009 5:14 AM

All replies

  • I'd like to see something also.  There's plenty out there on imaging with just 1 partition but not both the D and the C System Reserve partition.  I'm working on this right now so if I come up with anything, I'll post it here.
    Friday, September 25, 2009 2:44 AM
  • I figured out one way to do it, although I'm now shifting gears to try to perform the "lite touch" deployment through WDS or MDT 2010, then the zero touch through SCCM 2007 R2. Here is the "sorta lite touch" that I've come up with:

    Create the image through manual installation steps.
          Install Windows 7 Enterprise
          Install any drivers needed
          Install any applications needed
          Configure any settings in the applications as needed
    Note: If you're going to use Virtual XP mode, this may not be the time to configure it because it is only RC! But remember to set the BIOS Virtualization to on in preparation for it.
          Sysprep, OOBE, generalize
    This will give you the base image.

    Boot to ImageX
    The installation of Windows 7 Enterprise will create the hidden System Reserved partition and the Boot partition. ImageX sees them as the C (System Reserved) and D (Boot).
    If you want to make sure these are the letters assigned, you can check by entering this:

    diskpart
    select disk 0
    list volume

    Map a network drive where you want the WIM files to be stored. (Y drive in this example)
    Run Imagex /capture c: y:\HP2710pBase1SR.wim "This is the first generation System Reserved partition image for HP2710p models"
    This should only take a few seconds.
    Run Imagex /capture d: y:\HP2710pBase1.wim "This is the first generation Base image for HP2710p models"
    This will take longer. To test, I used just the Windows 7 image without any apps or updates, it took about 3GB of space and less than 15 minutes to capture to my network drive.

    To deploy:
    Boot to ImageX
    Map the network drive where your images are located
    Copy the following text to a "diskpartscript.txt" file, and save on a USB drive or network share
    Run this script by typing "diskpart /s y:\diskpartscript.txt where y is the mapped network drive - or replace with the drive letter of the USB drive - (or if entered manually add "diskpart" before "select disk 0")

    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

    Your drive is now prepped for the application of the WIM files.
    Again, you can double check the volume letters created and alter the ImageX command to reflect the drive letters assigned

    Run ImageX /apply y:\HP2710pBase1SR.wim 1 c:
    Run ImageX /apply y:\HP2710pBase1.wim 1 d:

    This is working for me, although a little more manual than I want. Hope you find it useful!
    • Proposed as answer by Noel Fairclough Thursday, October 01, 2009 4:58 AM
    • Marked as answer by Vivian Xing Monday, October 05, 2009 6:31 AM
    Friday, September 25, 2009 5:14 AM
  • Wow, thank you for providing your notes.  I see where I'm going wrong.  I'm not prepping the drive right.  Here's the deal.  We use Altiris and then I provide the ImageX capture and deploy scripts and Altiris is supposed to be doing the drive prep.  What I just realized is that the drive prep is for only 1 partition.  I should have realized this a long time ago.  Now, I'm going to create entirely new script jobs including your diskpart script and keep Altiris's automated scripts out of the picture. 

    I've been doing imaging for about 10 years now but always using canned automated tools.  I'm really trying hard to learn the ins and outs of imagex and more of Microsoft's tools since there's always the chance that our funding that pays for Altiris could get pulled.  Again, thank you for this information. 

    JR
    Friday, September 25, 2009 1:17 PM
  • I'm happy the info helps! For a free deployment tool, check out Windows Deployment Services (WDS). The best thing about it is that you already have it! It's part of Server 2003 and a Server Role in Server 2008. I'm starting to test it next week for my deployment needs, and will post what I find. I'm pretty sure that it will deploy .VHD files as well as .WIM files! Here is the getting started guide link: http://technet.microsoft.com/en-us/library/cc771670(WS.10).aspx

    Maybe you can score some points with management by reducing the IT budget and replace Altiris before funding gets pulled. Or shift that cost to a new server or other hardware that will be more beneficial to you! I can always use another server :)

    Robert
    Friday, September 25, 2009 2:08 PM
  • I just realized I missed a HUGE step... capture an image of each configuration without running sysprep! You only get 3 syspreps per image! If you want to update the image, you'll lose the ability to sysprep the changed images very fast and have to create a new one from scratch, like I'm doing right now. :(
    Tuesday, September 29, 2009 10:07 AM
  • Yup.  I usually just create a base or golden image to work off of and then run sysprep before I upload the image for deployment.  I'm still getting a few kinks worked out so I can incorporate this with our existing Altiris setup.  I've got everything working fine from my USB flash drive that has WinPE on it.  However, Altiris for whatever reason plays around with WinPE so that drive letters are different than what they should be with normal WinPE and there are a few other quirks.   Also, our Dells have a pile of drives assigned by WinPE for the card readers so I had to change the the diskprep file to remove all this stuff and work from a fresh slate but other than that things are working.  Here's my new diskprep answer file (based on yours):

    select volume 0
    remove
    Select volume 1
    remove
    select volume 2
    remove
    select volume 3
    remove
    select volume 4
    remove
    select volume 5
    remove
    select volume 6
    remove
    select volume 7
    remove
    select volume 8
    remove
    Select disk 0
    Clean
    Create partition primary size=100
    assign letter=c
    Select partition 1
    Active
    Format fs=ntfs quick
    Create partition primary
    assign letter=d
    Select partition 2
    Format fs=ntfs quick
    Exit

    Tuesday, September 29, 2009 3:54 PM
  • Thanks FindlandRobert - this exact procedure worked for me.  The only addition I had to do was to insert an "assign" after the format fs=ntfs quick - this way my parititions got a volume letter, and imageX then had a drive to apply the image to.
    http://www.dreamension.net
    Thursday, October 01, 2009 4:59 AM
  • If you edit the registry so that

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm=1

    before running sysprep, you can keep sysprepping. Just set it each time to 1.

    Leave it set to "0" in the unattend.xml file, as this may cause SID problems.

    I also use Ghost to capture the entire disk.

     

     

    Tuesday, April 13, 2010 4:27 PM
  • I tried everything you guys suggested and things seem to be working ok... well, for the most part.  I made a WIM of both my reserved and system partitions and then I ran diskpart with the following options:

    select disk 0
    clean
    create partition primary size=100
    assign letter=c
    select partition 1
    active
    format fs=ntfs quick
    create partition primary
    assign letter=d
    select partition 2
    format fs=ntfs quick
    exit

    I then reapplied the reserved and system partitions but I ran into a snag upon rebooting - I get the following error:

    Windows failed to start. A recent hardware or software change might be the cause, to fix the problem:

    1. Insert your windows installation disc and restart... blah blah blah...

    Status: 0xc000000e

    Info: the boot selection failed because a required device is inaccessible

     

    Upon which I hit enter to continue and the computer reboots back to that same error screen.

     

    So, then I boot off of the Windows 7 CD and run repair and it says the following under the error details:

    The following start option will be repaired:
    Name: Windows Boot Manager
    Identifier: {some long string}

    The following start options will be delted:
    Name: Windows 7
    Identifier: {some different long string}

    The following start options will be added:
    Name: Windows 7 Enterprise (recovered)
    Path: Windows
    Windows Device: Partition=D: (76191 MB)

    Name Windows Recovery Environment (recovered)
    Path: Recovery\[some long string]\Winre.wim
    Windows Device: Partition=D: (76191 MB)

    A copy of the current boot configuration data will be saved as: C:\Boot\BCD.Backup.0001

     

    I hit Repair and restart and everything is good.

     

    After the repair, I wanted to figure out if it was the reserved partition or the system partition that was the problem so I restored the reserved partition again and it broke things.  So that would mean that the problem has to do with the imaging of the boot partition.  Any thoughts?

     

    Thanks!

    Mike

    Thursday, June 09, 2011 9:44 PM
  • Hey Mike - you may need to set the boot parition by using the bcdedit commands.:

    bcdedit /set {default} device partition=d:

    bcdedit /set {default} osdevice partition=d:

    bcdedit /set {bootmgr} device partition=d:

     

    So you've used imagex (or whatever) to lay out the WIM's on the partitions, and now you need to say where to boot from. Use the above commands I posted - and see how that goes.  You will need to run all 3 commands.


    http://www.dreamension.net

    Friday, June 10, 2011 1:44 AM
  • So, an update, I ran the following:

    bcdboot D:\Windows



    And that got it booting again - actually, I didn't even have to apply the System Reserved image with imagex at all - just the main system image and left the System Reserved partition formatted and that was it. The only problem now is that the "Repair Your Computer" option is gone

     

    So what does BCDedit do that bcdboot doesn't?  All these different tools are making my head spin! ;)

     

    thanks!

    Mike

    Friday, June 10, 2011 1:56 AM
  • Ahh - I think they're fairly much the same.  BCDBoot is a repair tool.  BCDEdit is for actually editing.  Different ways, same destination.  Glad to hear you got it working though. :)
    http://www.dreamension.net
    Friday, June 10, 2011 1:59 AM
  • Yeah, kinda, except now I lost the option to load the repair environment.  Any idea how to bring that back?  Does it live on the reserved partition, or does it live on the main system partition?

     

    thanks,

    Mike

    Friday, June 10, 2011 2:16 AM
  • Hey Robert,

    the above information was very much helpfull...

     

    I am not mapping any network drives and i am usnig DVD, dvd drive is not mounting please help...

    Tuesday, October 11, 2011 4:14 AM