This problem is still present. When using gnome-mount, it works
everytime (mounting/unmounting/mounting...). But when using nautilus, it
sometimes can't be remounted whether with nautilus or gnome-mount after
first unmounting. When this occurs, the label of the encrypted disc
remains visible in nautilus, and in hal-manager (I mean the cleartext
volume still appears), though the luks_crypto mapping has already
disappeared. It seems to be the root of the subsequent problems:
nautilus tries (through hal) to mount directly without remapping because
it sees the cleartext volume listed in hal. When trying to unmount with
nautilus, it fails again because it is already unmounted. When trying to
teardown (using dbus-send), it fails again because the cryptsetup
command used by hal to unmap the cleartext volume fails (quite
understandably since there is no mapping at the time).

Using dbus-send commands, I can get things in order by calling the
Volume.Crypto.Setup method. I then follow with Volume.Crypto.Teardown to
destroy the mapping completely and it works correctly thereafter (until
of course I mount and then unmount with nautilus, which leads to the
same situation).

It seems that there is some kind of race condition because when I call
Volume.Unmount followed by Volume.Crypto.Teardown rapidly, the exact
same problem as with nautilus occurs. On the contrary, if I wait ten
seconds between my two dbus-send commands, it works perfectly.

For reference, I used these commands:
dbus-send --print-reply --system --dest=org.freedesktop.Hal 
'/org/freedesktop/Hal/devices/volume_uuid_my_encrypted_partition_uuid' 
org.freedesktop.Hal.Device.Volume.Crypto.Setup string:'my passphrase'
dbus-send --print-reply --system --dest=org.freedesktop.Hal 
'/org/freedesktop/Hal/devices/volume_uuid_my_encrypted_partition_uuid' 
org.freedesktop.Hal.Device.Volume.Crypto.Teardown
dbus-send --print-reply --system --dest=org.freedesktop.Hal 
'/org/freedesktop/Hal/devices/volume_uuid_my_cleartext_mapping_uuid' 
org.freedesktop.Hal.Device.Volume.Mount string:'mymediamountpoint' 
string:'auto' array:string:''
dbus-send --print-reply --system --dest=org.freedesktop.Hal 
'/org/freedesktop/Hal/devices/volume_uuid_my_cleartext_mapping_uuid' 
org.freedesktop.Hal.Device.Volume.Unmount array:string:''

I didn't fully understand the way the /usr/lib/hal/scripts/luks-* and
/usr/lib/halt/scripts/linux/luks-* scripts work, so I am unable so far
to propose a correction. I hope that these indications will help you to
correct this problem.

Cordially.

-- 
Feisty does not mount encrypted partition
https://bugs.launchpad.net/bugs/88213
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to