This commit is contained in:
parent
311ace56f1
commit
f434801791
@ -1,66 +1,66 @@
|
|||||||
# disable encrypt swap partition
|
# disable encrypt swap partition
|
||||||
|
|
||||||
## prerequisite
|
## prerequisite
|
||||||
|
|
||||||
* This setup is based on [encrypt swap partition](./encrypt-swap-Ubuntu-20.04)
|
* This setup is based on [encrypt swap partition](./encrypt-swap-Ubuntu-20.04)
|
||||||
* all command bellow are run has root
|
* all command bellow are run has root
|
||||||
|
|
||||||
## disable encrypt swap partition
|
## disable encrypt swap partition
|
||||||
|
|
||||||
* Turn off swap
|
* Turn off swap
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
swapoff /dev/mapper/cryptswap
|
swapoff /dev/mapper/cryptswap
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* Undo the existing mapping.
|
* Undo the existing mapping.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
cryptsetup luksClose /dev/mapper/cryptswap
|
cryptsetup luksClose /dev/mapper/cryptswap
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* remove your encrypt swap device define in your /etc/crypttab
|
* remove your encrypt swap device define in your **/etc/crypttab**
|
||||||
|
|
||||||
* ajust /etc/fstab to use your real swap partition
|
* ajust **/etc/fstab** to use your real swap partition
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
/dev/nvme0n1p2 none swap discard 0 0
|
/dev/nvme0n1p2 none swap discard 0 0
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
/!\ le point ci-dessous est sans doute inutile
|
* make your partition a swap
|
||||||
|
|
||||||
* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to point to your real partition
|
~~~
|
||||||
|
mkswap /dev/nvme0n1p2
|
||||||
~~~
|
~~~
|
||||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/nvme0n1p2"
|
|
||||||
~~~
|
* activate swap
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
update-grub
|
swapon -a
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* edit /etc/initramfs-tools/conf.d/resume. Replace the existing RESUME line with the following line.
|
/!\ le point ci-dessous est sans doute inutile
|
||||||
|
|
||||||
~~~
|
* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to point to your real partition
|
||||||
RESUME=/dev/nvme0n1p2
|
|
||||||
~~~
|
~~~
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/nvme0n1p2"
|
||||||
Register these changes.
|
~~~
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
update-initramfs -u -k all
|
update-grub
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* make your partition a swap
|
* edit /etc/initramfs-tools/conf.d/resume. Replace the existing RESUME line with the following line.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
mkswap /dev/nvme0n1p2
|
RESUME=/dev/nvme0n1p2
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
* activate swap
|
Register these changes.
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
swapon -a
|
update-initramfs -u -k all
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Next you need to reboot to enable everything and test it.
|
Next you need to reboot to enable everything and test it.
|
||||||
|
Loading…
Reference in New Issue
Block a user