1

I'm on debian 9

I want to boot from an encrypted root,using a usb key

Editing /etc/crypttab...

cifr /dev/md0  /dev/disk/by-uuid/88D9-A79B:/FILE luks,keyscript=/lib/cryptsetup/scripts/passdev

Reboot..works fine.

Only one problem,systemd stuck with this error,then boot..but I have to wait 1:30 minute!

journalctl

return this error

dev-disk-by\x2duuid-88D9\x2dA79B:-FILE.device: Job dev-disk-by\x2duuid-88D9\x2dA79B:-FILE.device/start failed with result 'timeout'.

USB key is formatted with vfat

0

Solution found.

The command

/lib/systemd/system-generators/systemd-cryptsetup-generator

Convert the /etc/crypttab in systemd service.

But it add those bad lines wich cause error

After=dev-disk-by\x2duuid-88D9\x2dA79B        
Requires=dev-disk-by\x2duuid-88D9\x2dA79B     

So the solution is,after boot run

/lib/systemd/system-generators/systemd-cryptsetup-generator

This create the service in /tmp

/tmp/systemd-cryptsetup@luksmd0.service

In my case in luksmd0,in your case can change. Edit the file,remove the two lines Then copy it to /etc/systemd/system And reboot. At reboot the command

systemctl status systemd-cryptsetup@luksmd0.service

must return active.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.