imageI originally posted this a few months back but there was some confusion on some of the steps and why they needed to be taken so I’ve clarified and added additional information and instructions here.  At first I thought I could just update the original but then after taking a closer look I decided it would simply be easier to just create a new post rather than go back and make a bunch of edits.

=====

When a Task Sequence is created via the "Create New Task Sequence Wizard", the Task Sequence may fail if the Windows OS being deployed is Windows 7 and the reference Windows 7 WIM image being deployed was manually created and then captured using the SCCM 2007 Capture CD.

The Task Sequence Error dialog may show one of the following errors:

Error 1

Task Sequence: <Task_Sequence_Name> has failed with the error code (0x8000FFFF). For more information, please contact your system administrator or helpdesk operator.

Error 2

Task Sequence: <Task_Sequence_Name> has failed with the error code (0x80070070). For more information, please contact your system administrator or helpdesk operator.

Examining the SMSTS.log(s) reveals one or more of the following errors:

Error 1

Partition 1 larger than remaining disk space. Requested partition size: <X>, remaining size: <Value_smaller_than_X> OSDDiskPart
LoadPartitionConfiguration( i, oDisk, cbDiskSize, cbContainerPartitionSize, pCurPartition), HRESULT=8000ffff (e:\nts_sms_fre\sms\client\osdeployment\osddiskpart\main.cpp,751) OSDDiskPart
LoadDiskConfiguration(oDisk), HRESULT=8000ffff (e:\nts_sms_fre\sms\client\osdeployment\osddiskpart\main.cpp,1412) OSDDiskPart
Invalid configuration specified.  Please ensure that the task sequence is properly configured. OSDDiskPart
OSDDiskPart.exe failed: 0x8000ffff OSDDiskPart
Process completed with exit code 2147549183 TSManager
!--------------------------------------------------------------------------------------------! TSManager
Failed to run the action: Partition Disk.
Catastrophic failure (Error: 8000FFFF; Source: Windows) TSManager
The execution of the group (Install Operating System) has failed and the execution has been aborted. An action failed.
Operation aborted (Error: 80004004; Source: Windows) TSManager
Failed to run the last action: Partition Disk. Execution of task sequence failed.
Catastrophic failure (Error: 8000FFFF; Source: Windows) TSManager

Error 2

Successfully wiped C:\ ApplyOperatingSystem
Applying image to C:\ ApplyOperatingSystem
Applying image 2 to volume C: ApplyOperatingSystem
WIM error:C:\Windows\winsxs\x86_microsoft-windows-mulanttsvoiceenudsk_31bf3856ad364e35_6.1.7600.16385_none_0f51daf70520cd99\M1033DSK.CSD.
There is not enough space on the disk. (Error: 80070070; Source: Windows) ApplyOperatingSystem
WIMApplyImage( hVolumeImage, const_cast<LPWSTR>(pathTargetVolume.c_str()), WIM_FLAG_VERIFY), HRESULT=80070070 (e:\nts_sms_fre\sms\framework\tscore\wimfile.cpp,512) ApplyOperatingSystem
Unable to apply (0x80070070) ApplyOperatingSystem
this->imageFile.ApplyVolumeImage(imageIndex, this->targetVolume), HRESULT=80070070 (e:\nts_sms_fre\sms\client\osdeployment\applyos\installimage.cpp,707) ApplyOperatingSystem
ApplyImage(), HRESULT=80070070 (e:\nts_sms_fre\sms\client\osdeployment\applyos\installimage.cpp,1416) ApplyOperatingSystem
Apply(), HRESULT=80070070 (e:\nts_sms_fre\sms\client\osdeployment\applyos\installimage.cpp,1456) ApplyOperatingSystem
Installation of image 2 in package SP20001C failed to complete..
There is not enough space on the disk. (Error: 80070070; Source: Windows) ApplyOperatingSystem
Failed to run the action: Apply Operating System.
There is not enough space on the disk. (Error: 80070070; Source: Windows) TSManager
The execution of the group (Install Operating System) has failed and the execution has been aborted. An action failed.
Operation aborted (Error: 80004004; Source: Windows) TSManager
Failed to run the last action: Apply Operating System. Execution of task sequence failed.
There is not enough space on the disk. (Error: 80070070; Source: Windows) TSManager

