Thursday, December 31, 2009

Sysprep - Windows 7 and the 100 MB hidden partition

This article is in response to Brian Jackson's blog posting: Sysprep a Windows 7 Machine – Start to Finish

If you allow the Windows 7 setup CD to create your primary partition, it will actually create two partitions, a hidden 100mb system reserved partition used for bootmgr and bitlocker, and the remaining space in a second partition.

Brian Jackson's Diskpart script does not take into account the hidden 100mb partition and if it's not restored, the machine will not boot, showing a cannot find bootmgr error. BCDEdit /set <...> always produces the following error message:
The boot configuration data store could not be opened.
The system cannot find the file specified.

Thus, the following is how to properly image/recreate BOTH partitions.

When you load up WINPE, drive C: is assigned to the 100mb system reserved partition while drive D: is assigned to the windows partition. In order to correctly capture an image of your machine, you need to use Imagex (or GImagex) to make a WIM of BOTH the C drive and the D drive. On the machine you wish to deploy this image, with the WINPE disc loaded, you need to recreate both partitions by entering the following in the WINPE command prompt:
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
Exit

*It's very possible that disk 0 is not the correct drive. You should therefore type "list disk" prior to the "select disk" step and change the 0 to the number corresponding to your physical hard drive. Occasionally, Disk 0 referenced my USB flash drive while Disk 1 was my physical hard drive.

Reboot the machine and reload the WINPE disc so that both partitions are reassigned the correct C and D drive letters. Load up GImagex deploy the system reserved image back to the C drive and the windows image back to the D drive.

You can avoid this process altogether by using a 3rd party program (such as Brian Jackson's DISKPART script on the WINPE cd) to partition the drive before installing windows 7 on the machine you're imaging. The hidden 100mb partition will not be created and you will not have to image two partitions. Another workaround is to use Acronis True Image or Norton Ghost loaded from a boot disk. Those programs can make an image of your entire sysprepped drive and all of it's partitions like Imagex does, but they are much easier to use and far more user friendly. If you have no intentions of using bitlocker, I strongly suggest doing the above so that the 100mb hidden partition is not created, as it appears there may be other issues with sysprep when you have any additional partitions on the drive. (see
"Windows could not finish configuring the system. To attempt to resume configuration restart computer")


More INFO:

http://social.technet.microsoft.com/Forums/en/w7itproinstall/thread/926fd054-5bb5-4b79-a361-8e906f0f1d7a

“Windows could not finish configuring the system. To attempt to resume configuration restart computer”
http://ict.myjewe.nl/ict/?m=200909

8 comments:

  1. Great tutorial on profile copy, I definitely will give that a try, finally someone figured out a way (the correct way)!!! Thank you! However, on the 100MB partition I do go over that in another article on my blog. I simply restore the BOOTMGR afterwards.

    If you run the following commands below you won't have to worry about the 100MB partition not getting created and your machine will boot just fine without 100MB partition. I have all that in my script.

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

    ReplyDelete
  2. HI there...
    i recently found out the with a windows partition freshly applied you could create a set of boot files on your active partiton usind the "bcdboot" command and source your applyed windows destition your active partition.
    "bcdboot C:\Windows"

    Cheers David

    ReplyDelete
  3. So in theory, I should be able to create one large partition (the old fashioned way) by using DOS FDISK. Then when I install Windows 7, it shouldn't create that 100MB hidden partition. And then I shouldn't have to worry about restoring it. Correct?

    ReplyDelete
  4. Correct. If you install windows to an already partitioned hard drive, it won't create an additional partition. On the Windows 7 setup CD, you can go into advanced options and partition your hard drive manually. I know for sure that if you allow Windows to proceed on an unpartitioned drive, it will create the hidden partition, but I am not sure if you create the partition manually via the Windows 7 CD advanced drive options menu, if it will then create the hidden partition. I have feeling it won't and you won't have to mess with any DOS partitioning utilities, but someone will have to verify this.

    ReplyDelete
  5. Hi,
    can I run the script from answer file ? To which section I have to give it ?

    ReplyDelete
  6. Fantastic blog only call any time and get free from your problem. Go through this link and free from your problem.
    BOOTMGR Missing in Windows 7
    Thanks
    Aalia lyon

    ReplyDelete