0

i've activated "Use LVM with the new Ubuntu installation" and then "Encrypt the new Ubuntu installation for security" during my Ubuntu 20.04 installation. But is the swap partition encrypted too ? How can i check it ?

Is this kind of encryption safe ?

If the swap file is to small, doese ubuntu create any other unencrypted file or something what is a security risk ?

Thats my output for lsblk

NAME                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                                            /snap/core18/1944
loop1                   7:1    0  64,8M  1 loop  /snap/gtk-common-themes/1514
loop2                   7:2    0    51M  1 loop  /snap/snap-store/518
loop3                   7:3    0   219M  1 loop  /snap/gnome-3-34-1804/66
loop4                   7:4    0  55,5M  1 loop  /snap/core18/1988
loop5                   7:5    0  31,1M  1 loop  /snap/snapd/10707
loop6                   7:6    0  62,1M  1 loop  /snap/gtk-common-themes/1506
loop7                   7:7    0 255,6M  1 loop  /snap/gnome-3-34-1804/36
loop8                   7:8    0  49,8M  1 loop  /snap/snap-store/467
loop9                   7:9    0  32,3M  1 loop  /snap/snapd/11107
sda                     8:0    0 465,8G  0 disk  
├─sda1                  8:1    0   512M  0 part  /boot/efi
├─sda2                  8:2    0     1K  0 part  
├─sda5                  8:5    0   731M  0 part  /boot
└─sda6                  8:6    0 464,6G  0 part  
  └─sda6_crypt        253:0    0 464,5G  0 crypt 
    ├─vgubuntu-root   253:1    0 463,6G  0 lvm   /
    └─vgubuntu-swap_1 253:2    0   980M  0 lvm   [SWAP]
sr0                    11:0    1  1024M  0 rom   
1
  • 1
    Everything within sda6_crypt is encrypted. Including the swap. It's safe from prying eyes if somebody steals the physical drive. Of course, that's only one way of stealing your data. The extra complexity of encryption means that backups are highly recommended, lest your data become safely protected from you, too. – user535733 Mar 14 at 15:30
0

In your setup, yes, it is encrypted.

You can tell by this part of your lsblk output:

sda                     8:0    0 465,8G  0 disk  
└─sda6                  8:6    0 464,6G  0 part  
  └─sda6_crypt        253:0    0 464,5G  0 crypt 
    └─vgubuntu-swap_1 253:2    0   980M  0 lvm   [SWAP]

So your swap space is an LVM logical volume in an encrypted LVM volume group.

As for "is it safe?" I would say clearly yes; but like everything that has to do with encryption, with enough computing power and resources, everything can be cracked. But we are talking NSA-level resources here, not anything that your neighbourhood script kiddie has at his disposal.

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.