USB keys/disks are not mounted when I plug them (using Ubuntu Karmic Beta)

Bug #442398 reported by Andrea Grandi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hal (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

1) The release of Ubuntu:

andrea@andrea-laptop:~$ lsb_release -rd
Description: Ubuntu karmic (development branch)
Release: 9.10

2) The version of the package: don't know what package is involved

3) What you expected to happen:

I expect my USB keys/disks to be automatically mounted when I plug them. They worked fine on Jaunty before upgrading to Karmic Beta.

4) What happened instead:

USB keys/disks are not mounted automatically.

This is the output of "tail -f": http://pastebin.ca/1592740
This is the output of "devkit-disks --monitor-detail": http://pastebin.ca/1592744

If you need any other information/log, please ask me.

Thanks.

Revision history for this message
Andrea Grandi (andreagrandi) wrote :

N.B: I can mount these USB keys/disk manually without any problem, but this is of course a regression since Jaunty...

Revision history for this message
Tony Pursell (ajpursell) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information.

Please include the information requested at https://help.ubuntu.com/community/DebuggingUSBStorage as separate attachments.

affects: ubuntu → hal (Ubuntu)
Changed in hal (Ubuntu):
status: New → Incomplete
Revision history for this message
Andrea Grandi (andreagrandi) wrote :

Tony: I'll submit you all those information, but please note that this is happening with ALL USB keys/disks that previously worked fine on jaunty!

Revision history for this message
Andrea Grandi (andreagrandi) wrote :
Revision history for this message
Andrea Grandi (andreagrandi) wrote :
Revision history for this message
Andrea Grandi (andreagrandi) wrote :

And here all the other informations, as described in that page:

andrea@andrea-laptop:/mnt$ uname -a
Linux andrea-laptop 2.6.31-11-generic #38-Ubuntu SMP Fri Oct 2 11:55:55 UTC 2009 i686 GNU/Linux

andrea@andrea-laptop:/mnt$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu karmic (development branch)
Release: 9.10
Codename: karmic

do you need any other information?

Revision history for this message
Chris (cdekker) wrote :

I also had a problem mounting my USB drive in Karmic today. The issue stemmed from a change I made in /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy. In the section for INTERNAL disks (<action id="org.freedesktop.devicekit.disks.filesystem-mount-system-internal">), I had changed the <allow_active> to 'no' so I didn't get the authorisation window pop up every time the computer starts. This works fine in Karmic alpha 4 but in Karmic beta it blocks the mounting of my flash drive (the drive doesn't show up in the 'places' menu either).
Its not the end of the world for me (I reversed the change and now my flashdrive auto mounts again) but I think it is strange that this modification would affect a flash drive which is definitely not an internal drive.

Revision history for this message
Andrea Grandi (andreagrandi) wrote :

Chris: you really could help me to fix this problem :)

How can I change the value: org.freedesktop.devicekit.disks.filesystem-mount-system-internal ?

I tried to use "System->Administration->Autorizations" but I couldn't find it.

Thanks for your help!

Revision history for this message
Chris (cdekker) wrote :

This is copied from a (commented) odds-and-ends script I keep handy for future referencing if I run into such problems:
gksudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy
# in section <action id="org.freedesktop.devicekit.disks.filesystem-mount-system-internal">
# change <allow_active>no</allow_active>
# to <allow_active>auth_admin_keep</allow_active>

The first line is a command line to open the script.
The rest tells you how to change the script - then save it afterwards.

Revision history for this message
Andrea Grandi (andreagrandi) wrote :

@Chris: that line it's already <allow_active>auth_admin_keep</allow_active>
so it's not my case :(

p.s: I've just done a fresh re-install of Karmic, and it keeps having this problem... so IT'S a bug!

Revision history for this message
Chris (cdekker) wrote :

Perhaps its one bug, perhaps its two ... Its hard to say for me since it looks like a problem in the core system, not necessarily in a specific application. The more symptoms we can provide the better.

