Monday, July 21, 2008

Steps to get back what is rightfully yours...

If you ever wanted to unlock the recovery partition on your laptop/desktop pc, here is a simple way to do so.

First go to the disk management snap-in and check if at all you have a recovery partition. Type in compmgmt.msc at run. Once the Microsoft Management Console loads, go to Storage -> Disk Management.

If you have a recovery partition on your laptop, it will be listed as a EISA Partition and will not have a drive letter assigned to it.
You can unhide this partition from within windows by using the command line utility DISKPART.
To invoke DISKPART type in diskpart at run.
Assuming that your laptop has just one hard disk, follow the steps below to unhide the recovery partition.

At the DISKPART prompt, type

>>SELECT DISK=0 [Selects the specified disk and shifts the focus to it.]
>>DETAIL DISK [Displays the properties of the selected disk and the volumes on that disk.]

At this step you will be able to view two partitions. The partition on which your operating system is installed and the recovery partition. Assuming Partition 1 is your recovery partition and Partition 2 is the one on which the OS is installed, let us first view the details of Partition 2.

At the DISKPART prompt, type
>>SELECT PARTITION=2 [Selects the specified partition and shifts the focus to it.]
>> DETAIL PARTITION [Displays the properties of the selected partition.]

At this step you will be able to view the details of the partition that holds your C: drive. Make a note of the type of the partition. We will convert the recovery partition to this same type. This will be an integer value and if your C: drive is NTFS, the type will be 07.

Now let us view the details of your recovery partition. At the DISKPART prompt, type

>> SELECT PARTITION=1
>> DETAIL PARTITION

At this step make a note of the type of the partition. If anything goes wrong this piece of information will come in handy. Mostly the type will be 27 and the partition will be hidden.

Now let us unhide the partition by changing the type of the recovery partition to the type that your viewable partition is. Type in this at the DISKPART prompt.

>> SET ID=07 OVERRIDE [Changes the partition type field for the partition with focus. Replace 07 with appropriate value noted at the previous step]

A message will be displayed indicating that the type has been successfully changed. Now go back to the Disk Management Snap-In and assign a drive letter to your recovery partition. More likely than not this would let you view the contents of the recovery partition. If by any chance, something got messed up, go back to DISKPART and reset the type.

Now that you have uncovered the partition, make an image of the partition using any disk backup utility. Norton Ghost or Nero BackItUp. Once the backup is ready, you can go ahead and format the recovery partition. Or even better install Ubuntu to this newly freed space :) So go ahead and reclaim what is rightfully yours!