GParted won't seem to let me shrink an encrypted partition

I have a 1TB (or thereabouts) SSD drive on my laptop, on which is installed Ubuntu 14.04.

I want to increase the size of the boot partition, so I've booted from a live CD, and ran GParted.

I have two partitions - the main one, /dev/sda2, and the boot one, /dev/sda1. Within /dev/sda2 is an encrypted partition called /dev/sda5. It looks like this:

enter image description here

I can right click on /dev/sda2, and choose "Resize/Move", but on the following dialog it doesn't let me make any changes.

Is this because I would need to shrink the encrypted partition within /dev/sda2 first, and you can't resize encrypted partitions? That seems plausible but my knowledge runs out at this point.


The partition/dev/sda2 is an extended partition under which the logical partition /dev/sda5 was created. Although this would not have been necessary for the setup being shown in the screenshot you've provided, the reason to create an extended partition is to achieve the possibility to create more than three additional partitions later on. It is not possible to create more than four primary partitions on a disk with msdos (MBR) partition table. But now to your question : you can - and have to - resize the partition /dev/sda5. First decrypt this partition and then start the resizing process with GParted ...

  • Shrink /dev/sda5 (make all free space to be preceding space)
  • Shrink /dev/sda2 (make all free space to be preceding space)
  • Grow /dev/sda1 (add the complete free unallocated space)

It is important that afterwards no free unallocated space is left between /dev/sda1 and /dev/sda2,
which means that you may need to add 1 MB still remaining space to /dev/sda1 or to /dev/sda2.
I've tested it in a virtual machine, but I recommend to backup the disk in case something goes wrong.
Find more information about partition resizing and what you have to pay attention to : GParted Manual


I found a much easier solution. Run Xubuntu live, install and launch partitionmanager. It can very well handle encrypted partitions.

Complete details are here: http://e1z.ca/devlog/encrypted_partition_resize.html