From dff33fe2a2133943f87921aa3252e017f6915774 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 06:34:06 +0200 Subject: [PATCH 01/51] --- encrypt-swap-Ubuntu.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 encrypt-swap-Ubuntu.md diff --git a/encrypt-swap-Ubuntu.md b/encrypt-swap-Ubuntu.md new file mode 100644 index 0000000..1f576c2 --- /dev/null +++ b/encrypt-swap-Ubuntu.md @@ -0,0 +1 @@ +Bienvenue sur le Wiki. \ No newline at end of file From c543d1821f9f1dc3aca56b31bf92d81efd84cab1 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 06:34:25 +0200 Subject: [PATCH 02/51] --- encrypt-swap-Ubuntu.md => encrypt-swap-Ubuntu-20.04.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename encrypt-swap-Ubuntu.md => encrypt-swap-Ubuntu-20.04.md (100%) diff --git a/encrypt-swap-Ubuntu.md b/encrypt-swap-Ubuntu-20.04.md similarity index 100% rename from encrypt-swap-Ubuntu.md rename to encrypt-swap-Ubuntu-20.04.md From fcc994093bbd3a86748d979ed5eccb5d9ce3480c Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 06:35:25 +0200 Subject: [PATCH 03/51] --- ...bernation-Ubuntu-20.04-full-ZFS-install.md | 93 ------------------- 1 file changed, 93 deletions(-) diff --git a/right-fit-swap-for-laptop-hibernation-Ubuntu-20.04-full-ZFS-install.md b/right-fit-swap-for-laptop-hibernation-Ubuntu-20.04-full-ZFS-install.md index 9c26b97..8789a92 100644 --- a/right-fit-swap-for-laptop-hibernation-Ubuntu-20.04-full-ZFS-install.md +++ b/right-fit-swap-for-laptop-hibernation-Ubuntu-20.04-full-ZFS-install.md @@ -98,99 +98,6 @@ HandleSuspendKey=suspend-then-hibernate HandleLidSwitch=suspend-then-hibernate ~~~ -## encrypt swap partition - -sources : -* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) -* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) - -~~~ -apt-get install ecryptfs-utils -swapoff -a -cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 -cryptsetup open /dev/ swapDevice -mkswap /dev/mapper/mkswap /dev/mapper/swapDevice -~~~ - -edit : /etc/default/grub - -~~~ -GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/mapper/swapDevice" -~~~ - -~~~ -update-grub -~~~ - -Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : - -~~~ -/dev/nvme0n1p2 none swap discard 0 0 -~~~ - -remove your encrypt swap device define in /etc/crypttab - -~~~ -swapDevice /dev/nvme0n1p2 none luks -~~~ - -~~~ -swapon -a -~~~ - -Register these changes. - -~~~ -update-initramfs -u -k all -~~~ - -## disable encrypt swap partition - -* Turn off swap - -~~~ -swapoff /dev/mapper/cryptswap1 -~~~ - -* 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 -~~~ - -* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to - -~~~ -GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/nvme0n1p2" -~~~ - -* edit /etc/initramfs-tools/conf.d/resume. Replace the existing RESUME line with the following line. - -~~~ -RESUME=/dev/nvme0n1p2 -~~~ - -* make your partition a swap - -~~~ -mkswap /dev/nvme0n1p2 -~~~ - -* activate swap - -~~~ -swapon -a -~~~ - -### to be solve - -~~~ -cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... -cryptsetup: WARNING: Couln't determine root device -~~~ - ## xfce4-power-manager suspend to hibernate option source : [docs.xfce.org - Frequently Asked Questions - Xfce4 Power Manager](https://docs.xfce.org/xfce/xfce4-power-manager/faq) From 7192f540f70449af37a5cfd9b3c188b32ae41d76 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 06:35:36 +0200 Subject: [PATCH 04/51] --- encrypt-swap-Ubuntu-20.04.md | 93 +++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 1f576c2..9dc501d 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -1 +1,92 @@ -Bienvenue sur le Wiki. \ No newline at end of file +## encrypt swap partition + +sources : +* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) +* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) + +~~~ +apt-get install ecryptfs-utils +swapoff -a +cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 +cryptsetup open /dev/ swapDevice +mkswap /dev/mapper/mkswap /dev/mapper/swapDevice +~~~ + +edit : /etc/default/grub + +~~~ +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/mapper/swapDevice" +~~~ + +~~~ +update-grub +~~~ + +Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : + +~~~ +/dev/nvme0n1p2 none swap discard 0 0 +~~~ + +remove your encrypt swap device define in /etc/crypttab + +~~~ +swapDevice /dev/nvme0n1p2 none luks +~~~ + +~~~ +swapon -a +~~~ + +Register these changes. + +~~~ +update-initramfs -u -k all +~~~ + +## disable encrypt swap partition + +* Turn off swap + +~~~ +swapoff /dev/mapper/cryptswap1 +~~~ + +* 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 +~~~ + +* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to + +~~~ +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/nvme0n1p2" +~~~ + +* edit /etc/initramfs-tools/conf.d/resume. Replace the existing RESUME line with the following line. + +~~~ +RESUME=/dev/nvme0n1p2 +~~~ + +* make your partition a swap + +~~~ +mkswap /dev/nvme0n1p2 +~~~ + +* activate swap + +~~~ +swapon -a +~~~ + +### to be solve + +~~~ +cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... +cryptsetup: WARNING: Couln't determine root device +~~~ \ No newline at end of file From dc6122c3683cbbe924303417f15c601ac85aa52c Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 06:35:50 +0200 Subject: [PATCH 05/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 9dc501d..c94b149 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -84,7 +84,7 @@ mkswap /dev/nvme0n1p2 swapon -a ~~~ -### to be solve +## to be solve ~~~ cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... From 9f26e70e8cb0875ccf6c61bfdf6e4349902e11a8 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 06:40:59 +0200 Subject: [PATCH 06/51] --- encrypt-swap-Ubuntu-20.04.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index c94b149..4eb844a 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -66,12 +66,22 @@ swapoff /dev/mapper/cryptswap1 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 ~~~ @@ -84,6 +94,8 @@ mkswap /dev/nvme0n1p2 swapon -a ~~~ + + ## to be solve ~~~ From 52a8c10954f626957dd17ec42c29a771b2097b99 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 06:59:24 +0200 Subject: [PATCH 07/51] --- encrypt-swap-Ubuntu-20.04.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 4eb844a..d88c787 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -9,13 +9,13 @@ apt-get install ecryptfs-utils swapoff -a cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 cryptsetup open /dev/ swapDevice -mkswap /dev/mapper/mkswap /dev/mapper/swapDevice +mkswap /dev/mapper/mkswap /dev/mapper/cryptswap ~~~ edit : /etc/default/grub ~~~ -GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/mapper/swapDevice" +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUUUUUU" ~~~ ~~~ @@ -25,13 +25,13 @@ update-grub Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : ~~~ -/dev/nvme0n1p2 none swap discard 0 0 +/dev/mapper/cryptswap none swap discard 0 0 ~~~ -remove your encrypt swap device define in /etc/crypttab +add your encrypt swap device define in /etc/crypttab ~~~ -swapDevice /dev/nvme0n1p2 none luks +cryptswap /dev/nvme0n1p2 none luks ~~~ ~~~ From 1d1c0d84e65b227c629e7be037dd82342f17f011 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 06:59:45 +0200 Subject: [PATCH 08/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index d88c787..25ad707 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -8,7 +8,7 @@ sources : apt-get install ecryptfs-utils swapoff -a cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 -cryptsetup open /dev/ swapDevice +cryptsetup open /dev/ cryptswap mkswap /dev/mapper/mkswap /dev/mapper/cryptswap ~~~ From 68e07d570327b5ca03275b94d4c7c1dc10c8fbf1 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 07:00:42 +0200 Subject: [PATCH 09/51] --- encrypt-swap-Ubuntu-20.04.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 25ad707..4ee8fb3 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -44,6 +44,13 @@ Register these changes. update-initramfs -u -k all ~~~ +### to be solve + +~~~ +cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... +cryptsetup: WARNING: Couln't determine root device +~~~ + ## disable encrypt swap partition * Turn off swap @@ -92,13 +99,4 @@ mkswap /dev/nvme0n1p2 ~~~ swapon -a -~~~ - - - -## to be solve - -~~~ -cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... -cryptsetup: WARNING: Couln't determine root device ~~~ \ No newline at end of file From 13aa7a28d9547c32f487432c5c560c0732c14e1c Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 09:42:29 +0200 Subject: [PATCH 10/51] /// --- encrypt-swap-Ubuntu-20.04.md | 212 ++++++++++++++++++----------------- 1 file changed, 110 insertions(+), 102 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 4ee8fb3..992bb33 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -1,102 +1,110 @@ -## encrypt swap partition - -sources : -* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) -* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) - -~~~ -apt-get install ecryptfs-utils -swapoff -a -cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 -cryptsetup open /dev/ cryptswap -mkswap /dev/mapper/mkswap /dev/mapper/cryptswap -~~~ - -edit : /etc/default/grub - -~~~ -GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUUUUUU" -~~~ - -~~~ -update-grub -~~~ - -Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : - -~~~ -/dev/mapper/cryptswap none swap discard 0 0 -~~~ - -add your encrypt swap device define in /etc/crypttab - -~~~ -cryptswap /dev/nvme0n1p2 none luks -~~~ - -~~~ -swapon -a -~~~ - -Register these changes. - -~~~ -update-initramfs -u -k all -~~~ - -### to be solve - -~~~ -cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... -cryptsetup: WARNING: Couln't determine root device -~~~ - -## disable encrypt swap partition - -* Turn off swap - -~~~ -swapoff /dev/mapper/cryptswap1 -~~~ - -* 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 -~~~ - -* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to - -~~~ -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 -~~~ \ No newline at end of file +## encrypt swap partition + +sources : +* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) +* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) + +~~~ +apt-get install ecryptfs-utils +swapoff -a +cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 +cryptsetup open /dev/ cryptswap +mkswap /dev/mapper/cryptswap +Configure l'espace d'échange (swap) en version 1, taille = 31,1 GiB (33420210176 octets) +pas d'étiquette, UUID=4fd1ffc-6d5b-450a-9737-abf1ffb80b1 +~~~ + +edit : /etc/default/grub + +~~~ +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=4fd1ffc-6d5b-450a-9737-abf1ffb80b1" +~~~ + +~~~ +update-grub +~~~ + +Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : + +~~~ +/dev/mapper/cryptswap none swap discard 0 0 +~~~ + +add your encrypt swap device define in /etc/crypttab + +~~~ +cryptswap /dev/nvme0n1p2 none luks +~~~ + +~~~ +swapon -a +~~~ + +/!\ ici faut trouver comment on recupere le blkid de la partition swap + +~~~ +printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume +~~~ + +Register these changes. + +~~~ +update-initramfs -u -k all +~~~ + +### to be solve + +~~~ +cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... +cryptsetup: WARNING: Couln't determine root device +~~~ + +## disable encrypt swap partition + +* Turn off swap + +~~~ +swapoff /dev/mapper/cryptswap1 +~~~ + +* 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 +~~~ + +* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to + +~~~ +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 +~~~ From 6eb05dc269809820a752fd8c7c88fd97e64c9016 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 09:44:28 +0200 Subject: [PATCH 11/51] suppression affichage inutile et wanig resolu --- encrypt-swap-Ubuntu-20.04.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 992bb33..6424bc2 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -10,8 +10,6 @@ swapoff -a cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 cryptsetup open /dev/ cryptswap mkswap /dev/mapper/cryptswap -Configure l'espace d'échange (swap) en version 1, taille = 31,1 GiB (33420210176 octets) -pas d'étiquette, UUID=4fd1ffc-6d5b-450a-9737-abf1ffb80b1 ~~~ edit : /etc/default/grub @@ -40,8 +38,6 @@ cryptswap /dev/nvme0n1p2 none luks swapon -a ~~~ -/!\ ici faut trouver comment on recupere le blkid de la partition swap - ~~~ printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume ~~~ From 0c976ae037077ebbcbca8770d6aab28076ff046c Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 09:56:22 +0200 Subject: [PATCH 12/51] ajustement apres comprehension initramfs /etc/default/greu resume --- encrypt-swap-Ubuntu-20.04.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 6424bc2..a5bbde0 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -12,10 +12,12 @@ cryptsetup open /dev/ cryptswap mkswap /dev/mapper/cryptswap ~~~ -edit : /etc/default/grub +/!\ le point ci-dessous est sans doute inutile + +* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to remove resume part wich is now manage by initramfs ~~~ -GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=4fd1ffc-6d5b-450a-9737-abf1ffb80b1" +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" ~~~ ~~~ @@ -63,6 +65,12 @@ cryptsetup: WARNING: Couln't determine root device 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 @@ -71,7 +79,9 @@ swapoff /dev/mapper/cryptswap1 /dev/nvme0n1p2 none swap discard 0 0 ~~~ -* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to +/!\ 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" From f22a993dc65915ef4c2b13d1d12d2f9a5e6ca0bc Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 09:59:32 +0200 Subject: [PATCH 13/51] --- encrypt-swap-Ubuntu-20.04.md | 174 ++++++++++++----------------------- 1 file changed, 58 insertions(+), 116 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index a5bbde0..851b762 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -1,116 +1,58 @@ -## encrypt swap partition - -sources : -* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) -* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) - -~~~ -apt-get install ecryptfs-utils -swapoff -a -cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 -cryptsetup open /dev/ cryptswap -mkswap /dev/mapper/cryptswap -~~~ - -/!\ le point ci-dessous est sans doute inutile - -* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to remove resume part wich is now manage by initramfs - -~~~ -GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" -~~~ - -~~~ -update-grub -~~~ - -Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : - -~~~ -/dev/mapper/cryptswap none swap discard 0 0 -~~~ - -add your encrypt swap device define in /etc/crypttab - -~~~ -cryptswap /dev/nvme0n1p2 none luks -~~~ - -~~~ -swapon -a -~~~ - -~~~ -printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume -~~~ - -Register these changes. - -~~~ -update-initramfs -u -k all -~~~ - -### to be solve - -~~~ -cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... -cryptsetup: WARNING: Couln't determine root device -~~~ - -## 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 -~~~ +## encrypt swap partition + +sources : +* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) +* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) + +~~~ +apt-get install ecryptfs-utils +swapoff -a +cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 +cryptsetup open /dev/ cryptswap +mkswap /dev/mapper/cryptswap +~~~ + +/!\ le point ci-dessous est sans doute inutile + +* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to remove resume part wich is now manage by initramfs + +~~~ +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" +~~~ + +~~~ +update-grub +~~~ + +Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : + +~~~ +/dev/mapper/cryptswap none swap discard 0 0 +~~~ + +add your encrypt swap device define in /etc/crypttab + +~~~ +cryptswap /dev/nvme0n1p2 none luks +~~~ + +~~~ +swapon -a +~~~ + +~~~ +printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume +~~~ + +Register these changes. + +~~~ +update-initramfs -u -k all +~~~ + +### to be solve + +~~~ +cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... +cryptsetup: WARNING: Couln't determine root device +~~~ \ No newline at end of file From 29934bc86eb051277bdab264f1ef5307dec0efb3 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 09:59:47 +0200 Subject: [PATCH 14/51] --- disable-encrypt-swap-partition.md | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 disable-encrypt-swap-partition.md diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md new file mode 100644 index 0000000..3ba9d80 --- /dev/null +++ b/disable-encrypt-swap-partition.md @@ -0,0 +1,57 @@ +## 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 +~~~ From bde59ea303492e2f44cb735b6db69cee44758fef Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 10:03:08 +0200 Subject: [PATCH 15/51] add title ans prerequis --- disable-encrypt-swap-partition.md | 123 ++++++++++++++++-------------- 1 file changed, 66 insertions(+), 57 deletions(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index 3ba9d80..05bab7a 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -1,57 +1,66 @@ -## 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 -~~~ +% 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 +~~~ From 5ae9b1e3ccbe08523f382a0e008efc4962172fa1 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 10:04:02 +0200 Subject: [PATCH 16/51] --- 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 +~~~ From 60e43d7fd222973d8da74a1c536e0bbe67c47693 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Tue, 23 Jun 2020 14:18:54 +0200 Subject: [PATCH 17/51] ... --- Unbuntu-20.04-encrypt-ZFS-install.md | 153 ++++++++++++++------------- disable-encrypt-swap-partition.md | 4 +- encrypt-swap-Ubuntu-20.04.md | 120 +++++++++++---------- 3 files changed, 142 insertions(+), 135 deletions(-) diff --git a/Unbuntu-20.04-encrypt-ZFS-install.md b/Unbuntu-20.04-encrypt-ZFS-install.md index 6da010a..22f8102 100644 --- a/Unbuntu-20.04-encrypt-ZFS-install.md +++ b/Unbuntu-20.04-encrypt-ZFS-install.md @@ -1,76 +1,77 @@ -source : [Linsomniac's Articles - Encrypting ZFS on Ubuntu 20.04](https://linsomniac.gitlab.io/post/2020-04-09-ubuntu-2004-encrypted-zfs/) -# encrypt - Unbuntu 20.04 full ZFS install -Here we are going to install Ubuntu 20.04 in **almost** full zfs updating **zsys-setup** to permit **zfs encryption**. Read bellow articles to understand why 2 differerent pools and full implementation. - -* [ZFS focus on Ubuntu 20.04 LTS: what’s new?](https://didrocks.fr/2020/05/21/zfs-focus-on-ubuntu-20.04-lts-whats-new/) -* [ZFS focus on Ubuntu 20.04 LTS: ZSys general presentation](https://didrocks.fr/2020/05/26/zfs-focus-on-ubuntu-20.04-lts-zsys-general-presentation/) -* [ZFS focus on Ubuntu 20.04 LTS: ZSys sate management](https://didrocks.fr/2020/05/28/zfs-focus-on-ubuntu-20.04-lts-zsys-general-principle-on-state-management/) -* [ZFS focus on Ubuntu 20.04 LTS: ZSys commands for state management](https://didrocks.fr/2020/06/02/zfs-focus-on-ubuntu-20.04-lts-zsys-commands-for-state-management/) -* [ZFS focus on Ubuntu 20.04 LTS: ZSys state collection](https://didrocks.fr/2020/06/04/zfs-focus-on-ubuntu-20.04-lts-zsys-state-collection/) -* [ZFS focus on Ubuntu 20.04 LTS: ZSys for system administrators](https://didrocks.fr/2020/06/09/zfs-focus-on-ubuntu-20.04-lts-zsys-for-system-administrators/) -* [ZFS focus on Ubuntu 20.04 LTS: ZSys partition layout](https://didrocks.fr/2020/06/11/zfs-focus-on-ubuntu-20.04-lts-zsys-partition-layout/) -* [ZFS focus on Ubuntu 20.04 LTS: ZSys dataset layout](https://didrocks.fr/2020/06/16/zfs-focus-on-ubuntu-20.04-lts-zsys-dataset-layout/) -* [ZFS focus on Ubuntu 20.04 LTS: ZSys properties on ZFS datasets](https://didrocks.fr/2020/06/19/zfs-focus-on-ubuntu-20.04-lts-zsys-properties-on-zfs-datasets/) - -## initial boot and ssh -Boot the Ubuntu 20.04 Desktop installer/live CD. -Click the “Try Ubuntu” button. -launch a terminal. - -set a passwd to root to permit remote ssh - -~~~ -$ sudo su -## passwd -New password : -Retype new passord : -passwd: password updated successfully -~~~ - -Install ssh to simplfy configuration edit. - -~~~ -## apt install ssh -~~~ - -Edit **/etc/ssh/sshd_config** to **Enable PermitRootLogin** change *prohibit-password* to *yes* like bellow. - -~~~{.shell} -#PermitRootLogin prohibit-password -PermitRootLogin yes -~~~ - -~~~ -service ssh restart -~~~ - -find yout IP with : *ip a* - -then connect remotely with : *ssh* - -## update zsys-setup to enable zfs encyption on rpool - -bpool remain unencrypt. - -Search for “zpool create”, and make sure you have found the create command that has “rpool” on the last line. -Before the “zpool create” insert: echo MYPASSWORD | -Before the last line of the command insert these lines: - -~~~{.cpp} --O recordsize=1M \ --O encryption=aes-256-gcm \ --O keylocation=prompt \ --O keyformat=passphrase \ -~~~ - -## swap - -you may be interrested if you are on a laptop in : [right fit swap for laptop hibernation Ubuntu 20.04 full ZFS install](right-fit-swap-for-laptop-hibernation-Ubuntu-20.04-full-ZFS-install) - -## start installation - -Run ubiquity to start the installer and install as normal, selecting “Use entire disk” and the option to use ZFS. - -## questions to be solves - -* what happen if zpool passwd is not given at boot shutdown ? \ No newline at end of file +source : [Linsomniac's Articles - Encrypting ZFS on Ubuntu 20.04](https://linsomniac.gitlab.io/post/2020-04-09-ubuntu-2004-encrypted-zfs/) +# encrypt - Unbuntu 20.04 full ZFS install +Here we are going to install Ubuntu 20.04 in **almost** full zfs updating **zsys-setup** to permit **zfs encryption**. Read bellow articles to understand why 2 differerent pools and full implementation. + +* [ZFS focus on Ubuntu 20.04 LTS: what’s new?](https://didrocks.fr/2020/05/21/zfs-focus-on-ubuntu-20.04-lts-whats-new/) +* [ZFS focus on Ubuntu 20.04 LTS: ZSys general presentation](https://didrocks.fr/2020/05/26/zfs-focus-on-ubuntu-20.04-lts-zsys-general-presentation/) +* [ZFS focus on Ubuntu 20.04 LTS: ZSys sate management](https://didrocks.fr/2020/05/28/zfs-focus-on-ubuntu-20.04-lts-zsys-general-principle-on-state-management/) +* [ZFS focus on Ubuntu 20.04 LTS: ZSys commands for state management](https://didrocks.fr/2020/06/02/zfs-focus-on-ubuntu-20.04-lts-zsys-commands-for-state-management/) +* [ZFS focus on Ubuntu 20.04 LTS: ZSys state collection](https://didrocks.fr/2020/06/04/zfs-focus-on-ubuntu-20.04-lts-zsys-state-collection/) +* [ZFS focus on Ubuntu 20.04 LTS: ZSys for system administrators](https://didrocks.fr/2020/06/09/zfs-focus-on-ubuntu-20.04-lts-zsys-for-system-administrators/) +* [ZFS focus on Ubuntu 20.04 LTS: ZSys partition layout](https://didrocks.fr/2020/06/11/zfs-focus-on-ubuntu-20.04-lts-zsys-partition-layout/) +* [ZFS focus on Ubuntu 20.04 LTS: ZSys dataset layout](https://didrocks.fr/2020/06/16/zfs-focus-on-ubuntu-20.04-lts-zsys-dataset-layout/) +* [ZFS focus on Ubuntu 20.04 LTS: ZSys properties on ZFS datasets](https://didrocks.fr/2020/06/19/zfs-focus-on-ubuntu-20.04-lts-zsys-properties-on-zfs-datasets/) + +## initial boot and ssh +Boot the Ubuntu 20.04 Desktop installer/live CD. +Click the “Try Ubuntu” button. +launch a terminal. + +set a passwd to root to permit remote ssh + +~~~ +$ sudo su +## passwd +New password : +Retype new passord : +passwd: password updated successfully +~~~ + +Install ssh to simplfy configuration edit. + +~~~ +## apt install ssh +~~~ + +Edit **/etc/ssh/sshd_config** to **Enable PermitRootLogin** change *prohibit-password* to *yes* like bellow. + +~~~{.shell} +#PermitRootLogin prohibit-password +PermitRootLogin yes +~~~ + +~~~ +service ssh restart +~~~ + +find yout IP with : *ip a* + +then connect remotely with : *ssh* + +## update zsys-setup to enable zfs encyption on rpool + +bpool remain unencrypt. + +Search for “zpool create”, and make sure you have found the create command that has “rpool” on the last line. +Before the “zpool create” insert: echo MYPASSWORD | +Before the last line of the command insert these lines: + +~~~{.cpp} +-O recordsize=1M \ +-O encryption=aes-256-gcm \ +-O keylocation=prompt \ +-O keyformat=passphrase \ +~~~ + +## swap + +you may be interrested if you are on a laptop in : [right fit swap for laptop hibernation Ubuntu 20.04 full ZFS install](right-fit-swap-for-laptop-hibernation-Ubuntu-20.04-full-ZFS-install) + +## start installation + +Run ubiquity to start the installer and install as normal, selecting “Use entire disk” and the option to use ZFS. + +## questions to be solves + +* what happen if zpool passwd is not given at boot shutdown ? +* find a way to shut it down pass a delay diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index 05bab7a..fa12bee 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -12,7 +12,7 @@ * Turn off swap ~~~ -swapoff /dev/mapper/cryptswap1 +swapoff /dev/mapper/cryptswap ~~~ * Undo the existing mapping. @@ -64,3 +64,5 @@ mkswap /dev/nvme0n1p2 ~~~ swapon -a ~~~ + +Next you need to reboot to enable everything and test it. diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 851b762..022cffb 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -1,58 +1,62 @@ -## encrypt swap partition - -sources : -* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) -* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) - -~~~ -apt-get install ecryptfs-utils -swapoff -a -cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 -cryptsetup open /dev/ cryptswap -mkswap /dev/mapper/cryptswap -~~~ - -/!\ le point ci-dessous est sans doute inutile - -* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to remove resume part wich is now manage by initramfs - -~~~ -GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" -~~~ - -~~~ -update-grub -~~~ - -Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : - -~~~ -/dev/mapper/cryptswap none swap discard 0 0 -~~~ - -add your encrypt swap device define in /etc/crypttab - -~~~ -cryptswap /dev/nvme0n1p2 none luks -~~~ - -~~~ -swapon -a -~~~ - -~~~ -printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume -~~~ - -Register these changes. - -~~~ -update-initramfs -u -k all -~~~ - -### to be solve - -~~~ -cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... -cryptsetup: WARNING: Couln't determine root device -~~~ \ No newline at end of file +## prerequisite + +* all command bellow are run has root + +## encrypt swap partition + +sources : +* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) +* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) + +~~~ +apt-get install ecryptfs-utils +swapoff -a +cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 +cryptsetup open /dev/nvme0n1p2 cryptswap +mkswap /dev/mapper/cryptswap +~~~ + +/!\ le point ci-dessous est sans doute inutile + +* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to remove resume part wich is now manage by initramfs + +~~~ +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" +~~~ + +~~~ +update-grub +~~~ + +Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : + +~~~ +/dev/mapper/cryptswap none swap discard 0 0 +~~~ + +add your encrypt swap device define in /etc/crypttab + +~~~ +cryptswap /dev/nvme0n1p2 none luks +~~~ + +~~~ +swapon -a +~~~ + +~~~ +printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume +~~~ + +Register these changes. + +~~~ +update-initramfs -u -k all +~~~ + +### to be solve + +~~~ +cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... +cryptsetup: WARNING: Couln't determine root device +~~~ From c6ab075879a34c3bf8dfbb3c17725f476e596132 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:19:39 +0200 Subject: [PATCH 18/51] remove grub config not needed --- encrypt-swap-Ubuntu-20.04.md | 112 ++++++++++++++++------------------- 1 file changed, 50 insertions(+), 62 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 022cffb..79debd7 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -1,62 +1,50 @@ -## prerequisite - -* all command bellow are run has root - -## encrypt swap partition - -sources : -* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) -* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) - -~~~ -apt-get install ecryptfs-utils -swapoff -a -cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 -cryptsetup open /dev/nvme0n1p2 cryptswap -mkswap /dev/mapper/cryptswap -~~~ - -/!\ le point ci-dessous est sans doute inutile - -* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to remove resume part wich is now manage by initramfs - -~~~ -GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" -~~~ - -~~~ -update-grub -~~~ - -Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : - -~~~ -/dev/mapper/cryptswap none swap discard 0 0 -~~~ - -add your encrypt swap device define in /etc/crypttab - -~~~ -cryptswap /dev/nvme0n1p2 none luks -~~~ - -~~~ -swapon -a -~~~ - -~~~ -printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume -~~~ - -Register these changes. - -~~~ -update-initramfs -u -k all -~~~ - -### to be solve - -~~~ -cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... -cryptsetup: WARNING: Couln't determine root device -~~~ +## prerequisite + +* all command bellow are run has root + +## encrypt swap partition + +sources : +* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) +* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) + +~~~ +apt-get install ecryptfs-utils +swapoff -a +cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 +cryptsetup open /dev/nvme0n1p2 cryptswap +mkswap /dev/mapper/cryptswap +~~~ + +Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : + +~~~ +/dev/mapper/cryptswap none swap discard 0 0 +~~~ + +add your encrypt swap device define in /etc/crypttab + +~~~ +cryptswap /dev/nvme0n1p2 none luks +~~~ + +~~~ +swapon -a +~~~ + +~~~ +printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume +~~~ + +Register these changes. + +~~~ +update-initramfs -u -k all +~~~ + +### to be solve + +~~~ +cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... +cryptsetup: WARNING: Couln't determine root device +~~~ From 3c1eaed54cc8b609281468b81ee86b54ae10a854 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:25:41 +0200 Subject: [PATCH 19/51] un peut de mise en page / ajout descriptifs --- encrypt-swap-Ubuntu-20.04.md | 42 +++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 79debd7..d97aae2 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -1,42 +1,60 @@ +# encrypt swap Ubuntu 20.04 with hibernation + ## prerequisite * all command bellow are run has root - -## encrypt swap partition - -sources : -* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) -* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) +* install ecryptfs + +~~~ +install apt-get install ecryptfs-utils +~~~ + +## encrypt swap + +* turn off current swap ~~~ -apt-get install ecryptfs-utils swapoff -a +~~~ + +* encrypt swap partition + +~~~ cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 cryptsetup open /dev/nvme0n1p2 cryptswap +~~~ + +* set up the crypt partition as swap. + +~~~ mkswap /dev/mapper/cryptswap ~~~ -Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : +* ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : ~~~ /dev/mapper/cryptswap none swap discard 0 0 ~~~ -add your encrypt swap device define in /etc/crypttab +* add your encrypt swap device define in /etc/crypttab ~~~ cryptswap /dev/nvme0n1p2 none luks ~~~ +* enable swap + ~~~ swapon -a ~~~ +* edit /etc/initramfs-tools/conf.d/resume. Replace the existing RESUME line with the following line. + ~~~ printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume ~~~ -Register these changes. +* Register these changes. ~~~ update-initramfs -u -k all @@ -48,3 +66,7 @@ update-initramfs -u -k all cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_... cryptsetup: WARNING: Couln't determine root device ~~~ + +## sources +* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) +* [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap) From f2c8dd99a352f7b3d8bf50a94552b57415b8aca2 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:26:08 +0200 Subject: [PATCH 20/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index d97aae2..2997731 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~ +~~~{.shell} install apt-get install ecryptfs-utils ~~~ From 58b97201ece0b1ba8354095c4f37519ccf37ea66 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:27:57 +0200 Subject: [PATCH 21/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 2997731..b31442b 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~{.shell} +~~~{.bash} install apt-get install ecryptfs-utils ~~~ From c2989c84bb9033633932fef4f06bbd2d449bd98d Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:28:36 +0200 Subject: [PATCH 22/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index b31442b..114a0e4 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~{.bash} +~~~{.console} install apt-get install ecryptfs-utils ~~~ From 9c597a78ec6e9a92f281f7207b71104e1f55e783 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:28:53 +0200 Subject: [PATCH 23/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 114a0e4..fb27241 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~{.console} +~~~console install apt-get install ecryptfs-utils ~~~ From 6fd3a8690729016c239728697406907509747f31 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:29:12 +0200 Subject: [PATCH 24/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index fb27241..e7375ac 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~console +~~~{console} install apt-get install ecryptfs-utils ~~~ From b555971a51848506ad89e09398adab6928ff77b6 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:29:22 +0200 Subject: [PATCH 25/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index e7375ac..9116ea8 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~{console} +~~~{shell} install apt-get install ecryptfs-utils ~~~ From e6f062a790e95fefc17cb0ce52a6eed1d6e23327 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:29:41 +0200 Subject: [PATCH 26/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 9116ea8..9e4827e 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~{shell} +~~~{properties} install apt-get install ecryptfs-utils ~~~ From c46d38f7854e70df0e899771dc72846c71500068 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:30:05 +0200 Subject: [PATCH 27/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 9e4827e..c35b037 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~{properties} +~~~{sh} install apt-get install ecryptfs-utils ~~~ From 7336219f901420593c3893c466614dda7673f830 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:30:16 +0200 Subject: [PATCH 28/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index c35b037..92ce9ea 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -6,7 +6,7 @@ * install ecryptfs ~~~{sh} -install apt-get install ecryptfs-utils +# install apt-get install ecryptfs-utils ~~~ ## encrypt swap From 430f69af05e11264069e29b5bafd4d6445d45732 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:30:28 +0200 Subject: [PATCH 29/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 92ce9ea..4db7974 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -6,7 +6,7 @@ * install ecryptfs ~~~{sh} -# install apt-get install ecryptfs-utils +$ install apt-get install ecryptfs-utils ~~~ ## encrypt swap From 719991d516c2d3f0357ececabe6fb1160bd7f29e Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:30:40 +0200 Subject: [PATCH 30/51] --- encrypt-swap-Ubuntu-20.04.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 4db7974..e0993bd 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,8 +5,8 @@ * all command bellow are run has root * install ecryptfs -~~~{sh} -$ install apt-get install ecryptfs-utils +~~~{zsh} +install apt-get install ecryptfs-utils ~~~ ## encrypt swap From 9748f623c16ab41256da7e23eeba7364f60eb581 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:31:16 +0200 Subject: [PATCH 31/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index e0993bd..f1b4ac5 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~{zsh} +~~~{r, engine='bash', count_lines} install apt-get install ecryptfs-utils ~~~ From 3be5cd39bc835e78aafa4e4e18522fb1c129333d Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:31:43 +0200 Subject: [PATCH 32/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index f1b4ac5..48522bb 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -5,7 +5,7 @@ * all command bellow are run has root * install ecryptfs -~~~{r, engine='bash', count_lines} +~~~{bat} install apt-get install ecryptfs-utils ~~~ From 311ace56f14a6dfaa36e03dbbd6eb0c834712b04 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:34:47 +0200 Subject: [PATCH 33/51] --- encrypt-swap-Ubuntu-20.04.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 48522bb..15d9dc1 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -30,13 +30,13 @@ cryptsetup open /dev/nvme0n1p2 cryptswap mkswap /dev/mapper/cryptswap ~~~ -* ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : +* ajust **/etc/fstab** to use your mapper, replace your encrypt swap device like bellow : ~~~ /dev/mapper/cryptswap none swap discard 0 0 ~~~ -* add your encrypt swap device define in /etc/crypttab +* add your encrypt swap device define in **/etc/crypttab** ~~~ cryptswap /dev/nvme0n1p2 none luks @@ -48,7 +48,7 @@ cryptswap /dev/nvme0n1p2 none luks swapon -a ~~~ -* edit /etc/initramfs-tools/conf.d/resume. Replace the existing RESUME line with the following line. +* edit **/etc/initramfs-tools/conf.d/resume**. Replace the existing **RESUME** line with the following line. ~~~ printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume From f434801791ce83b9b5ec4b3d1d03b062a811d095 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:37:26 +0200 Subject: [PATCH 34/51] --- disable-encrypt-swap-partition.md | 132 +++++++++++++++--------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index 609a5b1..fe41d4f 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -1,66 +1,66 @@ -# 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/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 -~~~ - -/!\ 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 -~~~ - -Next you need to reboot to enable everything and test it. +# 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/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 +~~~ + +* 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 +~~~ + +Next you need to reboot to enable everything and test it. From 37adb9e7f7d70918187666fbe8cca896e3d9ee23 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 08:39:30 +0200 Subject: [PATCH 35/51] --- disable-encrypt-swap-partition.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index fe41d4f..b600e3c 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -54,7 +54,7 @@ update-grub * edit /etc/initramfs-tools/conf.d/resume. Replace the existing RESUME line with the following line. ~~~ -RESUME=/dev/nvme0n1p2 +printf "RESUME=/dev/nvme0n1p2" | tee /etc/initramfs-tools/conf.d/resume ~~~ Register these changes. From 7050de57fac898d639f711e442eccb2e2f5127b1 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:01:52 +0200 Subject: [PATCH 36/51] --- disable-encrypt-swap-partition.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index b600e3c..dbc2f2b 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -51,10 +51,10 @@ 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. +* remove file */etc/initramfs-tools/conf.d/resume* ~~~ -printf "RESUME=/dev/nvme0n1p2" | tee /etc/initramfs-tools/conf.d/resume +rm /etc/initramfs-tools/conf.d/resume ~~~ Register these changes. From 3151e8943126585c272a791c30a7ccb79a479843 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:17:15 +0200 Subject: [PATCH 37/51] From 007a8079bb3a267eaace20e4cf9ecf5b028290af Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:37:05 +0200 Subject: [PATCH 38/51] --- disable-encrypt-swap-partition.md | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index dbc2f2b..5150e28 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -39,6 +39,25 @@ mkswap /dev/nvme0n1p2 swapon -a ~~~ +* remove file */etc/initramfs-tools/conf.d/resume* + +~~~ +rm /etc/initramfs-tools/conf.d/resume +~~~ + +Register these changes. + +~~~{console} +root@laptop:/root# update-initramfs -u -k all +update-initramfs: Generating /boot/initrd.img-5.4.0-37-generic +cryptsetup: ERROR: Couldn't resolve device rpool/ROOT/ubuntu_0ctpm6 +cryptsetup: WARNING: Couldn't determine root device +I: The initramfs will attempt to resume from /dev/nvme0n1p2 +I: (UUID=09c1daa8-a572-41b9-8655-c38ea7778723) +I: Set the RESUME variable to override this. +root@laptop:/root# +~~~ + /!\ le point ci-dessous est sans doute inutile * Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to point to your real partition @@ -51,16 +70,4 @@ 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. From 3c0a3a24dd14864e324bf8179165237e92b9e7c2 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:37:24 +0200 Subject: [PATCH 39/51] --- disable-encrypt-swap-partition.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index 5150e28..2bdbaa8 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -47,7 +47,7 @@ rm /etc/initramfs-tools/conf.d/resume Register these changes. -~~~{console} +~~~{shell} root@laptop:/root# update-initramfs -u -k all update-initramfs: Generating /boot/initrd.img-5.4.0-37-generic cryptsetup: ERROR: Couldn't resolve device rpool/ROOT/ubuntu_0ctpm6 From 9e74e262642f138e41d9abe231f94e8b224cecf9 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:37:38 +0200 Subject: [PATCH 40/51] --- disable-encrypt-swap-partition.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index 2bdbaa8..be3ffca 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -47,7 +47,7 @@ rm /etc/initramfs-tools/conf.d/resume Register these changes. -~~~{shell} +~~~{bash} root@laptop:/root# update-initramfs -u -k all update-initramfs: Generating /boot/initrd.img-5.4.0-37-generic cryptsetup: ERROR: Couldn't resolve device rpool/ROOT/ubuntu_0ctpm6 From 6467736bd12c65ebc6e15c86cd0c3a28f724c37f Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:41:00 +0200 Subject: [PATCH 41/51] --- disable-encrypt-swap-partition.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index be3ffca..ade14cf 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -58,12 +58,10 @@ I: Set the RESUME variable to override this. root@laptop:/root# ~~~ -/!\ 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" +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=09c1daa8-a572-41b9-8655-c38ea7778723" ~~~ ~~~ From 1c4bcc2b7deb6671a37fd43a3ea70276c7391f8e Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:41:53 +0200 Subject: [PATCH 42/51] --- disable-encrypt-swap-partition.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/disable-encrypt-swap-partition.md b/disable-encrypt-swap-partition.md index ade14cf..8afc068 100644 --- a/disable-encrypt-swap-partition.md +++ b/disable-encrypt-swap-partition.md @@ -10,13 +10,13 @@ * Turn off swap ~~~ -swapoff /dev/mapper/cryptswap +root@laptop:/root# swapoff /dev/mapper/cryptswap ~~~ * Undo the existing mapping. ~~~ -cryptsetup luksClose /dev/mapper/cryptswap +root@laptop:/root# cryptsetup luksClose /dev/mapper/cryptswap ~~~ * remove your encrypt swap device define in your **/etc/crypttab** @@ -30,19 +30,19 @@ cryptsetup luksClose /dev/mapper/cryptswap * make your partition a swap ~~~ -mkswap /dev/nvme0n1p2 +root@laptop:/root# mkswap /dev/nvme0n1p2 ~~~ * activate swap ~~~ -swapon -a +root@laptop:/root# swapon -a ~~~ * remove file */etc/initramfs-tools/conf.d/resume* ~~~ -rm /etc/initramfs-tools/conf.d/resume +root@laptop:/root# rm /etc/initramfs-tools/conf.d/resume ~~~ Register these changes. @@ -65,7 +65,7 @@ GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=09c1daa8-a572-41b9-8655-c38 ~~~ ~~~ -update-grub +root@laptop:/root# update-grub ~~~ Next you need to reboot to enable everything and test it. From d3b53a4d251697587c92320bf4b3ee7d00e0447a Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:42:41 +0200 Subject: [PATCH 43/51] --- encrypt-swap-Ubuntu-20.04.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 15d9dc1..09ad8b7 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -6,7 +6,7 @@ * install ecryptfs ~~~{bat} -install apt-get install ecryptfs-utils +root@laptop:/root# install apt-get install ecryptfs-utils ~~~ ## encrypt swap @@ -14,20 +14,20 @@ install apt-get install ecryptfs-utils * turn off current swap ~~~ -swapoff -a +root@laptop:/root# swapoff -a ~~~ * encrypt swap partition ~~~ -cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 -cryptsetup open /dev/nvme0n1p2 cryptswap +root@laptop:/root# cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 +root@laptop:/root# cryptsetup open /dev/nvme0n1p2 cryptswap ~~~ * set up the crypt partition as swap. ~~~ -mkswap /dev/mapper/cryptswap +root@laptop:/root# mkswap /dev/mapper/cryptswap ~~~ * ajust **/etc/fstab** to use your mapper, replace your encrypt swap device like bellow : @@ -45,19 +45,19 @@ cryptswap /dev/nvme0n1p2 none luks * enable swap ~~~ -swapon -a +root@laptop:/root# swapon -a ~~~ * edit **/etc/initramfs-tools/conf.d/resume**. Replace the existing **RESUME** line with the following line. ~~~ -printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume +root@laptop:/root# printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume ~~~ * Register these changes. ~~~ -update-initramfs -u -k all +root@laptop:/root# update-initramfs -u -k all ~~~ ### to be solve From 75a4cf3b5231f653be1f330d1ec70e277a0a58c7 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:45:35 +0200 Subject: [PATCH 44/51] --- encrypt-swap-Ubuntu-20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 09ad8b7..3e74a5e 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -51,7 +51,7 @@ root@laptop:/root# swapon -a * edit **/etc/initramfs-tools/conf.d/resume**. Replace the existing **RESUME** line with the following line. ~~~ -root@laptop:/root# printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume +root@laptop:/root# printf "RESUME=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume ~~~ * Register these changes. From b84c0800c91ca3734a4c4567028587032410733d Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:48:33 +0200 Subject: [PATCH 45/51] --- encrypt-swap-Ubuntu-20.04.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/encrypt-swap-Ubuntu-20.04.md b/encrypt-swap-Ubuntu-20.04.md index 3e74a5e..afed352 100644 --- a/encrypt-swap-Ubuntu-20.04.md +++ b/encrypt-swap-Ubuntu-20.04.md @@ -60,6 +60,15 @@ root@laptop:/root# printf "RESUME=/dev/mapper/cryptswap" | tee /etc/initramfs-to root@laptop:/root# update-initramfs -u -k all ~~~ + +* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to point to remove or be sure there is nothing in resume + +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" + +~~~ +root@laptop:/root# update-grub +~~~ + ### to be solve ~~~ From f2300ac109b83e9f323c4923ede7a6d42da616f4 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 09:56:59 +0200 Subject: [PATCH 46/51] --- xubuntu-XPS-13-7390-2-in-1--.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xubuntu-XPS-13-7390-2-in-1--.md b/xubuntu-XPS-13-7390-2-in-1--.md index 5f858cf..b4d416b 100644 --- a/xubuntu-XPS-13-7390-2-in-1--.md +++ b/xubuntu-XPS-13-7390-2-in-1--.md @@ -61,6 +61,9 @@ update-grub Splash screen uses too small logo and somewhat too small fonts (Plymouth). +### plymouth boot splash and boot logger + + Plymouth has logic to detect the proper scaling to apply, but it's still too small; workaround by forcing the scale on the kernel cmdline: Add to GRUB_CMDLINE_LINUX in /etc/default/grub. @@ -73,7 +76,7 @@ plymouth.force-scale=3 update-grub ~~~ -Console terminal uses too small fonts. +### Console terminal uses too small fonts. Note that the package shipping the Ubuntu Monospace font for the terminal, fonts-ubuntu-console, is not installed by default and only ships 8x16 fonts. From 797e8c59c4ab0dac00599aaa2a24238f69f6da6b Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 10:50:42 +0200 Subject: [PATCH 47/51] --- xubuntu-XPS-13-7390-2-in-1--.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xubuntu-XPS-13-7390-2-in-1--.md b/xubuntu-XPS-13-7390-2-in-1--.md index b4d416b..4b80f5c 100644 --- a/xubuntu-XPS-13-7390-2-in-1--.md +++ b/xubuntu-XPS-13-7390-2-in-1--.md @@ -95,4 +95,14 @@ select a font face that supports a larger font size, for instance the Terminus f apt install iio-sensor-proxy ~~~ -install : screen rotator : https://github.com/GuLinux/ScreenRotator \ No newline at end of file +install : **[GitHub - ScreenRotator](https://github.com/GuLinux/ScreenRotator)** + +* If you use black + +theme open : **ScreenRotator/src/resources/scalable/apps/screenrotator/svg** with **inkscape**, select all the paths and use **extensions>color>negative**. +Launch script : ScreenRotator/src/resources/create_icons +Reinstall ScreenRotator : + +~~~ +user@laptop:~/ScreenRotator/build$ sudo make install +~~~ \ No newline at end of file From 138c2bfe7f5ee942ac09007b9fbe0275601c2572 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 10:51:18 +0200 Subject: [PATCH 48/51] --- xubuntu-XPS-13-7390-2-in-1--.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xubuntu-XPS-13-7390-2-in-1--.md b/xubuntu-XPS-13-7390-2-in-1--.md index 4b80f5c..46f1ced 100644 --- a/xubuntu-XPS-13-7390-2-in-1--.md +++ b/xubuntu-XPS-13-7390-2-in-1--.md @@ -97,10 +97,10 @@ apt install iio-sensor-proxy install : **[GitHub - ScreenRotator](https://github.com/GuLinux/ScreenRotator)** -* If you use black +### If you use black theme -theme open : **ScreenRotator/src/resources/scalable/apps/screenrotator/svg** with **inkscape**, select all the paths and use **extensions>color>negative**. -Launch script : ScreenRotator/src/resources/create_icons +open : **ScreenRotator/src/resources/scalable/apps/screenrotator/svg** with **inkscape**, select all the paths and use **extensions>color>negative**. +Launch script : **ScreenRotator/src/resources/create_icons** Reinstall ScreenRotator : ~~~ From f3bc968401121412b98671a7f319ee02b01753a3 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 10:51:33 +0200 Subject: [PATCH 49/51] --- xubuntu-XPS-13-7390-2-in-1--.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xubuntu-XPS-13-7390-2-in-1--.md b/xubuntu-XPS-13-7390-2-in-1--.md index 46f1ced..6287314 100644 --- a/xubuntu-XPS-13-7390-2-in-1--.md +++ b/xubuntu-XPS-13-7390-2-in-1--.md @@ -99,9 +99,9 @@ install : **[GitHub - ScreenRotator](https://github.com/GuLinux/ScreenRotator)** ### If you use black theme -open : **ScreenRotator/src/resources/scalable/apps/screenrotator/svg** with **inkscape**, select all the paths and use **extensions>color>negative**. -Launch script : **ScreenRotator/src/resources/create_icons** -Reinstall ScreenRotator : +open : **ScreenRotator/src/resources/scalable/apps/screenrotator/svg** with **inkscape**, select all the paths and use **extensions>color>negative**. +Launch script : **ScreenRotator/src/resources/create_icons** +Reinstall ScreenRotator : ~~~ user@laptop:~/ScreenRotator/build$ sudo make install From b84f7d5f0af8f52936d615d26df5f7ace4abcafe Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 13:33:15 +0200 Subject: [PATCH 50/51] create file for recommanded extension --- Firefox-plugins.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Firefox-plugins.md diff --git a/Firefox-plugins.md b/Firefox-plugins.md new file mode 100644 index 0000000..4a450b4 --- /dev/null +++ b/Firefox-plugins.md @@ -0,0 +1,5 @@ +* [FreedomMarks](https://github.com/damko/freedommarks-browser-webextension) - Browser extension for Nextcloud Bookmarks +* [Grammalecte](https://grammalecte.net/) - Correcteur grammatical, orthographique et typographique pour le français. +* [User-Agent Switcher and Manager](https://add0n.com/useragent-switcher.html) - Spoof websites trying to gather information about your web navigation to deliver distinct content you may not want +* [Wallabagger](https://github.com/wallabag/wallabagger) +Extension pour Wallabag qui permet d'éditer le titre de la page, les tags, changer l'état en tant que favori, archivé ou supprimé. From 56673ad2f480ef5821782aaea955654e3b81ce26 Mon Sep 17 00:00:00 2001 From: Michel Le Cocq Date: Wed, 24 Jun 2020 13:36:00 +0200 Subject: [PATCH 51/51] add dark reader --- Firefox-plugins.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Firefox-plugins.md b/Firefox-plugins.md index 4a450b4..e8e1c51 100644 --- a/Firefox-plugins.md +++ b/Firefox-plugins.md @@ -3,3 +3,4 @@ * [User-Agent Switcher and Manager](https://add0n.com/useragent-switcher.html) - Spoof websites trying to gather information about your web navigation to deliver distinct content you may not want * [Wallabagger](https://github.com/wallabag/wallabagger) Extension pour Wallabag qui permet d'éditer le titre de la page, les tags, changer l'état en tant que favori, archivé ou supprimé. +* [Dark Reader](http://darkreader.org/) - Un thème sombre pour chaque site Web. Prenez soin de vos yeux, utilisez Dark Reader pour votre navigation nocturne et quotidienne.