Sunday, March 23, 2008

Random PC Tip - How to repartition your harddisk on Windows

Since a few of my friends seek my help often on PC-related matters, I thought it'd be a good idea to post tips and how-tos once in a while. This is the first of such posts.

On Windows XP and Vista, partition management is a pretty simple task, thanks to Microsoft's partitioning tools that are, I should say, getting better and better. That, however, doesn't mean that they have become good enough to obviate third-party partitioning software: tools like Acronis Partition Manager, Paragon Partition Manager, and others go deep where Windows' tool only scratches the surface, but that's a topic for another day. In this post, I'll tell you how to use the built-in Windows partition manager to get some basic partitioning tasks done.

First off, here's a list of what you can't do on Windows XP using the built-in tool:

  1. you can't resize (shrink / expand) existing partitions
  2. change the partition type (like you can with Linux's fdisk).

What it does allow you to do are:

  1. delete a partition
  2. add a partition

I think that there are quite a few good articles that explain clearly how to go about these tasks, and I don't think I have much more value to add there. However, there is one thing that I'd like to point out to make life simpler. That is, instead of opening the Disk Management Console through the usual "My Computer->Manage->Disk Management" or "Control Panel->Administrative Tools->Computer Management->Disk Management", you could simply go to Start->Run (WinKey + R on any Windows from Win2k onwards) and type in "diskmgmt.msc" (without the quotes).

Now that you're in the Disk Management Console, here's what you should do in Windows Vista if you want to resize a partition.

  1. First off, make sure that you see the main disk. This is usually shown as Disk 0 on most PCs - including laptops - that boot from a hard disk (see Fig. 1 above). If you've got your PC from a vendor like Dell (yes!), HP (avoid them!!), IBM (now Lenovo), Acer (good, though low-end), among others, then it's likely that you have just one partition, though it's also equally likely that you have a "rescue" or "recovery" partition which you'll do well to leave alone if you don't know what you're doing. In my case, the main disk is "Disk 0".
  2. Now, identify the main partition - this will usually be the biggest partition (see picture above), that is, the partition with the biggest size. In my case, the main partition is called "OS (C:)".
  3. Now, you're ready to repartition your harddisk. Before you go ahead, ensure that you have a backup of your important, personal files, in case something goes wrong. And, believe me, I've gone through enough software glitches to know how frequent they are, so please don't risk going ahead without a backup. Make a backup NOW, and verify that the backed up files are readable!
  4. Select the biggest partition by clicking it ("OS", in my case). Now, right-click it and choose the "Shrink Volume" option. You'll be presented with a dialog box which will tell you what the maximum size you can shrink the partition to is ("Size of available shrink space in MB").
  5. Type in a value in MB (megabytes). Note that 1000 MB = 1 GB (for the purists out there, I'm well aware that it should be 1024 MB, but go talk to the harddisk manufacturers for this, they seem to have eaten 24MB for every GB). Click Ok.

Congratulations, you've just repartitioned your disk! With the free space you have now, you can follow the instructions in this Microsoft article to create a new volume and format it. Once done, your new partition is ready to use.