Cause

The issue occurs because of two reasons:

1. The "Create New Task Sequence Wizard" creates the Task Sequence with the "Apply Operating System" task and "Apply Data Image 1" task in the incorrect order.

2. The "Create New Task Sequence Wizard" creates a partition the size of the hard drive where the Task Sequence was created, which usually will not match up with the size of the hard drive where the Task Sequence is deployed to.

The Data Image being applied in these scenarios is normally a 100MB boot partition that contains the boot manager and boot files. Normally the boot manager and boot files are installed on the same partition as the Windows OS. However the reason this separate partition is created is to account for a possible future installation and use of BitLocker. If BitLocker is being used, the boot manager and boot files need to reside on a partition that is not encrypted. Putting the boot manager and boot files on a separate partition allows the partition containing the Windows OS to be encrypted, but leaves the partition containing the boot manager and boot files to be unencrypted.

The separate 100MB partition is not a requirement. Only one partition can still be created and the boot manager and boot files can still be installed on the same partition as the Windows OS. However creating the 100MB partition at Windows installation time makes the process of installing and enabling BitLocker in the future less complex.

Please see the section More Information for a detailed explanation.

Resolution

Use one of the below methods to resolve the issue.

  • If the 100MB is desired, Method 1 is preferred because it is less complex.
  • If no 100MB partition is desired, use Method 3.

Note that in Methods 1 & 2 below, the size of the boot partition is purposely changed from 100MB to 300MB. This is to account for future reimage scenarios when WinPE may need to be staged on the local hard drive and/or to allow enough room for WinRE* to be stored on the partition. A 100MB partition is not large enough to stage WinPE onto and/or to install WinRE onto. Increasing this partition size from 100MB to 300MB will ensure WinPE can be properly staged on this partition and/or install WinRE onto without running out of space. Despite this change, the below instructions still refers to this partition as the "100MB partition".

In all methods, the Boot Manager is installed by the "Setup windows and ConfigMgr" task based on which partition is marked with the "Make this the boot partition" option.

* - WinRe, or the Windows Recovery environment, is a bootable Windows OS based on Windows PE (WinPE) that allows recovery of a Windows Operating System. Normally WinRE is installed on the same partition as the Windows OS. However, under certain circumstances, when BitLocker is installed and enabled on a PC, WinRE is moved to the unencrypted boot partition. This allows WinRE to still be booted to for recovery purposes.

Method 1

1. In the SCCM 2007 Admin Console, under the "Computer Management" --> "Operating System Deployment" --> "Operating System Images" node, right click on the Windows 7 image being deployed and choose "Properties".

2. Click on the "Images" tab.

3. Under the option "Select image you want to view:", switch between the different images (i.e., "1-1" or "2-2") that are contained in the WIM file. Determine which image, i.e. 1-1 or 2-2, contains the Windows installation. The image that contains the Windows installation will have information next to the fields "OS version", "Architecture", "HAL Type", and "Description". The non-Windows data image will not have anything next to these fields.

4. Click on the "OK button.

5. In the SCCM 2007 Admin Console, under the "Computer Management" --> "Operating System Deployment" --> "Task Sequences" node, right click the affected Task Sequence and choose “Edit”.

6. In the left pane of the Task Sequence select "Partition Disk".

7. Double click on the first item under "Volume" to bring up the "Partition Properties".

8. In the "Partition Properties" window:

  • Under "Partition options", change the value next to "Use specific size" from 100 MB to 300 MB.
  • Under "Partition options", make sure that the option "Make this the boot partition" is set.
  • Under “Formatting options”, make sure the “Quick Format” option is selected.
  • Click on the "OK" button.

9. Double click on the second item under "Volume:" to bring up the "Partition Properties" window.

10. In the "Partition Properties" window:

  • Under "Partition options", select "Use a percentage of remaining free space" and set the field "Size(%)" to "100".
  • Under "Formatting options", make sure the "Quick Format" option is selected.
  • Click on the "OK" button.

11. Select the "Apply Operating System" task.

12. Under the "Apply operating system from a captured image" option, make sure that the "Image:" drop down menu is set to the Windows installation image as determined in Step 3 (i.e., "1-1" or "2-2").

