From 5ae9b1e3ccbe08523f382a0e008efc4962172fa1 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 10:04:02 +0200 Subject: [PATCH] --- disable-encrypt-swap-partition.md | 130 +++++++++++++++--------------- 1 file changed, 64 insertions(+), 66 deletions(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index 05bab7a..11cde25 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -1,66 +1,64 @@ -% This is my title - -# 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 - -~~~ -swapoff /dev/mapper/cryptswap1 -~~~ - -* 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 -~~~ +# 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 + +~~~ +swapoff /dev/mapper/cryptswap1 +~~~ + +* 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 +~~~