Bug 132358 - hald doesn't produce /media/cdrom link
hald doesn't produce /media/cdrom link
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
Depends On:
  Show dependency treegraph
Reported: 2004-09-11 11:10 EDT by Steve Grubb
Modified: 2013-03-05 22:41 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-12 12:22:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output from verbose run (33.60 KB, text/plain)
2004-09-11 11:12 EDT, Steve Grubb
no flags Details
Output from lshal (35.31 KB, text/plain)
2004-09-11 11:13 EDT, Steve Grubb
no flags Details

  None (edit)
Description Steve Grubb 2004-09-11 11:10:29 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4.2)

Description of problem:
The hal package does not create a /media/cdrom link. The cdrom is

Will attach output from lshal and verbose.

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

How reproducible:

Steps to Reproduce:
1. ls /media

Actual Results:  [root@buildhost hal]# ls /media/
idedisk  idedisk1  scsidisk  scsidisk1

Expected Results:  cdrom added to the above

Additional info:

[root@buildhost hal]# udevinfo -r -q name -p /block/hdc

from /var/log/messages:

Sep 11 10:45:42 buildhost fstab-sync[2653]: added mount point
/media/idedisk for /dev/hda5
Sep 11 10:45:42 buildhost fstab-sync[2659]: added mount point
/media/idedisk1 for /dev/hda1
Sep 11 10:45:43 buildhost fstab-sync[2690]: added mount point
/media/scsidisk for /dev/sda2
Sep 11 10:45:43 buildhost fstab-sync[2693]: added mount point
/media/scsidisk1 for /dev/sda1
Comment 1 Steve Grubb 2004-09-11 11:12:21 EDT
Created attachment 103722 [details]
Output from verbose run
Comment 2 Steve Grubb 2004-09-11 11:13:11 EDT
Created attachment 103723 [details]
Output from lshal
Comment 3 David Zeuthen 2004-09-12 04:56:55 EDT
Hi, it seems hal properly detects your cdrom drive but fstab-sync
refuses to add an entry to the fstab since a) there is already an
entry for /dev/cdrom; and b) /dev/cdrom is a symlink pointing to

In fact, since /dev/cdrom and /dev/hdc are the same, fstab-sync
actually changes the block.device property on the hal device object
representing your optical drive such that e.g. gnome-volume-manager
can simply do a 'mount /dev/cdrom' and everything works.

I suppose this entry was left by the installer or kudzu from back when
updfstab was part of kudzu. 

So, this is in fact a feature (and a nice one I might add: you don't
want two entries in the fstab for the same device), not a bug. Would
you agree? (I will close with NOTABUG if you concur)
Comment 4 Steve Grubb 2004-09-12 09:21:51 EDT
OK, I was under the impression that /dev/cdrom is deprecated and
/media/cdrom is the new location. Does this mean that all cdrom
software needs to be patched to try /dev/cdrom and /media/cdrom?

You can close this PR if this is the case.
Comment 5 David Zeuthen 2004-09-12 12:22:26 EDT
Well, using and relying on /dev/cdrom is kind of broken since there
may be more than one optical drive in the system. Also, relying on a
specific mount point is also broken for the same reason. As far as I
understand FHS2.3 all filesystems for removable media is to be mounted
in /media (and hotpluggable drives without removable media since I
consider such to be considered removable media as well).

My opinion: software in general and desktop software in particular
should rather be asking the hal daemon or looking at sysfs to find the
optical drive or other devices with the desired capabilities - thus it
needs to be patched anyway. 

And for good UI the software should rather expose


or maybe even better

 Internal DVD-ROM drive       [X]
 External CD-RW/DVD-RW drive  [ ]

rather than asking for the device file

 [/dev/cdrom             ]

which may be /dev/sr0 or /dev/cdrom1 for an external USB2 drive. All
in all, neither special device files nor mount points should appear in
any user interface. But all this is still a bit in the future.

However, to preserve backwards compatibility udev now creates
/dev/cdrom, /dev/cdrom1, ... compat symlinks. Also then pam_console
gets it right and the right permissions are applied such that the user
can eject optical discs.

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