Comment 106 for bug 953875

Revision history for this message
Eric W. Scott (ewscott9) wrote :

(EDIT to 104, it should have been offset=1024, not offset=20)
Okay, here's what I do to fix the problem (for 14.04). I'll break it down into three steps.

1. Reformat the original swap partition on the system and make note of it's new uuid. You need to do this, because ubuntu wipes the uuid when it encrypts the partition on the first boot.

2. Now change /etc/crypttab to include an offset of 1024 so that cryptdisks doesn't wipe the uuid on the new swap partition.
Change from:
cryptswap1 UUID="old-uuid" /dev/urandom swap,cipher=aes-cbc-essiv:sha256
To:
cryptswap1 UUID="new-uuid" /dev/urandom swap,cipher=aes-cbc-essiv:sha256,offset=1024

3. Now run the following commands to activate the encrypted swap partition:
   sudo cryptdisks_start cryptswap1
   sudo swapon -a

This should fix the issue, and the system should automatically have an active encrypted swap on each subsequent boot.