Ξ

Resize partitions on an encrypted disc

Published on 2015-03-20 code linux

Recently I installed a fresh debian jessie on my laptop. I used this opportunity not just to switch to the next debian version, I also switched to 64 bit and encrypted my disc. I had no experience with encrypted disc setups so I trusted the debian installer. It offered several default partition options of which I chose to have a root partition with a separate home partition.

The trouble is now that the installer chose to use only 10GB for the root partition which I used up in the first week. So now I was tasked with resizing the partitions.

What I already knew

In the past I had used gparted for task like this one. Unfortunately, gparted does not support encryptet discs. I was very unconfident about doing this without a tool I knew but in the end it turned out to be rather simple.

If it had not been for the encryption, these are the steps I would have done in gparted (assuming that root takes up the first 10GB of the disc and home uses all the rest):

  1. shrink home by 10GB
  2. move home to the end of the disc
  3. grow root

the actual situation

The disc layout was roughly like this:

There were two aspects about this that I did not expect and that significantly simplify my task:

what I had to do