0

I want to encrypt my Ubuntu root partition. This partition currently includes the /boot folder, the swapfile and my home folder (let's call this partition sda9).

I found a solution to move my /root from sda9 folder to another partition in order to encrypt sda9 without the /boot directory.

Is it possible/ advisable to leave the swapfile and home directory inside sda9 when encrypting? Or should I encrypt them on another partition?

I want to copy a backup of sda9 back onto the encrypted drive in order to avoid formatting and preserve all my configuration.

Additional information: I have a dual boot set up with windows and Ubuntu 20.04.

2 Answers 2

0

A swapfile should not be encrypted, at least not until modern CPU support RAM encryption in hardware, otherwise an encrypted swap will significant slow down your system.

You have some options.

  1. You use an unencrypted swap-file and erase it every time your system shutdowns, this is not very safe.
  2. You don't use a swap-file at all, this is the most safe variant. (In my opinion the best choice.)
  3. You use an encrypted swap-file (not swap-partition), which is at least safer than using no encryption, but it's also very slow. You need to deactivate hibernate power state, otherwise you risk data losses.
0

"Full" Disk encryption

After making an encrypted install to USB usin the Advanced install option, I examined the results with both Disks and GParted.

enter image description here


enter image description here

The encrypted extended partition was fully encrypted. Swap is a file within this partition, (and not a partition on it's own), and thus is also encrypted.

The Boot partition is not encrypted. The disk must first be booted before it can be decrypted.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .