wiki-system/disable-encrypt-swap-partition.md

67 lines
1.1 KiB
Markdown
Raw Normal View History

2020-06-23 10:03:08 +02:00
# disable encrypt swap partition
## prerequisite
* This setup is based on [encrypt swap partition](./encrypt-swap-Ubuntu-20.04)
* all command bellow are run has root
## disable encrypt swap partition
* Turn off swap
~~~
2020-06-23 14:18:54 +02:00
swapoff /dev/mapper/cryptswap
2020-06-23 10:03:08 +02:00
~~~
* Undo the existing mapping.
~~~
cryptsetup luksClose /dev/mapper/cryptswap
~~~
* remove your encrypt swap device define in your /etc/crypttab
* ajust /etc/fstab to use your real swap partition
~~~
/dev/nvme0n1p2 none swap discard 0 0
~~~
/!\ le point ci-dessous est sans doute inutile
* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to point to your real partition
~~~
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/nvme0n1p2"
~~~
~~~
update-grub
~~~
* edit /etc/initramfs-tools/conf.d/resume. Replace the existing RESUME line with the following line.
~~~
RESUME=/dev/nvme0n1p2
~~~
Register these changes.
~~~
update-initramfs -u -k all
~~~
* make your partition a swap
~~~
mkswap /dev/nvme0n1p2
~~~
* activate swap
~~~
swapon -a
~~~
2020-06-23 14:18:54 +02:00
Next you need to reboot to enable everything and test it.