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

WME Cybersecurity Briefings No. 020
Cyber Security

WME Security Briefing 26 July 2024

Pro-Houthi Group Targets Yemen Aid Organizations with Android Spyware Overview A suspected pro-Houthi group, OilAlpha, is targeting humanitarian organizations in Yemen with advanced Android spyware. The operation is associated with the activity cluster codenamed OilAlpha. It

Read More »
WME Cybersecurity Briefings No. 019
Cyber Security

WME Security Briefing 23 July 2024

Samba File Shares Targeted by DarkGate Malware in Recent Cyber Offensive Overview Recent investigations by Palo Alto Networks uncover a brief but significant cyberattack campaign utilizing DarkGate malware. This malicious software exploited Samba file shares to

Read More »
WME Cybersecurity Briefings No. 018
Cyber Security

WME Security Briefing 15 July 2024

OVHcloud Mitigates Record-Breaking 840 Million PPS DDoS Attack Overview In April 2024, OVHcloud, a top French cloud computing firm, successfully stopped a massive DDoS attack. The attack hit a record-breaking rate of 840 million packets per second

Read More »
E-Commerce Security - Solutions for Online Retailers
Azure

E-commerce Security – Solutions for Online Retailers

Today’s hyper-charged e-commerce landscape demands top-notch cybersecurity measures. Cybersecurity for this bustling sector isn’t just about ticking a technical box; it’s the cornerstone of building trust. As businesses and consumers flock to the online space, the

Read More »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.

=