Does not automount hotplugged storage device - no USB, no CD/DVD

Bug #1093901 reported by Jan Cejka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udisks (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have fresh install of Ubuntu Precise on new disk and automount doesn't work on any USB storage device nor on CD/DVD.

The only possibility that "mounts" disk "automatically" is opening and closing usb-creator-gtk. Then disk is available (and mounted) in Nautilus. USB disk disappears from Nautilus after unmounting it using click to "open" button next to disk name in Nautilus. Using trick with usb-creator-gtk dosn't help everytime - e.g. Garmin Oregon 550 normally connects as 2 USB disks - main device + inserted sd card. However, usb-creator-gtk mounts only sd card.

I am able to mount disks manually.

I had the same behaviour on the same computer with my old installation (originally Ubuntu 5.10 or 6.06 with regular upgrades to Precise) - originally everything was working properly, problem with automounting has appeared probably sometimes between July and September (I don't remember exactly since I have attributed this to me messing up somehow my installation).

If you need any additional info, I can provide it from my current and also from old installation.

Jan

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gvfs 1.12.1-0ubuntu1.1
ProcVersionSignature: Ubuntu 3.2.0-35.55-generic-pae 3.2.34
Uname: Linux 3.2.0-35-generic-pae i686
ApportVersion: 2.0.1-0ubuntu15.1
Architecture: i386
Date: Wed Dec 26 22:45:43 2012
GvfsMonitorError:
 (gvfs-mount:7200): GVFS-RemoteVolumeMonitor-WARNING **: invoking IsSupported() failed for remote volume monitor with dbus name org.gtk.Private.GduVolumeMonitor: org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process /usr/lib/gvfs/gvfs-gdu-volume-monitor received signal 6
GvfsMonitorLog: Monitoring events. Press Ctrl+C to quit.
HotplugNewDevices: /dev/sdc /dev/sdc1
HotplugNewMounts:

InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release i386 (20120817.1)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=cs_CZ.UTF-8
 SHELL=/bin/bash
SourcePackage: gvfs
Symptom: storage
Title: Does not detect hotplugged storage device
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jan Cejka (jan-cejka) wrote :
Revision history for this message
Jan Cejka (jan-cejka) wrote :

After more searching I have found solution in Bug #571038 - https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/571038

Package that causes troubles - udisks

Symptoms:
# gvfs-mount -l
(gvfs-mount:7200): GVFS-RemoteVolumeMonitor-WARNING **: invoking IsSupported() failed for remote volume monitor with dbus name org.gtk.Private.GduVolumeMonitor: org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process /usr/lib/gvfs/gvfs-gdu-volume-monitor received signal 6

#gvfs-gdu-volume-monitor
libgdu:ERROR:gdu-pool.c:2369:device_recurse: assertion failed: (depth < 100)

Problem:
Problem is explained in linked bug by Mikhail Titov, comment #28 - https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/571038/comments/28
Cause of the problem is somehow "broken" partition table that udisks cannot parse properly. Udisks reads partition type 5 instead of real partition type and this leads to recursion.

Solution:
What solves the problem is patch from Mikhail, all steps explained in comment #46 - https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/571038/comments/46

Bug report was submitted to udisks, not solved since current version is 2.0.* and Ubuntu is using version 1.0.4

Would you, Ubuntu guys, make patched version of udisks (using Mikhail's patch) available through your repositories? Many "automount not working" bugs as well as some other bugs like palimpsest might be influenced by this bug.

affects: gvfs (Ubuntu) → udisks (Ubuntu)
Changed in udisks (Ubuntu):
status: New → Confirmed
Revision history for this message
Jan Cejka (jan-cejka) wrote :

Solution - workaround that worked for me (no need to patch udisks).

Root cause of udisks problem is "bug" in partition table - nested partition on extended partition. System is functional, however, udisks reports wrong partition type because of this.

How you can find out if you are affected?
After running:
$ sudo fdisk -l /dev/sda
first line in otput is:
"omitting empty partition (5)" - message can be localized

If you have more hard disks, problematic disk is the one that gives "ommitting empty partition (5)" error.

Workaround - how I solved the issue?
My disk with problem was /dev/sda

$ sudo fdisk /dev/sda

Now type these fdisk commands:
x - go to expert mode
f - fix partition order (I did not do this since I did not have problem with order of partitions, however this can also cause problems)
w - write partition table back to the disk and exit - fdisk writes partitions back to disk correctly without nested partition and complains because some partitions are used ;-) - this was my case

$ sudo partprobe

Last I did update of grub

$ sudo update-grub

and then cross your fingers and restart... ;-)

One more observation - Nautilus - I have the impression that before fixing partition table I did not see in Nautilus any hdd partitions that are not mounted (in Places or Devices or what is the name in english version). These partitions were not visible even after applying Mikhail's patch (when all the automount was working correctly for newly inserted devices - new devices were visible in Nautilus). After fixing partition table all is working correctly, non-mounted partitions are visible in Nautilus and can be mounted by single click.

