Gentoo Archives: gentoo-user

From: Mike Edenfield <kutulu@××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to get /dev/cdrom
Date: Wed, 12 Jan 2011 16:55:28
Message-Id: 4D2DDCAA.7000803@kutulu.org
In Reply to: [gentoo-user] How to get /dev/cdrom by Michael Sullivan
1 On 1/12/2011 11:11 AM, Michael Sullivan wrote:
2 > OK, for several years I have not had a /dev/cdrom. My workstation has
3 > an internal cd-rom drive, which gets mapped to /dev/hda, and an external
4 > DVD+R drive, which is mapped to /dev/sr0. When I look
5 > at /etc/udev/rules.d/70-persistent-cd.rules I see:
6
7 I just went through this exact same problem, and it turned out that
8 having both the old ATA drivers and the new libata drivers in my kernel
9 at the same time was the root of the problem. I had multiple drivers
10 fighting for the same device, and it confused udev for some reason. The
11 end result was, udev never picked up that the IDE drive was actually a
12 CD-ROM, so it never ran the udev rules to automatically regenerated
13 70-persistent-cd.rules.
14
15 The existing rules you have don't work because the ID_PATH isn't valid:
16
17 ENV{ID_PATH}=="pci-0000:00:1f.1-ide-0:0"
18
19 The "-ide-0:0" part no longer shows up when you get the udev ID_PATH for
20 a device using the old ATA drivers, so there are no matching udev rules
21 to create the symlinks.
22
23 I fixed it by switching over completely to libata, like this:
24
25 1. Delete the 70-persistent-cd.rules file from /etc/udev. (If
26 everything is working correctly, udev will regenerate this file from
27 scratch the next time you start it.)
28
29 2. In your kernel config, under Device Drivers --->
30 * Make sure that ATA/ATAPI/MFM/RLL support is /not/ selected.
31 * Enable Serial ATA and Parallel ATA
32 * Under Serial ATA and Paralle ATA --->
33 ** Enable ATA SFF support
34 ** Below that, enable ATA BMDMA support[1]
35 ** Below that, enable whatever IDE chipset you have
36
37 3. Back under Device Drivers --->
38 * Under SCSI device support --->
39 ** Enable SCSI disk support
40 ** Enable SCSI CDROM support
41 ** /Do not/ enable SCSI Generic support[2]
42
43 Build/install/reboot and you should now see your two CD drives appearing
44 as sr0 and sr1. udev should now pick them both up, and write a new
45 70-persistent-cd.rules file, with the IDE drive having a different
46 ID_PATH, something like:
47
48 ENV{ID_PATH}=="pci-0000:00:1f.1-scsi-0:0:0:0"
49
50 And you should now get your symlinks.
51
52 [1] BMDMA is the controller type in all of the machines I have, and
53 seems to be the standard for most personal desktop/laptop/etc machines.
54 If you know differently, of course, pick the correct SFF controller.
55
56 [2] The SCSI generic driver has a habit of grabbing my other SCSI
57 devices and assigning them to sg0/sg1/sg2/etc; this seemed to prevent
58 udev from picking up that they were CD drives. If you need SCSI Generic
59 for some reason, I'd suggest making it a module.
60
61 --Mike

Replies

Subject Author
Re: [gentoo-user] How to get /dev/cdrom Michael Sullivan <msulli1355@×××××.com>