Unlocking a LUKS volume with a keyfile on an USB stick

That’s unfortunate, but it does happen and can happen with any device.

That is a more difficult approach IMO. udev > systemd.service > bash script ? I can’t test this for a system unlock, and I have had my own problems unlocking devices and running udev rules and systemd.services for a project I am doing with mixed results in the process. . .


On the way here : I just thought another method that might work for you…

I have a small collection of USB drives that I bought from Amazon. They are very cheap 32GB drives. I have key files in most of them. So in the //etc/fstab you can use by-name instead of by-uuid.