You are not logged in.

#1 2012-11-29 01:29:39

jayray
Member
Registered: 2006-10-15
Posts: 37

systemd crypttab issue

Prior to rolling over to systemd I used the following line in my crypttab:

cryptodev /dev/sdb1 /dev/sdc1:vfat:/unlockfile luks

With systemd that seems to be broken, so I tried mounting the usb stick(sdc1) in fstab as /mnt/usb then mod the cryptab to:

cryptodev /dev/sdb1 /mnt/usb/unlockfile luks

However this does not work because the systemd-cryptsetup@cryptostodev.service script runs prior to mounts. I attempted to add "Requires=mnt-usb.mount" and "After=mnt-usb.mount" in /run/systemd/generator/systemd-cryptsetup@cryptodev.service but I believe this is a generated file. My first thought is to move the .service to the /etc/systemd/service folder and perform edits there, then remove the crypttab all together. Thoughts, or an easier solution?
Thanks,
Jason

Offline

#2 2012-12-19 15:35:28

jayray
Member
Registered: 2006-10-15
Posts: 37

Re: systemd crypttab issue

I still have had no luck in getting my crypto filesystems to mount properly on boot. When the key file is on the root partition I have no problems, but when it is on a removable device it fails because systemd has not mounted the flash drive containing the key yet. I tried getting rid of the entries in crypttab and creating my own service, but it fails the same. Anyone else have this issue?
Thanks,
Jason

Offline

#3 2012-12-20 21:54:19

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,277

Re: systemd crypttab issue

Offline

#4 2012-12-21 00:58:03

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd crypttab issue

jayray wrote:

My first thought is to move the .service to the /etc/systemd/service folder and perform edits there, then remove the crypttab all together. Thoughts, or an easier solution?

This sounds like the correct solution, though no need to remove crypttab, the copy in /etc will take precedence over the generated one. We should probably improve the crypttab generator to add this automatically. In the meantime: I'm not sure why this does not work for you without more info. After "systemctl daemon-reload" with the modified file in place, can you paste "systemctl show systemd-cryptsetup@cryptostodev.service" ?

Offline

Board footer

Powered by FluxBB