This might be specific to openSUSE / systemd.
I'm having trouble mounting an encrypted loopback file using the procedure described on the SDB:Encrypted filesystems knowledge base. I get this behaviour:
[mjl@tesla:~][11:12] $ sudo systemctl start /home/mjl/keyJob for home-mjl-key.mount failed. See "systemctl status home-mjl-key.mount" and "journalctl -xe" for details.[mjl@tesla:~][11:12] 1 $ sudo systemctl status home-mjl-key.mount● home-mjl-key.mount - /home/mjl/keyLoaded: loaded (/etc/fstab; bad; vendor preset: disabled)Active: failed (Result: exit-code) since Sun 2018-03-11 11:12:41 AEDT; 3s agoWhere: /home/mjl/keyWhat: /home/mjl/.tombDocs: man:fstab(5)man:systemd-fstab-generator(8)Process: 12949 ExecMount=/usr/bin/mount /home/mjl/.tomb /home/mjl/key -t crypt -o loop,user,acl,user_xattr (code=exited, status=32)Mar 11 11:12:41 tesla systemd: Mounting /home/mjl/key...Mar 11 11:12:41 tesla mount: mount: unknown filesystem type 'crypt'Mar 11 11:12:41 tesla systemd: home-mjl-key.mount: Mount process exited, code=exited status=32Mar 11 11:12:41 tesla systemd: Failed to mount /home/mjl/key.Mar 11 11:12:41 tesla systemd: home-mjl-key.mount: Unit entered failed state.[mjl@tesla:~][11:12] 3 $
The /home/mjl/.tomb loopback file was created using YaST Partitioner; I specified that I did not want it mounted at system start time, but that users should be allowed to mount it.
So it created the file, added an entry to /etc/cryptab and also this entry to /etc/fstab:
[mjl@tesla:~][11:12] 3 $ tail -n1 /etc/fstab/home/mjl/.tomb /home/mjl/key crypt loop,user,noauto,acl,user_xattr,nofail 0 0[mjl@tesla:~][11:15]$
There is the 'crypt' filesystem type.
My question is: how should I be mounting this as a user? Is systemd failing because of the filesystem type, or because I haven't told it the encryption key?
I've also tried mounting directly:
[mjl@tesla:~][11:16]$ sudo mount /home/mjl/keymount: unknown filesystem type 'crypt'[mjl@tesla:~]
The same error. So I guess I'm not mounting it correctly. Do I need to do something with cryptsetup