13

When I installed Ubuntu on my laptop, I created a large partition on the hard drive to encrypt with TrueCrypt. Turns out I'm not using the amount of space I thought I would be for encrypting data, and I'm running out of space in my root partition.

Is it possible to resize a TrueCrypt partition with something like GParted, or will I need to first move everything out of the encrypted partition, blow it away, add some of the newly available space to my existing root partition, and then create a new TrueCrypt partition?

14

TrueCrypt partitions aren't resizeable. You need to create new TrueCrypt partition of larger size. Maybe even two of them, as the data must be stored somewhere at the time of reformatting, and it still must be safe (encrypted). Recently I was extending size of my Truecrypt partition and used USB-HDD + TrueCrypt to hold the data in the meantime.

8

I can tell that you can do this if you are going to truncate the partition at the end, meaning your root partition is allocated to higher sector addresses than the TrueCrypt partition.

Otherwise there might be a way, but I have no experience with that, yet.

For the former case, proceed like this:

  • mount the volume using TrueCrypt to slot 1
  • ummount the filesystem from the truecrypt device: sudo umount /dev/mapper/truecrypt1
  • use ntfsresize to shrink the filesystem: sudo ntfsresize -s <whatever size> /dev/mapper/truecrypt1
  • check the filesystem wihtin the mounted volume using chkdsk
  • truncate the partition at the end using parted (delete the old partition and create a new partition stating at the same start sector as the old one and which is big enough to hold the shrunken file system)
  • use a modified version of extcv in Windows to update the TrueCrypt volume headers and adjust the filesystem to the new boundary

Anyways you should check out a more detailed guide on this so you understand what you are doing. However, this procedure requires some knowledge and experience with handling partitions.

1
  • at now extcv is the best solution. but notice, extcv cannot work on hidden partition, this is only one limitation. it is compatibile with TC up to 7.1a . Unfortunately there was happend something wrong, there is more fresh TC but it sound like fake, and home page suggest migrate to bitlocker. Then it is recommendec fetching TC 7.1a from trusted sites (i have old download), and check MD5. but at now, TC is forked to VeraCrypt project.
    – Znik
    Aug 4 '17 at 7:21
3

I have yet to test it, but this project does claim to support re-sizing volumes without formatting.

1
  • It only works for NTFS volumes without hidden volumes. It can expand volumes but not make them smaller. It is only compatible with TC 7.0, but there's a fork that claims compability with TC 7.1.
    – Gruber
    Oct 28 '20 at 13:34
1

You can only resize encrypted system partitions and you must do it while the encrypted operating system is running.

On Windows 7 I just used the regular tools to increase the size of the partition (Disk Management > Extend Volume).

enter image description here


Source:

Encrypted partitions cannot be resized except partitions on an entirely encrypted system drive that are resized while the encrypted operating system is running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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