Windows Tip: Shrinking XP partitions using diskpart

ITworld.com |  Operating Systems 2 comments

Send your Windows question to Mitch today! | See other Windows tips



The version of the diskpart command included in Windows Vista allows you to shrink partitions to free up space on your hard drive so you can create additional partitions. Unfortunately, the version of diskpart included in Windows XP doesn't include this functionality, so the usual way of shrinking XP partitions is to use a third-party tool like Symantec's Norton PartitionMagic.



If you have a Windows Vista product DVD around however, you can use Vista's version of diskpart to shrink partitions on a computer that has Windows XP installed. To accomplish this bit of magic, do the following:



1. Boot your system from the Vista DVD and select the Repair Your Computer option to enter the Windows Recovery Environment (Windows RE), a recovery platform based on version 2.0 of the Windows Preinstallation Environment (Windows PE) and which replaces the Recovery Console of previous versions of Microsoft Windows.



2. When the Choose A Recovery Tool screen appears, click Command Prompt to open a command prompt window.



3. Type diskpart to enter the diskpart command shell.



4. Use the select volume command to select the partition you want to shrink.



5. Use the shrink command to shrink the partition the desired amount. This command will start by moving data from the end of your partition before shrinking the partition, so be aware that shrinking a large partition can take a long time.



One caveat: I haven't been able to get definitive word from Microsoft that this is a supported scenario for shrinking XP partitions, but everyone I've talked with who has tried it (including those inside Microsoft) have said it worked fine for them and no data was lost. In other words, try this at your own risk.


Finally, for more information about using Vista's system recovery tools see Chapter 30 Configuring Startup and Troubleshooting Startup Issues in the Windows Vista Resource Kit.

 

2 comments

    Anonymous 3 years ago
    Great suggestion. I was looking around for so many days to partition my new machine. Thanks to you! Finally it worked
    Anonymous 3 years ago
    I have tried this trick and it worked perfectly.

      Add a comment

      Post a comment using one of these accounts
      Or join now
      At least 6 characters

      Note: Comment will appear soon after you have activated your account.
      Obscene/spam comments will be removed and accounts suspended.
      The information you submit is subject to our Privacy Policy and Terms of Service.

      ITworld LIVE

      Operating SystemsWhite Papers & Webcasts

      White Paper

      Microsoft Enterprise Agreement Program Overview

      Discover how flexible the Microsoft Enterprise Agreement Program is to help you build the right software solution agreement for your business. This paper highlights all the available options-from on-premise software and cloud service solutions, to payment options and enrollment programs, and more.

      White Paper

      Watson - A System Designed for Answers. The future of workload optimized systems design

      Watson is a workload optimized system designed for complex analytics, made possible by integrating massively parallel POWER7 processors and DeepQA technology. Read the white paper about Watson's workload optimized system design.

      See more White Papers | Webcasts

      Ask a question

      Ask a Question