2

Anyone know who can describe how to get dev-mapper stop halting boot? (LUKS/clevis with /etc/fstab entry)

I've setup'ed clevis9 / LUKS with late boot authentication

sudo systemctl enable clevis-luks-askpass.path

Without any /etc/fstab entry, Ubuntu boots and unlocks the device.

With /dev/mapper entry in /etc/fstab, Ubuntu boot hangs forever with message:

A start job is running for dev-mapper-encryptedfs.device (5min / no limit)

The following /etc/fstab:

UUID=137541e1-4ee0-11e8-b9f6-d45ddf136996 / ext4 defaults 0 0
UUID=F9E1-7C3E /boot/efi vfat defaults 0 0 /swap.img    none    swap    sw  0   0
/dev/mapper/encryptedfs /home/user/luks/encryptedfs ext4    defaults,x-systemd-device-timeout=10   0       0

works OK for normal use, but not boot.

For reference, this is the /etc/crypttab

encryptedfs /dev/sda3 none _netdev

EDIT RESOLUTION: /etc/fstab entry for /dev/mapper/encryptedfs needed to specify _netdev also.

4
  • I think what is going on is the normal boot process with systemd-fstab-generator that tries to unlock your /dev/mapper/encryptedfs as if it is a normal LUKS partition. May be _netdev is not recognized ? Or may need more configuration? – solsTiCe May 8 '18 at 13:40
  • @solsTiCe I think _netdev is understood because /etc/crypttab entry without /etc/fstab entry works (luks asks for password and clevis provides unlock). – blaufish May 8 '18 at 14:36
  • I don't know but I know for sure I got the same error message, when for an unkown reason, I got /etc/fstab setup to use an encrypted volume while /etc/crypttab was left empty. Changes not saved. Just standard LUKs not clevis one. – solsTiCe May 8 '18 at 14:41
  • @solsTiCe _netdev was needed in /etc/fstab also ^_^ – blaufish May 9 '18 at 6:57
2

RESOLVED!

/etc/fstab entry also needed _netdev, i.e.

/dev/mapper/encryptedfs /home/user/luks/encryptedfs ext4    defaults,x-systemd-device-timeout=10,_netdev   0       0

I think what was happing with the old configuration;

  • clevis required _netdev
  • /etc/cryptab entry /dev/mapper/encryptedfs required _netdev
  • /etc/fstab entry started before _netdev but depeded on /dev/mapper/encryptedfs
  • i.e. process started before _netdev, waited on _netdev, and prevented _netdev from starting
  • deadlock

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.