cryptdisks-early unlocks device as "unformatted" with UUID in fstab
Bug #1005032 reported by
ilf
This bug affects 7 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Since #876626 was fixed, I can unlock my crypto-devices on boot again.
However, they are unlocked as /dev/mapper/
Remounting them fixes this back to /dev/mapper/foo.
Why is this done on boot?
Changed in cryptsetup: | |
status: | New → Confirmed |
summary: |
- cryptdisks-early unlocks device as "unformatted" + cryptdisks-early unlocks device as "unformatted" with UUID in fstab |
To post a comment you must log in.
You have the encrypted device referred with either a label or blkid in your fstab.
There is a race condition so that the thread/process waiting for the encrypted filesystem to become available will "catch" the availability event and device before the cryptsetup scripts have time to rename the block device from foo_unformatted to foo. Because the mounting thread is faster, it gets to mount (and lock) the decrypted device while it still has the temporary name.
This is obviously a bug in the startup scripts. A simple workaround would be to refer the block device by its path and not by blkid/label in /etc/fstab. If referred by path, the mounting scripts will wait until the device with path /dev/mapper/foo is available (which will happen only when the cryptsetup scripts get to rename the temporary device)