Resize partition in Ubuntu

You can resize partition in Ubuntu using Gparted if you need more disk space for an existing partition which is running out of space.You can shrink ,expand ,move ,copy,delete a partition using  Gparted.


Please backup important data to external disk before resizing your partition


1.Boot from your Ubuntu installation cd or bootable usb disk

2.Launch Gparted from Dash

3.Right click the partition then select  Resize/Move to resize the partition


Notes and Limitations:

1.You only can re-size an unmounted partition,that’s why normally we need boot from Ubuntu installation CD.So you can resize a partition which could be unmounted in Ubuntu after installing Gparted using command

sudo apt-get install gparted

2.You only can expand a partition when there is free space in front of or after it.(shrink the partition in front of or after it)

3.You need to swapoff a swap partition before resizing it(Right click – swapoff)

4.A Primary partition cannot be expanded into free space encompassed by an Extended partition, nor can a Logical partition be expanded into free space outside of the Extended Partition

5.You should leave at least 10% as free space when shrinking a partition

6.It’s recommended to do a chkdsk before resizing a NTFS partition

7.To expand a OS partition ,it’s recommended to make free space after it,the expand it,or you may get boot problems.

8.Fix Windows 7 / Vista boot problems

use a recovery disc(Installation DVD) or run below commands in recovery console

To repair the Master Boot Record of the boot disk:

bootrec /fixmbr

To write a new partition boot sector to the system partition:

bootrec /fixboot

To rebuild the Boot Configuration Data (BCD) store:

bootrec /rebuildbcd

9.Fix grub 2

Boot from Ubuntu Live CD,open a terminal by pressing Ctl+Alt+t ,then run below command

sudo fdisk -l

to confirm your root partition,then run below commands to fix grub 2

sudo -s
mount /dev/sda1 /mnt        
mount /dev/sda2 /mnt/boot  #Skip if no boot partition
grub-install --root-directory=/mnt/ /dev/sda

Leave a Reply

Your email address will not be published. Required fields are marked *