You are not logged in.

#1 2021-05-19 22:13:16

pepelepew
Member
Registered: 2021-05-06
Posts: 4

automount encrypted usb key

Hi,

I've been partially successful in automounting encrypted veracrypt volume

1.   MOUNT AT BOOT - VERACRYPT LOCAL HDD
-----------------------------------------------------------------

The following works perfectly.

cryptab
veracrypt1                                 PARTLABEL=vcsda5 /dev/null    noauto,tcrypt-veracrypt,tcrypt-hidden,tcrypt-keyfile=/keyfile.bin

fstab
/dev/mapper/veracrypt1                                /media/veracrypt1       btrfs   defaults,noatime,space_cache,autodefrag,compress=zstd:10 0 2



2.  AUTO MOUNT NOT AT BOOT - VERACRYPT USB KEY
---------------------------------------------------------------------------

I followed instructions at this link but its not working fully.
https://wiki.archlinux.org/title/Fstab# … filesystem


cryptab
veracrypt2                                 PARTLABEL=usb4gb  /dev/null    noauto,tcrypt-veracrypt,tcrypt-hidden,tcrypt-keyfile=/keyfile.bin

The cryptab entry with "noauto" works fine.    The usb key encryption is opened whether usb key is present at boot time or when inserting after boot time.
I can manually mount this with "sudo mount /dev/mapper/veracrypt2 /media/veracrypt2"

fstab
/dev/mapper/veracrypt2      /media/veracrypt2    btrfs   noauto,x-systemd.automount,x-systemd.mount-timeout=5,defaults,noatime,space_cache,autodefrag,compress=zstd:10 0 2

This fstab entry is the problem.    It just doesn't work at all.    It actually makes thunar hang and system unstable.

I've tried combinations of
noauto,x-systemd.automount,x-systemd.mount-timeout=5
nofail,x-systemd.device-timeout=1ms,noauto,x-systemd.automount
nofail,x-systemd.device-timeout=1ms

What is the correct fstab entry to use so that the usb key auto mounts when inserted not at boot time.

Thanks in advance.

Last edited by pepelepew (2021-05-19 22:14:28)

Offline

Board footer

Powered by FluxBB