none
Deploying a sysprepped image along with the 100Mb System Reserved partition

    Question

  • Hi,

    I have just started at looking at deploying a sysprepped Windows 7 RC image to a few test workstations in preparation for when we recieve the released version of Windows 7.
    I have a sysprepped image and use WinPE 3.0 to capture and deploy the image without a problem, and everything works fine.

    The one issue I have is that my organisation will be using Enterprise and will be using bitlocker so we will want the 100Mb partition as well as the OS partition deploying.
    I can capture the 'system reserved' partition and deploy it, but when the workstation restarts it has 0xc000000e error.
    When we had this with Vista it was because we were restoring an unsysprepped image to a workstation that had had the diskpart clean command run on it because the clean command erases the partition table ID.
    If an image has not been-sysprepped it still looks for the original partition table ID (which diskpart removed) hence the stop error at boot.

    Vista sysprepped images don't have this problem as the "/generalize" switch resets this dependency on the partition table entries and mini-setup runs at 1st boot to fix it.

    But, with Windows 7 the 'system reserved' partition isn't included as part of the sysprep, so presumably the /generalize switch isn't resetting this.

    I have found a solution that works, which is to run the following commands from within WinPE once the WIM files have been applied:

    bcdedit /set {default} device partition=C:
    bcdedit /set {default} osdevice partition=C:
    bcdedit /set {bootmgr} device partition=C:

    but was wondering if anyone else has seen this problem or knows of a nicer solution or the correct way to deliver or create the 'system reserved' partition on workstations. 

    Wednesday, June 24, 2009 3:30 PM

Answers

  • here's how i did it:

    installing windows 7 along with 100mb partition - sysprep and shutdown
    capturing only the c: drive (installation) into a .wim file.

    deploying onto a clean disk as following:

    creating a 100mb partition as c: (ntfs, active, label="system reserved")
    creating a second partition and assigning letter d: (ntfs, label="windows").
    applying the captured .wim onto drive d:
    using "bcdboot.exe d:\windows" so the bios can find the installation.
    windows boots up and once i'm on the desktop the partition with windows is now c: and the former 100mb c: drive is my system reserved partition with no drive letter.

    • Marked as answer by Simonpa Tuesday, October 06, 2009 2:16 PM
    Tuesday, September 29, 2009 12:16 PM

