After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 525346 - Can't mount encrypted volumes
Can't mount encrypted volumes
Status: RESOLVED NOTGNOME
Product: gnome-mount
Classification: Deprecated
Component: programs
unspecified
Other All
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
Depends on:
Blocks:
 
 
Reported: 2008-03-31 14:46 UTC by Sam Morris
Modified: 2008-04-20 17:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
udevmonitor log (4.08 KB, text/plain)
2008-04-19 18:18 UTC, Sam Morris
Details
udevmonitor before (2.16 KB, text/plain)
2008-04-19 18:58 UTC, Sam Morris
Details
udevmonitor after (2.16 KB, text/plain)
2008-04-19 18:59 UTC, Sam Morris
Details

Description Sam Morris 2008-03-31 14:46:34 UTC
Please describe the problem:
[ forwarded from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467200 ]

I am no longer able to mount an encrypted volume. The last time I tried
was a couple of months ago, when it worked.

When I insert the device, I am prompted for my passphrase. Even through
I enter it correctly, I am prompted again. If I enter it a second time,
the prompt goes away, and a device-mapper mapping is created for the
device, but the volume does not get mounted. In fact, the '300 GB
volume' icon disappears from computer:/// entirely!

Some digging around lead to the gnome-mount utility. If I manually
deactivate the device-mapper mapping and try to use it, I get the
following errors:

 $ gnome-mount -t -d /dev/sda1
 gnome-mount 0.7
 Enter password to unlock encrypted data for /dev/sda1: 
 Setup clear-text device for /dev/sda1.
 Clear text device is /dev/dm-2. Mounting.
 
 ** (gnome-mount:6191): WARNING **: /org/freedesktop/Hal/devices/volume_part_1_size_0 does not have a mountable filesystem

O RLY?

 # file -s /dev/dm-2
 /dev/dm-2: Linux rev 1.0 ext3 filesystem data (large files)

Well, let's try to mount it again:

 $ gnome-mount -t -d /dev/dm-2
 gnome-mount 0.7
 GConf Error: Bad key or directory name: "/system/storage/default_options/(null)/fstype_override": `(' is an invalid character in key/directory names

 ** (gnome-mount:6233): WARNING **: Mount failed for /org/freedesktop/Hal/devices/volume_part_1_size_0
 org.freedesktop.DBus.Error.UnknownMethod : Method "Mount" with signature "ssas" on interface "org.freedesktop.Hal.Device.Volume" doesn't exist

Let's try manually:

 # mount /dev/dm-2 /mnt; echo $?
 0

Success!

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Also filed with hal at <https://bugs.freedesktop.org/show_bug.cgi?id=15285>.
Comment 1 David Zeuthen (not reading bugmail) 2008-03-31 14:56:49 UTC
This is most likely a bug with either cryptsetup itself or how cryptsetup is integrated into Debian. The root problem is that cryptsetup creates an intermediate dm device before creating the real one (check with udevmonitor). Am pretty sure your udev rules don't handle that correctly. Try adding rules to ignore the temporary node (match on the dm name) and I think it'll work.
Comment 2 Sam Morris 2008-04-19 16:39:21 UTC
David, can you give me some more details about this problem? I didn't get any response from the maintainers of the cryptsetup problem and I would really, really like to fix it. I find the whole situation very confusing... no one seems to know whether the bug is in gnome-mount, gnome-volume-manager, hal, crypsetup or udev... :)
Comment 3 Sam Morris 2008-04-19 18:18:48 UTC
Created attachment 109553 [details]
udevmonitor log

Output of 'udevmonitor' when plugging in the encrypted disk
Comment 4 Sam Morris 2008-04-19 18:57:56 UTC
So, I added this to my udev rules and now I can mount things again!

# ignore device mapper nodes
# http://bugzilla.gnome.org/show_bug.cgi?id=525346
KERNEL="dm-[0-9]*", OPTIONS+="ignore_device"

The difference to the output of udevmonitor is very very subtle; I'll attach the output of 'udevmonitor' both before and after this change.
Comment 5 Sam Morris 2008-04-19 18:58:36 UTC
Created attachment 109555 [details]
udevmonitor before
Comment 6 Sam Morris 2008-04-19 18:59:22 UTC
Created attachment 109556 [details]
udevmonitor after

the difference is very subtle; the order of a single event is different.
Comment 7 Sam Morris 2008-04-19 19:57:07 UTC
FYI, I've recommended that this rule be added to Debian's udev rules. If you wish to comment, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476874.