[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Device to use with cryptsetup Buster encrypted lvm



On Sun 04 Oct 2020 at 16:16:33 (+0200), john doe wrote:
> I just installed Debian Buster with encrypted LVM.
> 
> In my fstab file, I have:
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> /dev/mapper/try02--vg-root /               ext4    errors=remount-ro 0
>      1
> 
> I can't figure out what device I should pass to cryptsetup to avoid the
> below error:
> 
> $ cryptsetup -v luksAddKey /dev/mapper/try02--vg-root /etc/keys/root.key
> --key-slot=1
> Device /dev/mapper/try02--vg-root doesn't exist or access denied.
> Command failed with code -4 (wrong device or file specified).
> 
> 
> How can I know what device cryptsetupt will accept?

It looks as if you're trying to add the key to the decrypted device,
ie the /dev/mapper/ device that gets mounted as /.
You add keys to the encrypted device, ie the device that contains the
encrypted filesystem, the argument you used in the command
# cryptsetup luksFormat <this-device>

Cheers,
David.


Reply to: