GNU+Linux command memo

cryptsetup: WARNING: invalid line in /etc/crypttab for luks-XX

If you get this message from cryptsetup instead of booting.

Si vous obtenez ce message et que votre machine ne démarre pas.

  1. # cryptsetup open /dev/sda3 sda3_crypt [1]

  2. Apply chroot commands

  3. # apt install lvm2 [2]

  4. # update-initramfs -u [3]

1. Open the LUKS container, sda3_crypt is the same name found in the last position in the file: /etc/crypttab ; if your system already used a sda3_crypt drive, you can rename it before with dmsetup rename sda3_crypt sda3_crypt_orig
2. Only if the package is missing. Verify with: apt search lvm2 | grep --color "^lvm2"
3. If you don’t have the warning message, it’s won ! Else, you must ensure that the UUID of the sda3_crypt partition in /etc/crypttab is the good one. You can display the UUID of your /dev/mapper/sda3_crypt partition with : blkid /dev/sdb3 which is the direct device file in your host system.