wiki-system/disable-encrypt-swap-partition.md
2020-06-24 09:01:52 +02:00

1.1 KiB

disable encrypt swap partition

prerequisite

disable encrypt swap partition

  • Turn off swap
swapoff /dev/mapper/cryptswap
  • 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
  • make your partition a swap
mkswap /dev/nvme0n1p2
  • activate swap
swapon -a

/!\ 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
  • remove file /etc/initramfs-tools/conf.d/resume
rm /etc/initramfs-tools/conf.d/resume

Register these changes.

update-initramfs -u -k all

Next you need to reboot to enable everything and test it.