Skip to content

Instantly share code, notes, and snippets.

@rashkopetrov
Last active June 12, 2016 13:29
Show Gist options
  • Save rashkopetrov/56e54276902e74c5f1ed2fc3bea31d66 to your computer and use it in GitHub Desktop.
Save rashkopetrov/56e54276902e74c5f1ed2fc3bea31d66 to your computer and use it in GitHub Desktop.
Ubuntu -- Fix -- Fix Swap When The Home Is Encrypted

Fix Swap When The Home Is Encrypted

  1. Open: /etc/crypttab
cryptswap1 UUID={uid code 1} /dev/urandom swap,cipher=aes-cbc-essiv:sha256
cryptswap2 UUID={uid code 2} /dev/urandom swap,cipher=aes-cbc-essiv:sha256
  1. Run:
sudo mkswap -U {uid code 1} {device name, ex: /dev/dm-6, see in GParted}
  1. Add {,1024} at the end of the first line in /etc/crypttab
cryptswap1 UUID={uid code 1} /dev/urandom swap,cipher=aes-cbc-essiv:sha256,1024
  1. Run:
sudo update-initramfs -u

Reboot :)

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