Project

General

Profile

Actions

Bug #2281

closed

cryptdisks doesn't work right when booting

Added by phma about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01/18/2012
Due date:
% Done:

0%

Estimated time:

Description

I have a cryptdisk which is mounted as /crypt/. crypttab says it should try three times and timeout. It does timeout if I say nothing, but if I enter the right password, it aborts. Apparently it can't load the kernel module for the cipher. dmesg looks like this:

cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Mounting root from hammer:serno/Y2P0C2BE.s1d
tryroot serno/Y2P0C2BE.s1d
HAMMER recovery check seqno=4233877a
HAMMER recovery range 3000000005d50088-3000000005d50088
HAMMER recovery nexto 3000000005d50088 endseqno=4233877b
HAMMER mounted clean, no recovery needed
Mounting devfs
disk scheduler: set policy of mapper/temporary-cryptsetup-34 to noop
dm: could not autoload module for target crypt
drm0: <Intel i865G GMCH> on vgapci0
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] AGP at 0xf0000000 128MB
info: [drm] Initialized i915 1.6.0 20080730
disk scheduler: set policy of mapper/temporary-cryptsetup-1001 to noop
dm_target_crypt: Successfully initialized
dm_target_crypt: Setting min/max mpipe buffers: 2/12
kthread 0xd1c248e0 mpipe_dm_crypt has exited
kthread 0xd1c24660 mpipe_dm_crypt has exited
disk scheduler: set policy of mapper/temporary-cryptsetup-1001 to noop
dm_target_crypt: Setting min/max mpipe buffers: 2/12
kthread 0xd1c24660 mpipe_dm_crypt has exited

Here is /etc/crypttab:

crypt1 /dev/serno/WD-WCAS80774005.s1d none tries=3,timeout=200

Actions #1

Updated by matthiasr about 12 years ago

does

kldload dm_target_crypt; cryptsetup -a

work? does setting

dm_target_crypt_load=yes

in /boot/loader.conf work around the issue?

Actions #2

Updated by alexh about 12 years ago

  • Status changed from New to Feedback

As Matthias says, preloading it in the loader should fix the your problem.

Odds are /crypt is being mounted before /boot is available, so the module can't be autoloaded and needs to be preloaded.

Cheers,
Alex

Actions #3

Updated by phma about 12 years ago

Yes it works. It should be mentioned in one of the man pages.

Actions #4

Updated by alexh about 12 years ago

  • Status changed from Feedback to Closed

Added to the crypttab man page in b41a18bab256e13662151752967ce21112349ca9.

Actions

Also available in: Atom PDF