17From Ubuntu 17.04 we have swap file instead of partition, but if you for fully encrypted install (whole hdd and home dir) it still goes with swap partition (encrypted) This seems to be causing a lot of troubles after cold reset. So if I reinstall 17.04 with just the home dir encrypted can I make the swap file to be in it so it's protected or even tell ubuntu to not use swap at all? (having 16gb of ram and never using more than half of it)

Unecrypted swap is just a security risk I don't want to take and form the other side the encrypted one is causing too much unnecessary trouble.

  • "Unecrypted swap is just a security risk" Sorry? How so? As your system is unencrypted when you use it your problem is a non-issue. And if you do not use hibernate why even bother with a swap? – Rinzwind May 11 '17 at 20:39
  • When suspended, I believe the swap stays and everything the ram wrote to it can be read from outside? But now that I think about it, everything in the RAM stays as well? – user240891 May 12 '17 at 9:13

When you are using Ubuntu with encrypted home directory, as you should know, your files within your home directory only are accessible when you are logged in, it means when you are booting up Ubuntu tries to access a swap file which is not available at that time.

So if you want to move the swap file into your home directory, you should disable it first, check this two link for that purpose: How can I turn off swap permanently? & How do I disable swap?.

After that you can move the file, then I believe you should turn the swapping on manually each time you login to your account using swapon. Also remember if you logout, your home will be encrypted and your swap file will not be accessible anymore.

If you don't want to encrypt everything then just consider enabling home encryption, disabling swap file and creating a swap partition and encrypting it using luks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.