0

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.

1 Answers1

1

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.

Ravexina
  • 57,256