Search This Blog

Friday, December 30, 2011

Expand your Root partition in Linux. [Tutorial]



Here is a demo of how to expand the size of any partition in Linux. It could be either Root or Home or any other partition.

Prerequisites:
=> An empty partition just before or after your partition that needs to get expanded.
=> A separate installation of Linux in case you are expanding the root partition. Since the drive getting expanded needs to be un-mounted at the time of expansion.
=> Gparted Partition Editor. (usually comes pre-installed with Ubuntu)

My Laptop has 80GB of hard disk and currently has 4 OS installed. The pic below shows the scheme.
34GB for Windows
10 GB for ubuntu B
10 GB for Ubuntu N
and remaining 20 GB partitioned between swap, home and root partitions of my another Ubuntu installation that i generally use.
I realized that i was running out of space on my Ubuntu B partition while i was rarely using Ubuntu N. So, i decided to format the Ubuntu N installation and allocate the free space to Ubuntu B.

To format a partition, right click on the partition and format it. Gparted doesn't format it rightaway, but queues the action. Now the Free space is being shown as "unallocated".

To re-size the partition, right click on the partition to be modified and click on "resize".
This would prompt the box as shown in the above pic. you can either change the values or drag and shift the blue bar position to increase the size according to your requirement.

This is how it looks when the partition has been re-sized. I allocated the complete space to my partition.


Now it shows the new size of my Ubuntu B partition and 2 operations as pending.

Click on the green "tick" button to apply the operations. All the changes made till this point can be reversed as these are only the queued operations. Once the changes are applied, they will be permanent on the hard-disk.





Voila!!! The task is done. Now my Ubuntu B partition is of approx 20GB, without formatting the installation of Ubuntu B.

Saturday, December 24, 2011

Expand Linux Partition.


I started off using Linux as a hobby and eventually fell in love with it over the due course of time. Now my Linux partition has solution to all my computing problems. But, when i started, i wasn't sure if i would be using Linux full-time. So, i allotted the resources which were just enough to get my system running, i.e. just 5 GB of hard disk space to my Ubuntu's "/" partition(root partition). Recently, i realized that i was totally out of space on my root partition and needed to expand it. The advice from friends and Google was to "Format and re-install with new partition scheme". But that meant, me loosing all my installed softwares and their settings that i have used during past year and a half. Also, the Ego of a Computer Engineer was not allowing me to simply format the system. My efforts paid off and I was able to successfully expand the size of partition.


For demo, i expanded the size of my Ubuntu 8.10(Ubuntu B) after deleting a different version of Ubuntu (Ubuntu N) that i had once installed for testing purposes. Here is the tutorial showing how to safely Expand your Linux partition.