All replies

  • Hi,

    I have the same problem with our windows 7 sysprepped image, did you find any solution to create the system reserved partition on the workstations ?

    Thanks
    Wednesday, July 08, 2009 1:10 PM
  • Hi Simonpa,


    I have tried your soultion running the following command on Windows 7 (non-sysprep) when the WIM files have been applied.

    bcdedit /set {default} device partition=C:
    bcdedit /set {default} osdevice partition=C:
    bcdedit /set {bootmgr} device partition=C:

    It didn't work since {bootmgr} is pointing to \device\harddiskvoulme1 instead of C:
    I tried this on Vista it worked since it didn't have the 100MB hidden partition
    Have you find a fix yet? And could you confirm if the above fix work on Windows 7 non-sysprep WIM. Thanks
    Wednesday, July 08, 2009 4:24 PM
  • Sorry, been busy on other projects since posting this and have decided to wait until get the RTM version as no point trying to fix something in RC that might be solved in RTM.
    I hope it is anyway, because we really will be wanting to distribute sysprepped images with the system reserved partition so that we can easily use bitlocker on our laptops and tablets, and quite possible some workstations as well.
    As soon as I get a solution for this I'll let you know.
    Thursday, August 06, 2009 8:13 AM
  • Hi Simonpa,

                     As now RTM is released for Win 7, did you get time to test your solution. We are also facing same problem. Need to find a way.

    Thanks,
    Kunal.
    Friday, August 21, 2009 10:30 AM
  • Yes PLEASE! How can this be done? (As in "STEP BY STEP directions, please!) I think VHD files are able to hold multiple partitions, but WIM files can't (?). WDS can depoly the OS through VHD files, can't it? 

    It seemed at Tech Ed that there was a move towards using VHD files for deployment, and moving away from WIM files. If I remember correctly, WDS can convert WIM to VHD...

    SCCM 2007 SP2 can create the partitions during the deployment process, but how can this be done without SCCM 2007?

    This link may give some thoughts, but seems messy with having to assign a drive letter to the System Reserved partition , then remove the drive letter and hide it after deployment (?)...

    http://technet.microsoft.com/en-us/library/dd744320(WS.10).aspx

    Then this link on applying the image

    http://technet.microsoft.com/en-us/library/dd744531(WS.10).aspx

    Still not what I'm looking for, though...

    WDS
    DISM
    WAIK
    SCCM
    MDT...


    WTF? How about one simple, comprehensive, easy and accurate way of deploying an OS?

    Friday, September 11, 2009 10:45 AM
  • I still haven’t managed to get a sysprepped image with a 100Mb boot partition included within the image, but we can now distribute a sysprepped image of Windows 7 Enterprise that is enabled for Bitlocker. It’s not nice, and I still want to do it the correct way if possible so I will keep investigating this.

    The solution we have is during the initial install of Windows 7, have only one partition on the disk and install the OS into this one partition. This can be done during the set-up by deleting the second partition that is automatically created and then extending the System Reserved partition to fill the whole disk. This will add the required boot files and OS into one partition that when sysprepped will work on any workstation correctly.

    When distributing the image to another workstation, what we do is use a diskpart script to create two partitions, one 300Mb unpartitioned space partition at the start of the disk, then a second partition for the OS that fills the remainder of the disk (or create a 3rd partition for D: if required).

    We restore our image to the second partition, then when completed we delete the 1st 300Mb partition, leaving it as unpartitioned space.

    We do this because as part of our master image we add a file called setupcomplete.cmd to c:\windows\setup\scripts, with the last line being:

    cmd /q /c "bdehdcfg.exe -target unallocated -quiet –restart"

    This file runs right at the end of the sysprep mini-setup routine.

    Once the script has completed the machine will reboot (there might be a warning message just before the reboot starting that the workstation could not start the logon process, if so ignore). Once it has restarted the workstation will be setup correctly and configured to use Bitlocker if required. If Bitlocker is not required then this command does not need to be run, the image will work fine with the unpartitioned space at the start of the disk, and the command can be run manually later.

    The Diskpart commands we use to setup the disk are:

    (WARNING: these commands will completely wipe and repartition disk 0. Only use on a test machine then amend as appropriate for your environment)

    SELECT DISK 0

    CLEAN

    CREATE PARTITION PRIMARY SIZE=300

    ASSIGN LETTER="S"

    CREATE PARTITION PRIMARY

    FORMAT QUICK FS=NTFS LABEL="Windows"

    ACTIVE

    ASSIGN LETTER="C"

     

    We the image the machine using imagex /apply and once imaged, before being restarted we run diskpart again to delete the 300Mb partition with the commands:

    SELECT DISK 0
    SELECT VOLUME=S
    DELETE VOLUME

    Sorry that I haven't managed to produce a neater solution yet. 

    Thursday, September 24, 2009 2:47 PM
  • here's how i did it:

    installing windows 7 along with 100mb partition - sysprep and shutdown
    capturing only the c: drive (installation) into a .wim file.

    deploying onto a clean disk as following:

    creating a 100mb partition as c: (ntfs, active, label="system reserved")
    creating a second partition and assigning letter d: (ntfs, label="windows").
    applying the captured .wim onto drive d:
    using "bcdboot.exe d:\windows" so the bios can find the installation.
    windows boots up and once i'm on the desktop the partition with windows is now c: and the former 100mb c: drive is my system reserved partition with no drive letter.

    • Marked as answer by Simonpa Tuesday, October 06, 2009 2:16 PM
    Tuesday, September 29, 2009 12:16 PM
  • I've gotten a step closer.. here's what I do now:

    Create the image through manual installation steps.
          Install Windows 7 Enterprise - Ultimate
          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.
         
    This will give you the base image.

    IMPORTANT! Create an image of this configuration, NOT sysprepped! You only get 3 sysprep actions on an image. Reload this one and modify it, then save the unsysprepped modification, then sysprep and capture the image for the deployment.

    Sysprep, OOBE, generalize

    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:

    After you boot and run through the setup, the "c" drive that IMageX sees that the System Reserved partition was applied to is hidden, and the "d" drive is now the "c" drive where Windows 7 is installed to.

    I'm starting to work with WDS to try a lite touch version of this that will use an answer file on the setup, and will post my results.

    Robert

    Tuesday, September 29, 2009 12:24 PM
  • here's how i did it:

    installing windows 7 along with 100mb partition - sysprep and shutdown
    capturing only the c: drive (installation) into a .wim file.

    deploying onto a clean disk as following:

    creating a 100mb partition as c: (ntfs, active, label="system reserved")
    creating a second partition and assigning letter d: (ntfs, label="windows").
    applying the captured .wim onto drive d:
    using "bcdboot.exe d:\windows" so the bios can find the installation.
    windows boots up and once i'm on the desktop the partition with windows is now c: and the former 100mb c: drive is my system reserved partition with no drive letter.


    Thanks, that's worked for us. I didn't know about the bcdboot.exe utility,  and it actually works if you have the OS installed in one partition or use the default installation which creates two partitions.

    Thanks again. We now have a sysprepped image that can be deployed quite easily.
    • Proposed as answer by Chris Sz Tuesday, October 27, 2009 5:40 AM
    Tuesday, October 06, 2009 2:16 PM
  • Both FinlandRobert and Simonpa are onto the solution. I had a similar issue/situation where we had the requirement to image our Windows 7 Enterprise/Ultimate clients using imageX/gimageX to either our network or a locally attached USB drive for quick imaging and we ran into issues.

    So here is what we did in order to resolve the imaging issues. By the way, I should mention that even after we successfully applied the .WIM image file, the standard error messages popped up such as "the bootmgr is missing press ctrl + alt + del to restart". This even after the disk was cleaned, partitioned, formatted, etc.

    In any rate, the steps outlined on http://technet.microsoft.com/en-us/library/dd744364(WS.10).aspx for BIOS based disk partitioning apply.
    Here are the recommened steps to apply your image successfully:

    Run DISKPART

    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

     

    ASSIGN LETTER=D
    Run ImageX /apply f:\t60p.wim 1 D:

     

     

    Restarted to WinPE generic boot disk and ran: 

    Cmd

    Bcdboot.exe d:\windows

    Rebooted

    Partitions showed up as C: and we were able to log in.

    Tuesday, October 27, 2009 5:52 AM
  • Chris Sz - using the instructions above, if you try to turn on BitLocker, does it work for you?  Just curious.  I can apply images just fine so imaging isn't the problem.  It's actually getting BitLocker to work once the image has been applied.  I'm using all the same steps listed above but I must be missing something.  I guess this is why I'm trying to find out if BitLocker is actually working for other folks or not.  The only way I can get BitLocker to turn on after applying the image is to boot into WinRE, go to a command prompt and then run bootrec /fixmbr and bootrec /rebuildbcd and then things will work.

    For the moderators:  I know my question involves BitLocker but please don't move because this is related to deployment because something is happening during imaging that is changing things.
    Monday, November 02, 2009 8:01 PM
  • Kubasa,
    Bitlocker is working for me using the steps that I outlined above.

    Robert
    Tuesday, November 03, 2009 5:48 AM
  • Thanks Robert.  I really appreciate you trying this out.  I opened a call with Microsoft.  I'm now wondering now if there is something with my unattended.xml file and something isn't getting applied properly during setup but I guess I will work it out with them.  Thanks again.
    Tuesday, November 03, 2009 2:43 PM
  • I finally got this figured out so I thought I'd better share this because I guarentee someone else will have the same problem down the road so here's the keywords for searches later on:

    the error when starting BitLocker - "a required TPM measurement is missing"

    Anyway, I had the basic steps figured out but the information above started me down the road that really helped me figure out what was wrong.  Here’s what I did – I upgraded my bootsect tool within WinPE from version 6.0.6 (Vista RTM) to version 6.1.76 (Windows 7 RTM) so I could use the /MBR flag and it appears that this did the trick.   In reality if I had been using WinPE 3 instead of WinPE 2.1, this probably wouldn’t have happened.  

    As I mentioned, I use the same basic disk prep steps that are in this thread but I have added the following:  bootsect /nt60 SYS /mbr   I run this right before applying the image.  I guess the key was using version 6.1.76 and using the /mbr flag.  Who would have thunk.......

    Thanks for putting me on the right track and I hope this information helps someone else who has the same error that I did!

    • Proposed as answer by Barkolounger2 Sunday, March 18, 2012 10:08 PM
    Tuesday, November 03, 2009 8:57 PM
  • DISKPART

    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

    ASSIGN LETTER=D
    exit

    ImageX /apply f:\install.wim 1 D:

    Bcdboot.exe d:\windows


    The image applies successfully and the computer starts, successfully too.
    I had several re-runs at this with bootmgr.exe is missing upon reboot. the above is the first combination that works for me.

    Thanks for sharing the wisdom! clau


    ps: I have not tried bitLocker though.
    Monday, November 16, 2009 1:07 AM
  • Make sure you have the 100MB partition set as Active or else you will get an error about failed to copy boot files when using bcdboot.exe.
    Tuesday, April 17, 2012 8:57 PM