Comment 3 for bug 1490824

Revision history for this message
GizmoChicken (gizmochicken) wrote :

Now that Ubuntu uses a swap file instead of a swap partition, this bug should be less of an issue for most users. But for when a swap partition, rather then a swap file, is truly needed (for example, when using a swap file unfriendly file system, like btrfs), here's a work around:

Before installing your system, create an additional partition for swap using gparted.

Then, during system installation, create a LUKS-encrypted volume on that partition, but do NOT format the volume as swap. (Last time I tried, swap, even if within a LUKS volume, blocked installation.) Rather, during installation, format the extra LUKS volume as ext4 or btrfs, but leave it otherwise unused.

After Ubuntu is installed, reformat the file system within the LUKS volume to swap, and then adjust fstab and crypttab as needed.

Using this work around, swap will be protected within its own LUKS volume. But again, unless a swap partition is truly needed, using a swap file may be an easier approach.