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