Jun

29

HAL legt Gnome Automounting lahm

Posted by : Florian Löffler | On : 29.06.2009

Nach dem letzten Update meines Gentoo Systems musste ich feststellen, dass das Automounting von Wechseldaträgern wie USB-Sticks unter Gnome nicht mehr funktionierte.
Nach einigem Googeln brachte mich ein Blogeintrag auf “Der Standardleitweg” der Problemlösung ein gutes Stück näher.

Für die Ungeduldigen:
HAL war der Schuldige. Beim Update auf sys-apps/hal-0.5.12_rc1-r6 wurde ein neues USE-Flag “disk-partition” eingeführt, welches per default nicht aktiviert ist. Nach einem re-compile mit aktiviertem “disk-partition” Flag lief alles wieder wie geschmiert.

Für alle Interessierten folgt noch der komplette Lösungsweg…

1. Debugging aktivieren

Zu Anfang aktivierte ich das Debugging für HAL in der /etc/conf.d/hald

# Should HAL be verbose to syslog? Useful for debugging
HALD_VERBOSE="yes"
2. Fehlersuche

Im Syslog unter /var/log/messages lässt sich dann Folgendes beim Einstecken eines USB-Sticks beobachten:

Jun 29 09:47:35 acer hald[7265]: 09:47:35.013 [I] osspec.c:247: SEQNUM=2177, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sdb, DEVNAME=/dev/sdb, IFINDEX=0
Jun 29 09:47:35 acer hald[7265]: 09:47:35.013 [I] hotplug.c:435: checking event /sys/block/sdb
Jun 29 09:47:35 acer hald[7265]: 09:47:35.013 [I] osspec.c:980: hal_util_find_known_parent: '/sys/block/sdb'->'/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4/2-4.2/2-4.2.1/2-4.2.1:1.0/host4/target4:0:0/4:0:0:0'
Jun 29 09:47:35 acer hald[7265]: 09:47:35.013 [I] blockdev.c:904: block_add: sysfs_path=/sys/block/sdb dev=/dev/sdb is_part=0, parent=0x080da9b0
Jun 29 09:47:35 acer hald[7265]: 09:47:35.013 [D] blockdev.c:1193: block_add: info.subsystem='scsi'
Jun 29 09:47:35 acer hald[7265]: 09:47:35.013 [D] blockdev.c:1193: block_add: info.subsystem='scsi_host'
Jun 29 09:47:35 acer hald[7265]: 09:47:35.013 [D] blockdev.c:1193: block_add: info.subsystem='usb'
Jun 29 09:47:35 acer hald[7265]: 09:47:35.013 [I] blockdev.c:1308: parent_bus is scsi
Jun 29 09:47:35 acer hald[7265]: 09:47:35.014 [I] blockdev.c:530: Probing storage device /dev/sdb
Jun 29 09:47:35 acer hald[7265]: 09:47:35.014 [D] hotplug.c:453: events queued = 0, events in progress = 1
Jun 29 09:47:35 acer hald[7265]: 09:47:35.022 [I] blockdev.c:415: entering; exit_type=0, return_code=127
Jun 29 09:47:35 acer hald[7265]: 09:47:35.022 [D] hotplug.c:453: events queued = 0, events in progress = 0
Jun 29 09:47:35 acer hald[7265]: 09:47:35.022 [D] hotplug.c:458: Hotplug-queue empty now ... no hotplug events in progress
Jun 29 09:47:35 acer hald[7265]: 09:47:35.057 [I] osspec.c:247: SEQNUM=2178, ACTION=add, SUBSYSTEM=block, DEVPATH=/sys/block/sdb/sdb1, DEVNAME=/dev/sdb1, IFINDEX=0
Jun 29 09:47:35 acer hald[7265]: 09:47:35.057 [I] hotplug.c:435: checking event /sys/block/sdb/sdb1
Jun 29 09:47:35 acer hald[7265]: 09:47:35.057 [I] blockdev.c:904: block_add: sysfs_path=/sys/block/sdb/sdb1 dev=/dev/sdb1 is_part=1, parent=0x00000000
Jun 29 09:47:35 acer hald[7265]: 09:47:35.057 [I] blockdev.c:1015: Ignoring hotplug event - no parent
Jun 29 09:47:35 acer hald[7265]: 09:47:35.057 [W] blockdev.c:1577: Not adding device object
Jun 29 09:47:35 acer hald[7265]: 09:47:35.057 [D] hotplug.c:453: events queued = 0, events in progress = 0
Jun 29 09:47:35 acer hald[7265]: 09:47:35.057 [D] hotplug.c:458: Hotplug-queue empty now ... no hotplug events in progress

