Monday, April 25, 2011

Resize Disk Partitions on a Dual boot system with Windows 7 and Linux

Here is the deal. Some time ago I got a Dell laptop with 500GB of disk space. For what I was doing at the time is worked pretty good, but one day I decided to install Ubuntu 10.10 on it so I could start playing with its 3d desktop enhancements. Since it was a play installation i only gave it 20GB of space.

Well, that came back a got me. After some time I got a part time job developing some php and mysql applications for a company and since I have a working solid installation I decided to use the Linux installation to do the development.

After a couple of months and 5 kernel updates I ran out of disk space and at this point of the game the Linux installation had become my primary operating system.

What to do? Reformat and reinstall? obviously that is not an option. Here is what I want to do:
  1. Take space (80GB )from my Windows C: drive
  2. Give it to my / partition
So here it is. Easy as 1,2 and 3.

  1. Shrink the Windows Partition
    1. Boot into Windows 7.
    2. Login as Administrator.
    3. run the following command: mmc.
    4. Click on File-> Add/Remove Snap-in ...
    5. Select Disk Manangement and click add.
    6. Choose This Computer and click Finish.
    7. Click OK.
    8. Open Disk Management and right-click on the partition that you want to shrink and from the context menu click on "Shrink Volume".
    9. Reduce the size to your liking and close the MMC.
    10. You will be left with an unused partition in addition to the already created partitions in your system.
  2.  Boot your laptop with a Gparted Live CD.
    1. Download a Gparted live CD and burn the ISO image into a CD. You can find Gparted here.
    2. Boot the system with the Live CD and follow boot up steps. Make sure you get into the Gparted graphical mode, it will make things easier.
  3. Increase the Size of your root partition using Gparted
    1. Once in Gparted select the root partition and click on Resize. You can type the new size or use the scrolling arrows to set the new size.
    2. Once you have the new size click apply and let Gparted do its magic.
    3. Reboot your machine and voila you have done it.
See I told you as easy as 1,2,3.

No comments:

Post a Comment