13. Select the "Apply Data Image 1" task.

14. Under the "Select the image from this package that you want to apply. This image can not contain any operating system." option, make sure the "Image:" drop down menu is set  to the non-Windows data image as determined in Step 3 (i.e. 1-1 or 2-2).

15. Move the "Apply Data Image 1" task immediately BEFORE the "Apply Operating System" task, but AFTER the "Partition Disk" task.

16. Click on the "OK" button to save the changes to the Task Sequence.

In Method 1, the 100 MB boot partition that was captured using the Capture Media is applied first via the "Apply Data Image 1" task. This allows the "Apply Operating System" task that follows it to move on to the second partition and apply the Windows OS image to the second larger partition via the option "Next available formatted partition". If we did not include the "Apply Data Image 1" task or the "Apply Data Image 1" task is after the "Apply Operating System" task, the Task Sequence would try to apply the Windows OS image on the first smaller partition instead of the second larger partition. This would cause the "There is not enough space on the disk" since the size of the WIM image is larger than the partition size.

Method 2

1. In the SCCM 2007 Admin Console, under the "Computer Management" --> "Operating System Deployment" --> "Operating System Images" node, right click on the Windows 7 image being deployed and choose "Properties".

2. Click on the "Images" tab.

3. Under the option "Select image you want to view:", switch between the different images (i.e., "1-1" or "2-2") that are contained in the WIM file. Determine which image, i.e. 1-1 or 2-2, contains the Windows installation. The image that contains the Windows installation will have information next to the fields "OS version", "Architecture", "HAL Type", and "Description". The non-Windows data image will not have anything next to these fields.

4. Click on the "OK button.

5. In the SCCM 2007 Admin Console, under the "Computer Management" --> "Operating System Deployment" --> "Task Sequences" node, right click the affected Task Sequence and choose "Edit".

6. In the left pane of the Task Sequence select "Partition Disk".

7. Double click on the first item under "Volume" to bring up the "Partition Properties".

8. In the "Partition Properties" window:

  • Under "Partition options", change the value next to "Use specific size" from 100 MB to 300 MB.
  • Under "Partition options", make sure that the option "Make this the boot partition" is set.
  • Under "Formatting options”, make sure the "Quick Format" option is selected.
  • Under "Advance options" in the field "Variable: " type:
    BOOTPART
  • Click on the "OK" button.

9. Double click on the second item under “Volume:" to bring up the "Partition Properties".

10. In the "Partition Properties" window:

  • Under “Partition options”,select "Use a percentage of remaining free space". Set the "Size(%)" field to "100".
  • Under "Formatting options", make sure the "Quick Format" option is selected.
  • Under "Advance options" in the field "Variable:" type:
    OSPART
  • Click on the "OK" button.

11. Select the "Apply Operating System" task. In the "Apply Operating System" task:

  • Under the "Apply operating system from a captured image" option, make sure that the "Image:" drop down menu is set to the Windows installation image as determined in Step 3 (i.e., "1-1" or "2-2").
  • Under the “Select the location where you want to apply this operating system.” option, select from the "Destination:" drop-down menu and choose "Logical drive letter stored in a variable".
  • Under the "Select the location where you want to apply this operating system." option, in the "Variable name:" field, type:
    OSPART

12a. Select the "Apply Data Image 1" task. In the "Apply Data Image 1" task:

  • Under the "Select the image from this package that you want to apply. This image can not contain any operating system." option, make sure the "Image:" drop down menu is set to the non-Windows data image as determined in Step 3 (1-1 or 2-2).
  • Under the “Select the location where you want to apply the image.” option, select from the "Destination:" drop-down menu and choose "Logical drive letter stored in a variable".
  • Under the "Select the location where you want to apply the image." option, in the "Variable name:" field, type:
    BOOTPART

12b. As an alternative, the "Apply Data Image 1" task is actually not needed and can either be removed or disabled. To disable the task, select the "Apply Data Image 1" task, click on the "Options" tab, and then select the option "Disable this step". To delete the task, select the "Apply Data Image 1" task, right click on it, and then select "Delete".

13. Click on the "OK" button to save the changes to the Task Sequence.

