Bug 163813 - fstab-sync fails with "error: libhal_ctx_init_direct: (null): (null)"
fstab-sync fails with "error: libhal_ctx_init_direct: (null): (null)"
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-21 08:09 EDT by Bill Crawford
Modified: 2013-03-13 00:48 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-12 13:42:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Crawford 2005-07-21 08:09:19 EDT
Description of problem:
error: libhal_ctx_init_direct: (null): (null)

Version-Release number of selected component (if applicable):
0.5.3-2

How reproducible:
run "fstab-sync" in root shell

Actual results:
error message as shown
fails to detect cdrom, no entry added to /etc/fstab

Expected results:
will create /dev/cdrom entry in /etc/fstab

Additional info:
I appear to have no /dev/cdrom but the drive is there.
Manually creating a symlink cdrom -> hdc in /dev allows other programs to work
correctly, but ...
Comment 1 Sammy 2005-07-21 09:48:10 EDT
I can confirm this too. 
 
Comment 2 Bill Crawford 2005-07-21 10:00:43 EDT
It sometimes works.

I'm still having trouble with xcdroast, I'll 'zilla that separately later.
Comment 3 Bill Crawford 2005-07-21 10:03:40 EDT
Actually, the plot thickens: it is now working at boot time (adding cdwriter ->
hdc) since I removed "alias radeonfb off" from /etc/modprobe.conf

I wouldn't know where to file this one ...

Still fails with that error message if I run "fstab-sync" from a console.
Comment 4 Sammy 2005-07-21 14:06:37 EDT
It worked at boot time for me too. It does have the correct fstab entry. However, no 
logical link.....logical link is done by udev, I believe! 
Comment 5 Jacob Kroon 2005-09-05 08:16:45 EDT
I'm having the same problem with fstab-sync bailing out:

bash$ /usr/sbin/fstab-sync
error: libhal_ctx_init_direct: (null): (null)

As a consequence I can't mount my portable MP3-player, even though it shows up
in Nautilus under "Computer", and the device _is_ created at /dev/sda.

bash$ rpm -q hal
hal-0.5.4-3
Comment 6 Alexander Hunziker 2005-09-05 18:54:40 EDT
Confirm this on a machine running Arch Linux (http://www.archlinux.org) with
newest hal and dbus.
Comment 7 Jeremy Katz 2005-09-06 22:32:18 EDT
It looks like there is a "fix" for this in hal CVS by changing the category of
audio players back to storage instead of portable_audio_player.  That doesn't
quite seem entirely like the right fix, though.

2005-08-31  Danny Kukawka <danny.kukawka@web.de>

        * fdi/information/10freedesktop/10-usb-music-players.fdi:
        Removed merge of not useful key info.category=portable_audio_player.
        This merge breakes the storage policy and prevent mount of USB storage
        players. See bug: https://bugzilla.novell.com/show_bug.cgi?id=113966
Comment 8 John (J5) Palmieri 2005-11-08 11:38:25 EST
It isn't the right fix per say.  David says category is broken and shouldn't be
used by programs.  The fix is to have fstab-sync look at info.capabilities.  I
will look into fixing this in fstab-sync
Comment 9 Tom London 2005-11-08 11:45:44 EST
I don't suppose this is related:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=171296

(mount points, etc. not created for lvm vol-group on USB drive)?
Comment 10 John (J5) Palmieri 2005-11-08 11:51:24 EST
Nope bug 171296 looks like it deals with a /dev/ device node not being created.
 That would be a udev issue.
Comment 11 John (J5) Palmieri 2005-11-08 13:16:37 EST
Ok this isn't right.  I looked through the code and it is looking at
capabilities correctly.  The problem looks deeper.  

The error - libhal_ctx_init_direct: (null): (null) is a red herring when running
from fstab-sync from the console.  fstab-sync needs to run from a hal callout so
it can get a direct connection to HAL (hal does this to avoid spamming the bus).
 The biggest problem there is the code errors out without setting an error hense
the (null): (null) which upstream should deal with.

Anyway, I think this is a udev problem.  Can you attach the contents of lshal
and fstab when the cdrom does not work?  Also a better discription of what goes
wrong.  Thanks.
Comment 12 Tom London 2005-11-12 13:39:53 EST
Works for me with today's rawhide:

Inserting iPod mini now results in /media/ipod being created and mounted.
Comment 13 Jeremy Katz 2005-11-12 13:42:31 EST
Yep, J5 fixed it

Note You need to log in before you can comment on or make changes to this bug.