Consolidating Disk Partitions in a Windows XP to Windows 7 Migration

If your Windows XP systems have multiple disk partitions and you are migrating them to Windows 7, you may have a requirement to combine all partitions into one so Windows 7 ends up on a sufficiently large partition.  In a Refresh scenario, where the same Windows XP system will end up with Windows 7, this can be a challenging requirement if you must preserve the user data.

Fortunately, this Windows 7 deployment scenario is possible if you are using System Center Configuration Manager (SCCM) 2007.  In a nutshell, SCCM can automate the following steps during deployment:

  1. Save the user data
  2. Delete the extra partition(s)
  3. Extend the primary partition where Windows XP is installed
  4. Install Windows 7 on the extended partition
  5. Restore the user data

In an SCCM task sequence, the “Capture User State” step is used to save the user data.  If the partition being deleted contains user data, you must save the state data to the State Migration Point (instead of using the USMT 4 hardlink feature which leaves the data on the local drive).  When integrating MDT 2010 with SCCM 2007, hardlinks will be used by default but you can force to use the State Migration Point by disabling the Determine Local or Remote User State step.

Deleting the extra partition(s) can be accomplished by running diskpart commands in the task sequence.  For example, if you have to delete one extra partition on disk 0, the diskpart commands would be

SELECT DISK 0
SELECT PARTITION 2
DELETE PARTITION
EXIT

You can automate the diskpart commands by entering them in a text file (such as myScript.txt) that you would call with the /s parameter of the diskpart command.  This is an example:

Diskpart /s myScript.txt

Of course, before you use a script like this in a deployment, you would have to first test the diskpart commands manually on test systems that are configured like your production systems to ensure that you obtain the desired results.

You would then run the diskpart command, calling the script, from the task sequence.  You can use the Run Command Line step to run the command.  However, we must find a way to make the script file available to the task sequence.  One way is to include the file in an SCCM package and then include that package in the Run Command Line step.

You can place the WME – Fix Partitions step in the Refresh Only group:

Then the Apply Operating System Image step should be configured to use a unattend.xml file that sets the ExtendOSPartition variable in the specialize phase to True.

This is the bottom section of the Apply Operating System Image step:

Share:

Facebook
Twitter
LinkedIn
Picture of Matt Tinney

Matt Tinney

Professional IT executive & business leader having decades of experience with Microsoft technologies delivering modern-day cloud & security solutions.

Contact Us

=
On Key

More Posts

Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.

=