Besonders interessant ist die hervorgehobene Zeile. Die Partition /dev/sdb1 kann aus irgendeinem Grund nicht korrekt eingebunden werden. Im Block darüber wird allerdings das Device an sich als /dev/sdb einwandfrei erkannt und via SCSI Emulation angesprochen.
Irgendetwas scheint also nicht mit den Partitionen zu stimmen. Das Device /dev/sdb selbst wird ja korrekt eingebunden.

Also erstmal den HAL ebuild genauer unter die Lupe nehmen.

acer ~ # equery uses sys-apps/hal
[ Searching for packages matching sys-apps/hal... ]
[ Colour Code : set unset ]
[ Legend : Left column  (U) - USE flags from make.conf              ]
[        : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for sys-apps/hal-0.5.12_rc1-r6 ]
 U I
 + + X              : Adds support for X11
 + + acpi           : Adds support for Advanced Configuration and Power Interface
 - - apm            : Adds APM (Advanced Power Management) support
 - - consolekit     : Enables HAL to interact with consolekit for determining whether a given process is running on behalf of the person setting at the console.
 + + crypt          : Add support for encryption -- using mcrypt or gpg where applicable
 - - debug          : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
 - - dell           : Builds and installs the Dell addon, which reads data from the Dell SM BIOS via sys-libs/libsmbios. It will read your service tag information and your hardware backlight data as well as allow you to modify the backlight settings on a Dell laptop.
 - - disk-partition : Allows HAL to use libparted from sys-apps/parted to read raw partition data from your disks and process that data. Future versions of HAL (possibly 0.5.11 and higher) will allow you to create, modify, delete and format partitions from a GUI interface agnostic of your desktop environment.
 - - doc            : Adds extra documentation (API, Javadoc, etc)
 - - kernel_FreeBSD : KERNEL setting for system using the FreeBSD kernel
 + + kernel_linux   : KERNEL setting for system using the Linux kernel
 - - laptop         : Adds support for power management scripts (sys-power/pm-utils)
 - - policykit      : Use sys-auth/policykit to gain privileges
 - - selinux        : !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur

Die Beschreibung des disk-partition USE-Flags hört sich im Zusammenhang mit der Unterstützung von Partitionen sehr vielversprechend an und ist zudem neu eingeführt worden. Sehr verdächtig ;)

3. Lösung

Gleich mal aktivieren mittels folgenden Eintrages in der /etc/portage/package.use.

sys-apps/hal disk-partition

Und danach HAL neu emergen und neu starten.

acer ~ # emerge -av --newuse sys-apps/hal
[...]
acer ~ # /etc/init.d/hald restart
[...]

Jetzt sollte das Automounting wieder so wie vor dem Update funktionieren.
Nicht vergessen das Debugging für HAL wieder zu deaktivieren, um das Zumüllen des Syslog zu verhindern.

Comments (2)

  1. Adlerweb said on 15. Juli 2009

    [...] Nach einigen erfolglosen Streifzügen durch die Nautilus- und gconf-Optionen sieß ich dann im Geek-Blog auf die Lösung des Problems: sys-apps/hal hat seit einigen Versionen ein neues USE-Flag [...]

  2. Stefan Bauer said on 24. Juli 2009

    Das setzen des disk-partition USE-Flags sollte eigentlich nicht nötig sein. Ich hatte den selben Fehler, Problem waren bei mir aber kaputte binäre Abhängigkeiten. revdep-rebuild hat das beseitigt.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht.