2

When I installed Natty (11.04) I chose to encrypt /home and I chose to mount it on a separate partition. I would like to repartition /home without losing data and by having the same sort of encryption after the repartitioning is done.

I guess that this would mean to do the following:

  • Temporarily storing the data I want to keep somewhere else.
  • Repartitioning.
  • Putting the data pack on the partition.
  • Activation of encryption.

Or maybe I can clone the data on the partition so that I can skip the last point? How should I proceed? I would appreciate detailed instructions for every step in the process.

Here's the output from mount:

/dev/sdc1 on / type ext4 (rw,noatime,errors=remount-ro,discard,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/sdb1 on /var type ext4 (rw,commit=0)
/dev/sda2 on /home type ext4 (rw,commit=0)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/home/username/.Private on /home/username type ecryptfs (ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=9095a85defbbd74d,ecryptfs_fnek_sig=ac460d25b6a798e1)
gvfs-fuse-daemon on /media/ssd-store/home/username/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=username)
N.N.
  • 18,589

1 Answers1

3

(This answer is targeted only at those using eCryptFS-based encryption, as the original author has indicated.)

In this case, you'll want to do the following: 1. Back up your data. (Always a good idea.) 2. Boot from a LiveCD with GNU parted. (I believe the Ubuntu CD has this. GParted is a Gnome front-end that makes this easy.) 3. Have Parted resize the partition.

Because you're using eCryptFS, you can just resize the underlying partition and filesystem without any interference to the encryption layer.

David
  • 1,111