In Method 2, we can install the images "out of order" by specifically specifying what partition each image should be installed onto. Additionally, using this method, we do not actually have to install the Data Image that contains the 100MB boot partition. This Data Image only contains the Boot Manager and boot files, and since the Boot Manager and boot files are removed and then reinstalled by the "Setup windows and ConfigMgr" task, the Data Image does not need to be applied.

Method 3

Method 3 should only be used to create only one partition that fills the entire hard drive in cases where the 100MB partition is not desired for either immediate or future use of BitLocker:

1. In the SCCM 2007 Admin Console, under the "Computer Management" --> "Operating System Deployment" --> "Operating System Images" node, right click on the Windows 7 image being deployed and choose "Properties".

2. Click on the "Images" tab.

3. Under the option "Select image you want to view:", switch between the different images (i.e., "1-1" or "2-2") that are contained in the WIM file. Determine which image, i.e. 1-1 or 2-2, contains the Windows installation. The image that contains the Windows installation will have information next to the fields "OS version", "Architecture", "HAL Type", and "Description". The non-Windows data image will not have anything next to these fields.

4. Click on the "OK button.

5. In the SCCM 2007 Admin Console, under the "Computer Management" --> "Operating System Deployment" --> "Task Sequences" node, right click the affected Task Sequence and choose “Edit”.

6. In the left pane of the Task Sequence select “Partition Disk”.

7. Double click on the first item under “Volume” to bring up the “Partition Properties”.

8. In the "Partition Properties" window:

  • Under "Partition options", select "Use a percentage of remaining free space" and set the field "Size(%)" to "100".
  • Under "Formatting options", make sure the "Quick Format" option is selected.
  • Click on the "OK" button.

9. Single click on the second item under “Volume:” to highlight it, and then click on the red “X” button to delete it.

10. Select the “Apply Operating System” task.

11. Under the "Apply operating system from a captured image" option, make sure that the "Image:" drop down menu is set to the Windows installation image as determined in Step 3 (i.e., "1-1" or "2-2").

12. Select the “Apply Data Image 1” task.

13. The "Apply Data Image 1" task is not needed and can either be removed or disabled. To disable the task, select the "Apply Data Image 1" task, click on the "Options" tab, and then select the option "Disable this step". To delete the task, select the "Apply Data Image 1" task, right click on it, and then select "Delete". Make sure to take either one of these two actions.

14. Click on the "OK" button to save the changes to the Task Sequence.

Method 3 is actually the exact way that Task Sequences are created by the "New Task Sequence Wizard" when deploying non-Windows 7 OSes.

More Information

The 100MB partition created by a Windows 7 manual install is not absolutely required to for Windows 7. It is only required if BitLocker is going to be used at some point.

One of the problems with Vista was that this partition was not pre-created at the time when Windows was installed, and when a user wanted to enable BitLocker, they found that to enable BitLocker, they had to repartition their drive with Windows and data on it. This could be done through DiskPart, but repartitioning a drive incorrectly and/or if the process failed at the wrong point, data loss could occur and Windows could stop working.

Vista also had a utility called the "BitLocker Drive Preparation Tool" that let the drive be repartitioned after Windows was installed, but similar to using DiskPart, if the tool failed at the wrong point in the process, data loss could occur and Windows could stop working. Additionally, this tool did not work with Windows Vista SP2.

To get around this problem, Windows 7 creates the required partition during the initial install of Windows just in case its needed sometime in the future. The separate 100MB partition isn’t truly needed, but it is there in just case it is needed sometime in the future for use with BitLocker. The 100MB partition usually only contains the Boot Manager and boot files. The Boot Manager and boot files are NOT on the partition where Windows is installed.

SCCM 2007 Task Sequences have two different images we can apply – Operating System images and Data images. Operating Systems images are images that contain Windows installations. Data images are any other type of image that do not contain a Windows installation. Either type of image does not necessarily have or contain a Boot Manager.

When running through an SCCM 2007 OSD Task Sequence, the Task Sequence will usually remove any Boot Managers that already existed on the hard drive and/or that were part of any image. At the “Setup Windows and ConfigMgr” task, it will figure what type of Boot Manager is needed (XP/2003 vs. Vista/2008/Win7) based on what OS was deployed during the "Apply Operating System" task, and then install it on the appropriate partition. It normally determines what the appropriate partition is based not on what partition Windows is installed, but based on the settings in the “Format and Partition Disk” task. Whichever partition/volume is marked as “Make this the boot partition” is determined to be the partition where the Boot Manager and boot files need to be installed. So in other words, you can have the Boot Manager on one partition and the Windows installation on another. This is a requirement when using BitLocker because the drive that has the Boot Manager cannot be encrypted. If the Boot Manager is encrypted, the PC would not be able to boot.