Revision history for this message
Andrea Grandi (andreagrandi) wrote :

I can give you all the information you want, just ask :)
I've no experience in debugging these kind of things, but I'm ready to help you to understand what the problem is, to be able to fix it before the final release is out.

Revision history for this message
Chris (cdekker) wrote :

That's very kind of you but I have too much on my plate right now to download the source code and go bug hunting in it. I will leave that for the people that are officially responsible for it.
I usually don't even bother with alpha or beta releases but since Jaunty includes a nasty kernel error that crashes the boot process on my machine [not everything gets fixed in time :( ] I decided to test Karmic now to make sure that I can at least use it. Still touch and go: alpha 4 worked, 5 and 6 useless, beta works again - hoping for the best though final release ... :)

Revision history for this message
Chris (cdekker) wrote :

My copy of Karmic beta refused to mount my Sandisk Cruzer USB drive today even though the stick works perfectly fine in another computer. Karmic seems to have problems with the partition table because when I run the fdisk -l command it only sees the U3 partition of the drive and not the actual data partition:

Disk /dev/sdb: 4103 MB, 4103937024 bytes
255 heads, 63 sectors/track, 498 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c710a

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 498 4000153+ b W95 FAT32

I tried to use a few other USB drives and they are being mounted just fine, though both have only one partition on them whereas the Cruzer has two partitions.

Revision history for this message
xgong (xgong) wrote :

Try this:
Move /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi to somewhere else

or Delete it by
sudo rm /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi

Then restart HAL service

It works for me and I guess may be HAL and Devkit-disk both want to take the charge of mounting and therefore conflict ~

Revision history for this message
Andrea Grandi (andreagrandi) wrote :

@Jackallen: it worked! Now plugging any USB disk/key it's mounted automatically, cool :)

But... there is still some problem... the disks names are totally fucked up :\
my USB pen for example is mounted in /media/DF68-FEB3 and my USB disk is mounted to /media/}
little strange, isn't?

And another thing: if I right click on these disk on the desktop icon, I cannot access to all their properties, for example it tell me it cannot determine the disk permission, nor I can rename them, ecc.... any idea?

Revision history for this message
xgong (xgong) wrote :

Sorry, I don't know the details of the mounting process and how the system get those property information

But I noticed that Chris suggest you to change the /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy

Maybe you should try to change them back ?

I installed Karmic yesterday and changed nothing but deleted that file. The USB storage auto mounted in /media/<their labels>, and the properties can be accessed. But I also cannot rename the disks, unless I choose to format them in the right click popup menu. The Palimpsest shows the label of the disk but it's in gray and unchangeable. Maybe there are some permission problems?

It's so weired that many people claims no such problems even after the latest upgrades. Probably it's related to the hardware ?

Revision history for this message
Andrea Grandi (andreagrandi) wrote :

@jackallen: I recently formatted my notebook and reinstalled Karmic from scratch, so I think I've the original .policy file.
could you please post your .policy file so I can compare?

Anyway, please all of you read this (found in the Ubuntu Karmic Beta release note): Ubuntu 9.10 Beta's underlying technology for power management, laptop hotkeys, and handling of storage devices and cameras maps has moved from "hal" (which is in the process of being deprecated) to "DeviceKit-power", "DeviceKit-disks" and "udev". When testing Ubuntu 9.10 Beta, please be alert for regressions in those areas and report any bugs you find.

So... actually we're filing a bug in "hal" section, but hal is now DEPRECATED. We really should move this bug to "DeviceKit-disks" or "udev", maybe it's a their problem and they should fix it.

This is clearly a regression in disk management and I think they really should fix it before the final release.

Revision history for this message
xgong (xgong) wrote :

Agree ! We should inform related groups about this bug !

Here's my policy package, considering I never edit them after the installation, I believe there will be no difference with yours. ?field.comment=Agree ! We should inform related groups about this bug !

Here's my policy package, considering I never edit them after the installation, I believe there will be no difference with yours.

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.