This commit is contained in:
parent
1c4bcc2b7d
commit
d3b53a4d25
@ -6,7 +6,7 @@
|
||||
* install ecryptfs
|
||||
|
||||
~~~{bat}
|
||||
install apt-get install ecryptfs-utils
|
||||
root@laptop:/root# install apt-get install ecryptfs-utils
|
||||
~~~
|
||||
|
||||
## encrypt swap
|
||||
@ -14,20 +14,20 @@ install apt-get install ecryptfs-utils
|
||||
* turn off current swap
|
||||
|
||||
~~~
|
||||
swapoff -a
|
||||
root@laptop:/root# swapoff -a
|
||||
~~~
|
||||
|
||||
* encrypt swap partition
|
||||
|
||||
~~~
|
||||
cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2
|
||||
cryptsetup open /dev/nvme0n1p2 cryptswap
|
||||
root@laptop:/root# cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2
|
||||
root@laptop:/root# cryptsetup open /dev/nvme0n1p2 cryptswap
|
||||
~~~
|
||||
|
||||
* set up the crypt partition as swap.
|
||||
|
||||
~~~
|
||||
mkswap /dev/mapper/cryptswap
|
||||
root@laptop:/root# mkswap /dev/mapper/cryptswap
|
||||
~~~
|
||||
|
||||
* ajust **/etc/fstab** to use your mapper, replace your encrypt swap device like bellow :
|
||||
@ -45,19 +45,19 @@ cryptswap /dev/nvme0n1p2 none luks
|
||||
* enable swap
|
||||
|
||||
~~~
|
||||
swapon -a
|
||||
root@laptop:/root# swapon -a
|
||||
~~~
|
||||
|
||||
* edit **/etc/initramfs-tools/conf.d/resume**. Replace the existing **RESUME** line with the following line.
|
||||
|
||||
~~~
|
||||
printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume
|
||||
root@laptop:/root# printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume
|
||||
~~~
|
||||
|
||||
* Register these changes.
|
||||
|
||||
~~~
|
||||
update-initramfs -u -k all
|
||||
root@laptop:/root# update-initramfs -u -k all
|
||||
~~~
|
||||
|
||||
### to be solve
|
||||
|
Loading…
Reference in New Issue
Block a user