How to fix unavailable swap problem after fresh installation of Ubuntu 14.04 with Home Encryption

This is a bug which makes the UUID unreadable in the /etc/crypttab and accordingly no swap will be read and used by the system, which is unacceptable of course.

In order to solve this problem, all you have to do is the following:

  1. Determine which partition is your swap partition: “sudo fdisk -l”, check the line that looks like this:
    /dev/sda6       617330688   625141759     3905536   82  Linux swap / Solariswhich means that “/dev/sda6” is your swap partition
  2. Take a backup of your /etc/crypttab file: “sudo cp /etc/crypttab /etc/crypttab.orig”
  3. Modify the /etc/crypttab file to replace the UUID with the old-style partition way, for example change from this:
    cryptswap1 UUID=32504c50-3336-42fa-813f-f412050ce2f7 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
    to this:
    cryptswap1 /dev/sda6 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
  4. Save the file and restart
  5. Enjoy!🙂

Source: http://ubuntuforums.org/showthread.php?t=2221067

About SoCRaT

Software Engineer, OSS & Linux Geek
This entry was posted in Uncategorized and tagged , , , , , , . Bookmark the permalink.

2 Responses to How to fix unavailable swap problem after fresh installation of Ubuntu 14.04 with Home Encryption

  1. Fredrik says:

    I needed to run

    sudo update-initramfs -u

    after modifying /etc/crypttab to get encrypted swap to work

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s