Skip to content

Instantly share code, notes, and snippets.

@chk1
Last active January 3, 2018 13:55
Show Gist options
  • Save chk1/093041848ef3dcfe88b8013d6c59d81c to your computer and use it in GitHub Desktop.
Save chk1/093041848ef3dcfe88b8013d6c59d81c to your computer and use it in GitHub Desktop.
Re-enabling hiberate on Ubuntu 16.04 by decrypting swap

Re-enabling hiberate on Ubuntu 16.04 by decrypting swap

You installed Ubuntu 16.04 and chose to "encrypt the /home partition", now your hibernate mode won't work.

That is because your swap partition is also encrypted now.

Steps

  1. sudo swapoff -a
  2. sudo cryptsetup remove /dev/mapper/cryptswap1
  3. sudo vim /etc/crypttab # remove the /dev/sda5 line
  4. sudo /sbin/mkswap /dev/sda5
  5. sudo swapon /dev/sda5
  6. sudo vim /etc/fstab # replace /dev/mapper/cryptswap1 with /dev/sda5
  7. sudo vim /etc/initramfs-tools/conf.d/resume # Replace the existing RESUME line with the following lineÖ: RESUME=/dev/sda5
  8. Reboot computer. Then try out hibernate mode.

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment