# Can't automount CDROM [SOLVED]

## dedrop

Though it used to work, I can't automount my CDROM anymore. I can mount the CD manually, and automounting works fine for USB keys, but hald doesn't seem to recognize when I put in a new CD. Anyone have any ideas?Last edited by dedrop on Thu Sep 28, 2006 12:46 am; edited 1 time in total

----------

## mickgreen

I have the same problem, I've tried re-emerging udev, hal, dbus, gnome-volume-manager and gnome-mount. But that doesn't help.

----------

## dedrop

Does anyone even know what exactly is supposed to happen when I put in a new CD? What is HAL supposed to do? And how does it know something's happened? That might give me a clue in finding out what isn't being triggered.

----------

## pizzach

Two points to watch for:

1.  In your fstab, make sure you have users in it like below:

```
/dev/cdrom              /cdrom          auto            users,noauto,ro         0 0
```

Alternatively, if you don't care where the cdrom gets mounted (not handy for the terminal), you can delete the entry altogether.  

2.  Make sure automounting is on in gnome or kde or whatever.  In gnome you go to Applications>System Tools>Settings editor  and look for Application>automounter or something like that.

----------

## dedrop

I'm letting automount decide where to mount it, so I've got no entry in my fstab. As for the actual automounting, I'm doing it without either KDE or Gnome; I'm just using hal and ivman. However, hal doesn't even seem to recognize that a CD was inserted, and so ivman never even gets a chance at it.

----------

## baobei

Hi, hope i can help.

First, dont be confused between the kernel automounter and automounting with your desktop app. I found the kernel automounter works great at the command line but not so good from kde. I dont know about gnome.

I have no automount support compiled into my kernel and i dont load it as a module.

Thus, you need a different tool for automounting in your desktop environment. This is where hal/dbus/pmount comes from.

What you will see in kde when all of this is working is a window opens asking you what you want to do when you insert your cd or plug in your device. Same as in xp when you put a cd in the tray. But, kde does more than xp as you will see when you get it all working. 

hal is the harware abstraction layer. It listens to the devices you have defined in hal.conf ( i think most of these config files are found in /usr/share/hal, now i forget ). I think the user level config files are in /etc.

hal registers itself with d-bus (data bus) which is an api to applications that wish to learn of system events via dbus. Therefore, an application will register with dbus and hal events will be passed to it. Then in kde, one of the ioslaves (registered with dbus) would call pmount to do the actual mounting. 

In my setup, i only use hal, dbus. I have no pmount or ivman. Some people will say i am bad because i am using hal's fstab-sync option to manage the automounting of my cds. This option allows hal to modify your mtab which is considered bad. I still use this old method because i find it works better than pmount or ivman. Most will disagree with me i think. 

hal comes auto configured for your cd drives (plus other devices) so dont worry about that unless you have some odd device. D-bus is automatically configured to work with hal (actually, hal depends on dbus). So that should not be your problem.

If you have automounting compiled into your kernel and you dont need it. Take it out or dont load it.

Choose either pmount or ivman to manage your automounting. You dont need both. I used pmount with kde and it worked pretty good but that required a little config in /etc/pmount.allow. I know nothing about ivman.

To summarize (my setup):

1. no kernel support for automounting.

2. hal/dbus/pmount (add devices to /etc/pmount.allow)

3. nothing in fstab for my devices.

4. /media directory

After hal/dbus/pmount are installed, reemerge kdebase-kioslaves if using kde.

----------

## ekenberg

Did anyone succeed in resolving this? I've got the same problem since a few days. KDE 3.5.2. KDE media:/ doesn't show my CDROM/DVD anymore. Other storage media like local harddrives, external USB-drives etc show up fine. Just CDROM/DVD that seem to have disappeared from the hal/dbus/kde chain.

CDROM/DVD work nicely if you mount them manually from the command line, so it's not a hardware issue.

Could it have to do with upgrading to glibc/gcc to 2.4/4.1 and completely reemerging the system (following the guide at http://www.gentoo.org/doc/en/gcc-upgrading.xml)?

----------

## DecayCell

Ditto here, it's REALLY annoying. Anyone has any lead?  :Confused: 

----------

## peakeyed

I have  the same problem too    :Sad: 

----------

## trakon88

Hi,

if you use hal-0.5.7.1 you should read this: https://bugs.gentoo.org/show_bug.cgi?id=147598

greetings

alex

----------

## DecayCell

Thanks, Alex! Now we finally have a lead...

----------

## ekenberg

 *DecayCell wrote:*   

> Thanks, Alex! Now we finally have a lead...

 

But it didn't help much.   :Sad: 

I'm using hal 0.5.7.1-r1 with the patch from that bugreport, and my CD/DVD is still invisible in KDE media:/

----------

## ekenberg

Hey guys, I just found this: https://bugs.gentoo.org/show_bug.cgi?id=146910

Although the "solution" proposed by the original poster is wrong according to the dev, it actually works. After following the instructions (editing /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi) and restarting hald + kded, the CDROM/DVD is back in media:/ !!

Apparently this bug also affects KDE 3.5.2 and not only 3.5.4 (I'm using 3.5.2).

Perhaps it's more correct to revert hald back to 0.5.5.1-r3, but I'm considering sticking with 0.5.7.1-r1 and the above hack, for fear of breaking something else in the process of reverting hald.

----------

## dedrop

Well, apparently the new ebuild for hal (sys-apps/hal-0.5.7.1-r1) fixes the problem, without the need for any other hack. Just emerge -u hal and all is goodness once again.

----------

