remove grub config not needed

This commit is contained in:
Michel Le Cocq 2020-06-24 08:19:39 +02:00
parent 34487e09ee
commit c6ab075879

View File

@ -1,62 +1,50 @@
## prerequisite ## prerequisite
* all command bellow are run has root * all command bellow are run has root
## encrypt swap partition ## encrypt swap partition
sources : sources :
* [wiki.archlinux.org - dm-crypt/Swap encryption](https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#LVM_on_LUKS) * [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) * [help.ubuntu.com - Enable Hibernate With Encrypted Swap](https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap)
~~~ ~~~
apt-get install ecryptfs-utils apt-get install ecryptfs-utils
swapoff -a swapoff -a
cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2 cryptsetup luksFormat --cipher aes-xts-plain64 --verify-passphrase --key-size 256 /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptswap cryptsetup open /dev/nvme0n1p2 cryptswap
mkswap /dev/mapper/cryptswap mkswap /dev/mapper/cryptswap
~~~ ~~~
/!\ le point ci-dessous est sans doute inutile Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow :
* Change your /etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT to remove resume part wich is now manage by initramfs ~~~
/dev/mapper/cryptswap none swap discard 0 0
~~~ ~~~
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
~~~ add your encrypt swap device define in /etc/crypttab
~~~ ~~~
update-grub cryptswap /dev/nvme0n1p2 none luks
~~~ ~~~
Now ajust /etc/fstab to use your mapper, replace your encrypt swap device like bellow : ~~~
swapon -a
~~~ ~~~
/dev/mapper/cryptswap none swap discard 0 0
~~~ ~~~
printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume
add your encrypt swap device define in /etc/crypttab ~~~
~~~ Register these changes.
cryptswap /dev/nvme0n1p2 none luks
~~~ ~~~
update-initramfs -u -k all
~~~ ~~~
swapon -a
~~~ ### to be solve
~~~ ~~~
printf "RESUME=UUID=/dev/mapper/cryptswap" | tee /etc/initramfs-tools/conf.d/resume cryptsetup: ERROR: Couln't resolve device rpool/ROOT/ubuntu_...
~~~ cryptsetup: WARNING: Couln't determine root device
~~~
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
~~~