Revision history for this message
Jan Cejka (jan-cejka) wrote :
Download full text (4.2 KiB)

Now some information for programmers if you would like to understand and replicate the problem - fdisk outputs, MBR, EBR's (all before partition table correction). Sorry, texts are localized, however numbers matter... ;-)

Fdisk:
honza@priserka:~$ sudo fdisk /dev/sda
vynechávám prázdný oddíl (5)

Příkaz (m pro nápovědu): p

Disk /dev/sda: 160.0 GB, 160041885696 bytes
hlav: 255, sektorů na stopu: 63, cylindrů: 19 457, celkem 312 581 808 sektorů
Jednotky = sektory po 1 * 512 = 512 bajtech
Velikost sektoru (logického/fyzického): 512 bajtů / 512 bajtů
Velikost I/O (minimální/optimální): 512 bajtů / 512 bajtů
Identifikátor disku: 0x25f625f5

Zařízení Zavádět Začátek Konec Bloky Id Systém
/dev/sda1 * 63 65529134 32764536 7 HPFS/NTFS/exFAT
/dev/sda2 65529135 270438209 102454537+ f W95 Rozš. (LBA)
/dev/sda3 270438210 312576704 21069247+ 83 Linux
/dev/sda5 65529198 266229179 100349991 7 HPFS/NTFS/exFAT
/dev/sda6 266229243 270438209 2104483+ 82 Linux swap/Solaris

Příkaz (m pro nápovědu): x

Příkaz pro odborníky (m pro nápovědu): p

Disk /dev/sda: hlav: 255, sektorů: 63, cylindrů: 19 457

Č. AF Hd Sek Cyl Hd Sek Cyl Začátek Vel. Id
 1 80 1 1 0 254 63 1022 63 65529072 07
 2 00 254 63 1022 254 63 1022 65529135 204909075 0f
 3 00 254 63 1022 254 63 1022 270438210 42138495 83
 4 00 0 0 0 0 0 0 0 0 00
 5 00 1 1 1022 253 2 1022 63 200699982 07
 6 00 1 1 1022 188 18 1022 1 4208967 82

Příkaz pro odborníky (m pro nápovědu): q
honza@priserka:~$

MBR:
honza@priserka:~$ hexdump mbr
0000000 63eb d090 00bc fb7c 0750 1f50 befc 7c1b
0000010 1bbf 5006 b957 01e5 a4f3 bdcb 07be 04b1
0000020 6e38 7c00 7509 8313 10c5 f4e2 18cd f58b
0000030 c683 4910 1974 2c38 f674 b5a0 b407 0203
0000040 00ff 2000 0001 0000 0200 90fa f690 80c2
0000050 0275 80b2 59ea 007c 3100 8000 0001 0000
0000060 0000 0000 faff 9090 c2f6 7480 f605 70c2
0000070 0274 80b2 79ea 007c 3100 8ec0 8ed8 bcd0
0000080 2000 a0fb 7c64 ff3c 0274 c288 bb52 0417
0000090 2780 7403 be06 7d88 17e8 be01 7c05 41b4
00000a0 aabb cd55 5a13 7252 813d 55fb 75aa 8337
00000b0 01e1 3274 c031 4489 4004 4488 89ff 0244
00000c0 04c7 0010 8b66 5c1e 667c 5c89 6608 1e8b
00000d0 7c60 8966 0c5c 44c7 0006 b470 cd42 7213
00000e0 bb05 7000 76eb 08b4 13cd 0d73 c2f6 0f80
00000f0 d084 be00 7d93 82e9 6600 b60f 88c6 ff64
0000100 6640 4489 0f04 d1b6 e2c1 8802 88e8 40f4
0000110 4489 0f08 c2b6 e8c0 6602 0489 a166 7c60
0000120 0966 75c0 664e 5ca1 667c d231 f766 8834
0000130 31d1 66d2 74f7 3b04 0844 377d c1fe c588
0000140 c030 e8c1 0802 88c1 5ad0 c688 00bb 8e70
0000150 31c3 b8db 0201 13cd 1e72 c38c 1e60 00b9
0000160 8e01 31db bff6 8000 c68e f3fc 1fa5 ff61
0000170 5a26 be7c 7d8e 03eb 9dbe e87d 0034 a2be
0000180 e87d 002e 18cd feeb 5247 4255 0020 6547
0000190 6d6f 4800 7261 2064 6944 6b73 5200 6165
00001a0 0064 4520 7272 726f 0a0d bb00 0001 0eb4
00001b0 10cd 3cac 7500 c3f4 25f5 25f6 0000 0180
00001c0 0001 fe07 feff 003f 0000 e4f0 03e7 fe00
00001d0 feff fe0f feff e52f 03e7 aa13 0c36 fe00
00001e0 feff fe83 feff 8f42 101e fb7f 0282 0000
00001f0 0000 0000 0000 0000 000...

Read more...

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.