Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I desperately need to increase the size of a partition.I am running Ubuntu with dual boot(windows,no WUBI).

Two hard disk partition

C: Windows

D:I don't know how but D: is separated into 3 spaces.One contains Ubuntu-->Linux swap and NTFS.When right clicking on Ubuntu disk I am not getting any option to increase size.

I want the safest solution. I can create space in C: or D: .

enter image description here

share|improve this question
You have 2 unallocated partitions, a 173MB, and 143MB. Both can be added to /dev/sda3. Is that What you're trying to do? – Mitch Jul 2 '13 at 17:35
It looks like /dev/sda3 has your active Windows partition. Is that correct? If I understand the question, you want to enlarge the Ubuntu partition at /dev/sda6? Unfortunately this is a bit of a tricky situation because the swap sits between the Ubuntu partition and the extra space. – Travis G. Jul 2 '13 at 17:42
No,I want to increase its size by 10 GB.But I am unable to do it.I tried both from windows and ubuntu.No option to increase size of the disk when righ clicking it.I want to increase size of ext4 by 10 Gb by reducing /dev/sda5 – deadman Jul 2 '13 at 17:43
@Travis .G yeah the swap is the problem – deadman Jul 2 '13 at 17:43
@Travis G.I can understand tricky things.. :-) .. please explain..However I dont want to loose any of my files or installed directory – deadman Jul 2 '13 at 17:52

Sadi's procedure is more-or-less correct, on cursory examination, although it will be necessary to edit /etc/fstab to point to the new swap partition's UUID if this procedure is followed.

I'd like to add two points, though.

First, you've got just under 40GiB of unused space in your filesystems, on a hard disk that's 465GiB in size. In other words, you've got just 8.5% free space. As a general rule, it's unwise to fill a disk beyond 90% full (a somewhat arbitrary figure, I admit), since efficiency drops off when a filesystem gets too full and because you may encounter an emergency or temporary need for extra space. Thus, I strongly recommend either deleting as many unused files as you can find or buying a new hard disk to either supplement or replace the current one. If this is a desktop system, you can get a 3.5-inch internal disk with twice your current disk's capacity for about $70. 2.5-inch disks for laptops are pricier; or you could go for an external disk, which would also add a bit to the cost.

Second, any operation that involves resizing a partition (especially by adjusting its start point, as Sadi's procedure does) or moving it is inherently risky. I don't recommend doing this unless you've got a backup of any important data on the disk. Although the failure rate is fairly low (probably well under 10%, and maybe under 1%, although I don't have hard data), the cost of failure is extremely high, since it's likely to become extremely tedious to recover any data, and some files might become unrecoverable. Of course, you should have a backup of any important data anyhow, but a backup is especially important when you undertake a risky operation like a partition resize or move.

share|improve this answer
Thanks for reminding these two important points, Rod; I've added them to my answer now. – Sadi Jul 3 '13 at 8:38

Assuming that you need to increase the size of your Ubuntu partition (sda6) by 10GB, I can recommend the following steps:

  1. Use an Ubuntu Live CD or USB to boot your computer (otherwise you can't modify your Ubuntu partition as all partititons in use are locked).
  2. Start GParted Partition Manager and unmount linux-swap partition (sda7) or any other as necessary.
  3. Delete linux-swap partition (sda7).
  4. Reduce the size of your next partition (sda7) to create an additional 6.14GB free space before it (so as to sum up to 10GB together with the linux-sawp partition deleted). Please note that this (moving data in a large partition) might take quite a while (sometimes several hours?) and, more importantly, it is recommended to make a backup especially when changing the starting point of a partition as in this step.
  5. Reduce the size of sda7 again this time to create a total of 4GB free space after it together with the already existing unallocated space at the end.
  6. Create a linux-swap partition using the entire (~4GB) free space at the end of the disk. (Please note that you might need to replace the UUID for swap in your /etc/fstab file with the new UUID after this step.)
  7. Finally, you can enlarge your Ubuntu partition including the entire (~10GB) free space that has just been created between sda6 and sda5.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.