Cryptsetup is started twice on startup

Bug #457614 reported by falstaff
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
Triaged
High
Unassigned
Nominated for Karmic by falstaff

Bug Description

Binary package hint: cryptsetup

I tried to use cryptsetup in karmic with a encrypted file (via losetup). Cryptsetup supports this kind of configuration, my /etc/crypttab line looks like this:
# <target name> <source device> <key file> <options>
container /home/user/myimage.img none cipher=aes,check=ext2

However, I couldn't decrypt the file on startup. I started debugging this problem and noticed that the startup function "do_start" from /lib/cryptsetup/cryptdisks.functions is called twice, once from Upstart (/etc/init/cryptdisks-enable.conf) and once from old init.d script (/etc/rcS.d/S26cryptdisks-early). This leeds to the problem that the first running script uses /dev/loop0 and the second /dev/loop1. The first tries then to decrypt it, but the file isnt connected to /dev/loop0 anymore, because the second losetup command which created /dev/loop1 took the file. In the end, the file wasnt decrypted after 6 tried (two times 3 tries, for each startup script).

In my opinion, the upstart script doesnt work properly, it doesnt support the noearly option from crypttab anyway (the old init.d script is running twice, once with a early parameter (INITSTATE="early")...

Steve Langasek (vorlon)
Changed in cryptsetup (Ubuntu):
status: New → Triaged
importance: Undecided → High
tags: added: regression-release
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.