When using the default Build & Capture Task Sequence to create a Windows 7 reference WIM image, it usually creates a Windows 7 installation without the 100MB partition. Because of this, any Windows 7 reference image created with a Build & Capture task sequence will deploy like previous versions of Windows and you don’t have to worry about the extra 100MB partition.

However, if Windows 7 was manually installed and configured on a PC, the 100MB partition will be created and the Boot Manager and boot files will be installed on the 100MB partition. When in Windows, the 100MB partition is usually “hidden” and no drive letter is assigned to it. The second partition where Windows is installed will still map to “C:”.

If the SCCM 2007 OSD Capture CD is then used on a PC where Windows 7 was installed manually, it will capture not only the partition where the Windows installation is installed, but the 100MB boot partition and store both partitions in one WIM file. In reality though, all that is needed from the captured WIM image is the Windows partition. The 100MB partition that is captured as part of the WIM is not needed since the contents of this partition can be automatically created by the "Setup Windows and ConfigMgr" task.

When trying to deploy a Windows 7 image via a Task Sequence that was captured using the SCCM 2007 Capture CD, the "New Task Sequence Wizard" does not seem to set up the Task Sequence correctly. Although the "Partition Disk” (“Format and Partition Disk”) task does create two separate partitions, one of the following issues may occur:

  1. The Task Sequence fails during the “Apply Operating System” with a not enough disk space error because the large Windows image tries to install on the small 100MB partition
  2. The larger partition fails to be set up properly due to the size specified for the second larger partition being bigger than the actual remaining space of the hard drive on the system where the Task Sequence is being run on
  3. The entire space of the hard drive is not used on the second larger partition
  4. The 100MB partition is not hidden
  5. The 100MB partition takes the drive letter of “C:”, and the partition where Windows is installed is assigned the drive letter of “D:” instead

Problem 1: Issue 1 seems to happen because the Task Sequence creates the smaller 100MB boot partition as the first partition and the larger Windows partition as the second partition, but then the Task Sequence sets the Windows partition in the WIM image to install on the first partition (which is the small 100MB partition). It eventually runs out of space because the Windows partition is larger than 100MB and it fails.

Problem 2: Issues 2 and 3 seem to happen because in the “Partition Disk” (“Format and Partition Disk”) task, the second partition is created based on the size of the hard drive where the Task Sequence was created. The size of this hard drive may be bigger or smaller than the hard drive of the system where the Task Sequence is run on.

Problem 3: Issues 4 and 5 can occur if an attempt is made to correct either one of the first two problems by modifying the Task Sequence, but the resolutions described in the Resolution section above are not followed correctly and either the partitioning is not set correctly or the Task Sequence steps are not set in the correct order.

To correct Problem 1, we can either rearrange the tasks so that the right image index gets installed on the right partition (Method 1 in the Resolution section above), or we can assign variables to each partition and then later tell each image on which partition to install based on the variables that were assigned to each partition (Method 2 in the Resolution section above).

Alternatively, we can also get rid of applying the 100MB data image that was captured as part of the WIM image since applying this image is not truly needed. Since the “Setup Windows and ConfigMgr” task will automatically create and install the Boot Manager on the partition that is specified as the boot partition, there is no need to apply the 100MB data image.

To correct Problem 2, we can set the partition to use 100% of the remaining free space instead of specifying the size. This fix is included as part of all of the Methods described in the Resolution section above.

Finally, if the 100MB partition is not wanted or needed, the Task Sequence can be reconfigured to just create just one partition that uses all of the drive space and then apply the Windows image to it. The task that applies the 100MB data image would then be removed. The “Setup Windows and ConfigMgr” task would then take care of properly installing the Boot Manager on the partition (Method 3 in the Resolution section above).

Hope this helps,

Frank Rojas | Configuration Manager Support Escalation Engineer