On 1/12/2011 11:11 AM, Michael Sullivan wrote:
> OK, for several years I have not had a /dev/cdrom.  My workstation has
> an internal cd-rom drive, which gets mapped to /dev/hda, and an external
> DVD+R drive, which is mapped to /dev/sr0.  When I look
> at /etc/udev/rules.d/70-persistent-cd.rules I see:

I just went through this exact same problem, and it turned out that
having both the old ATA drivers and the new libata drivers in my kernel
at the same time was the root of the problem.  I had multiple drivers
fighting for the same device, and it confused udev for some reason.  The
end result was, udev never picked up that the IDE drive was actually a
CD-ROM, so it never ran the udev rules to automatically regenerated
70-persistent-cd.rules.

The existing rules you have don't work because the ID_PATH isn't valid:

ENV{ID_PATH}=="pci-0000:00:1f.1-ide-0:0"

The "-ide-0:0" part no longer shows up when you get the udev ID_PATH for
a device using the old ATA drivers, so there are no matching udev rules
to create the symlinks.

I fixed it by switching over completely to libata, like this:

1. Delete the 70-persistent-cd.rules file from /etc/udev.  (If
everything is working correctly, udev will regenerate this file from
scratch the next time you start it.)

2. In your kernel config, under Device Drivers --->
* Make sure that ATA/ATAPI/MFM/RLL support is /not/ selected.
* Enable Serial ATA and Parallel ATA
* Under Serial ATA and Paralle ATA --->
** Enable ATA SFF support
** Below that, enable ATA BMDMA support[1]
** Below that, enable whatever IDE chipset you have

3. Back under Device Drivers --->
* Under SCSI device support --->
** Enable SCSI disk support
** Enable SCSI CDROM support
** /Do not/ enable SCSI Generic support[2]

Build/install/reboot and you should now see your two CD drives appearing
as sr0 and sr1.  udev should now pick them both up, and write a new
70-persistent-cd.rules file, with the IDE drive having a different
ID_PATH, something like:

ENV{ID_PATH}=="pci-0000:00:1f.1-scsi-0:0:0:0"

And you should now get your symlinks.

[1] BMDMA is the controller type in all of the machines I have, and
seems to be the standard for most personal desktop/laptop/etc machines.
 If you know differently, of course, pick the correct SFF controller.

[2] The SCSI generic driver has a habit of grabbing my other SCSI
devices and assigning them to sg0/sg1/sg2/etc; this seemed to prevent
udev from picking up that they were CD drives.  If you need SCSI Generic
for some reason, I'd suggest making it a module.

--Mike

Reply via email to