udev assigns wrong group to USB device partition

Bug #19215 reported by Damon W
6
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Invalid
Medium
Martin Pitt

Bug Description

I am running Breezy on a Dell Inspiron 6000 (though the same problem exists on
Compaq Armada m300).

All packages are up-to-date.

When a Sandisk 1Gb USB Storage device is plugged into USB port, "Sandisk Cruzer
Mini" shows up in the "Computer" section. However, it is not automounted. When I
right-click and choose "Mount Volume" I receive an error:
"Unable to mount selected volume." Details: "mount: can't find /dev/sdb in
/etc/fstab or /etc/mtab"

The device is /dev/sdb1, NOT just /dev/sdb.

The only way I am able to mount the device with r/w/x permissions for the
current user is to "pmount /dev/sdb1 usbdisk". This then mounts the device and
shows it on the desktop and the "Places" menu as "usbdisk".

Please see attachments for more technical info. If there is anything else you
need to help fix this, just let me know.

Output of id:
uid=1000(damon) gid=1000(damon)
groups=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),104(lpadmin),105(scanner),106(admin),1000(damon)

Revision history for this message
Damon W (damonw5) wrote :

Created an attachment (id=3096)
dmesg output

Revision history for this message
Damon W (damonw5) wrote :

Created an attachment (id=3097)
gvm output

Revision history for this message
Damon W (damonw5) wrote :

Created an attachment (id=3098)
lshal output

Revision history for this message
Damon W (damonw5) wrote :

The same problem (lack of automount, GUI mount not working) exists with my Ipod
mini, which acts as a mass storage device.

Both the Ipod Mini and Cruzer Mini automounted in Hoary without problems.

Revision history for this message
Warren Butler (warrenbutler1) wrote :

Same problem here.

Dell Latitude CPi, Breezy will all the latest updates

Same problem (same behaviour and messages), and same workaround.

Did work with Hoary.

Revision history for this message
Jools Wills (jools) wrote :

I believe this bug is related to the removal of the function sysfs_get_device_parent() from kernels 2.6.12 and greater.
I have built the latest libsysfs1 from debian, which has just addressed this bug and now my devices are being automounted.

I am running hoary, but if the problem is in breezy I guess its due to breezy needing an updated libsysfs

Please see

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314985

for more information.

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #6)
> I believe this bug is related to the removal of the function
sysfs_get_device_parent() from kernels 2.6.12 and greater.
> I have built the latest libsysfs1 from debian, which has just addressed this
bug and now my devices are being automounted.
>
> I am running hoary, but if the problem is in breezy I guess its due to breezy
needing an updated libsysfs

Breezy has an up to date version for months:

 libsysfs1 | 1.3.0-2 | http://archive.ubuntu.com breezy/main Packages
sysfsutils | 1.3.0-2 | http://archive.ubuntu.com breezy/main Sources

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #0)
> The device is /dev/sdb1, NOT just /dev/sdb.

Right, the kernel correctly recognizes it, but it is not known to hal.

If the device is plugged in, can you please show me the output of

  ls -l /dev/sdb*

? Also, can you please try to get a full hal debugging output as described on
the second half of

  https://wiki.ubuntu.com/DebuggingRemovableDevices

Thanks!

Revision history for this message
Damon W (damonw5) wrote :

> If the device is plugged in, can you please show me the output of
> > ls -l /dev/sdb*
Output:

brw-rw---- 1 root floppy 8, 16 2005-07-29 18:09 /dev/sdb
brw-rw---- 1 root disk 8, 17 2005-07-29 18:09 /dev/sdb1

> ? Also, can you please try to get a full hal debugging output as described on
> the second half of https://wiki.ubuntu.com/DebuggingRemovableDevices

Running the command as specified says that --drop-privileges is an unrecognized
option. Omitting that option gives the attached hal.log file.

> Thanks!
You're welcome... Thank you!

Revision history for this message
Damon W (damonw5) wrote :

Created an attachment (id=3146)
hal.log

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #9)
> > If the device is plugged in, can you please show me the output of
> > > ls -l /dev/sdb*
> Output:
>
> brw-rw---- 1 root floppy 8, 16 2005-07-29 18:09 /dev/sdb
> brw-rw---- 1 root disk 8, 17 2005-07-29 18:09 /dev/sdb1

Hah, my gut feeling was right. sdb1 has the wrong group, so hal cannot read the
device.

> Running the command as specified says that --drop-privileges is an unrecognized
> option.

Ah, right, I updated the page; In Breezy, --drop-privileges doesn't exist any
more (it's the default), and there is now a --retain-privileges switch. Anyway,
we have to debug udev now, which seems to be the actual cause of that bug.

If the device is plugged in, can you please do:

   sudo sh -x /etc/udev/scripts/removable.sh sdb > removable-sdb.txt 2>&1
   sudo sh -x /etc/udev/scripts/removable.sh sdb1 > removable-sdb1.txt 2>&1

and attach removable-sdb.txt and removable-sdb1.txt here?

Revision history for this message
Damon W (damonw5) wrote :

> If the device is plugged in, can you please do:
> sudo sh -x /etc/udev/scripts/removable.sh sdb > removable-sdb.txt 2>&1
Gives:
sh: /etc/udev/scripts/removable.sh: No such file or directory

> sudo sh -x /etc/udev/scripts/removable.sh sdb1 > removable-sdb1.txt 2>&1
gives same output.

Here is the result of ls /etc/udev/scripts :
cdsymlinks.sh ide-devfs.sh inputdev.sh scsi-devfs.sh
dvb.sh ide-model.sh raid-devfs.sh

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #12)
> > If the device is plugged in, can you please do:
> > sudo sh -x /etc/udev/scripts/removable.sh sdb > removable-sdb.txt 2>&1
> Gives:
> sh: /etc/udev/scripts/removable.sh: No such file or directory

Meh. So this is not Hoary, but Warty, I assume. Is it in /etc/udev? Can you
please do the same with /etc/udev/removable.sh?

Thanks

Revision history for this message
Petter Abrahamsson (lists-styx) wrote :

(In reply to comment #13)
> (In reply to comment #12)
> > > If the device is plugged in, can you please do:
> > > sudo sh -x /etc/udev/scripts/removable.sh sdb > removable-sdb.txt 2>&1
> > Gives:
> > sh: /etc/udev/scripts/removable.sh: No such file or directory
>
> Meh. So this is not Hoary, but Warty, I assume. Is it in /etc/udev? Can you
> please do the same with /etc/udev/removable.sh?

Sorry to jump in like this, but I'm having the same problem.
I think that Daemon is running Breezy (like myself) and unfortunately there is
no /etc/udev/removable.sh in Breezy.

I'd be happy to help with anything to fix this bug. I want my ipod to mount
automagically again =)

Revision history for this message
Martin Pitt (pitti) wrote :

I think this is really a dup of #13520. Can you please upgrade to the latest
udev (0.060-1ubuntu6) and check again?

Revision history for this message
Petter Abrahamsson (lists-styx) wrote :

(In reply to comment #15)
> I think this is really a dup of #13520. Can you please upgrade to the latest
> udev (0.060-1ubuntu6) and check again?

Sure thing, that did it. For some reason my udev wasn't up to date.
The remaining things seems to be covered in #13520.

Sorry for the noice and thanks for the good work.

Revision history for this message
Martin Pitt (pitti) wrote :

This bug has been marked as a duplicate of bug 19762.

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.