On Sat, 02 Jul 2011 14:37:35 +0000, T o n g wrote:

> On Tue, 28 Jun 2011 17:07:08 +0000, Camaleón wrote:
> 
>>> On my system the /dev/cdrom is actually DVD while My CD is actually
>>> /dev/ cdrom1.
>> 
>> That does not match with a "correct" fstab file.
>> 
>> Your primary device (dvd?) should point to "/dev/cdrom0" and secondary
>> (cd-rom?) to "/dev/cdrom1".
> 
> Hmmm, Ok, maybe I've trimmed that trailing "0" from my primary device.
> Here is how it looks now:
> 
> $ cat /etc/udev/rules.d/70-persistent-cd.rules 
> # This file maintains persistent names for CD/DVD reader and writer devices.
> # See udev(7) for syntax.
> #
> # Entries are automatically added by the 75-cd-aliases-generator.rules 
> # file; however you are also free to add your own entries provided you 
> # add the ENV{GENERATED}=1 flag to your own rules as well. 

(...)

Okay, let's then base in those rules. I can guess that you want:

- DVD to be under "/dev/dvd"
- CD-R to be under "/dev/cdrom"

Is that right? If no, just make your own adjustements. If yes, I would 
try:

# DVD-RW_DVR-110D (pci-0000:00:06.0-scsi-0:0:1:0)
#SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:06.0-scsi-0:0:1:0", SYMLINK+="cdrom", 
ENV{GENERATED}="1"
#SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:06.0-scsi-0:0:1:0", SYMLINK+="cdrw", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:06.0-scsi-0:0:1:0", SYMLINK+="dvd", 
ENV{GENERATED}="1"
#SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:06.0-scsi-0:0:1:0", SYMLINK+="dvdrw", 
ENV{GENERATED}="1"

# CD-RW_CRX195E1 (pci-0000:00:06.0-scsi-0:0:0:0)
#SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:06.0-scsi-0:0:0:0", SYMLINK+="cdrom1", 
ENV{GENERATED}="1"
#SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:06.0-scsi-0:0:0:0", SYMLINK+="cdrw1", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:06.0-scsi-0:0:0:0", SYMLINK+="cdrom", 
ENV{GENERATED}="1"

# Virtual_CD_070A (pci-0000:00:02.1-usb-0:8:1.0-scsi-0:0:0:1)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_SERIAL}=="WD_Virtual_CD_070A_575837304139393534343636-0:1", 
SYMLINK+="cdrom2", ENV{GENERATED}="1"

That is:

- From the DVD entries, disable (#) all but the one that makes "dvd" 
node.
- From the CD-R entries, disable (#) all and add a new one that makes 
"cdrom" node.

After making the changes, restart or re-run udev rules to regenerate 
them.

>> Yep, or use udev rules:
>> 
>> CD/DVD drives
>> http://reactivated.net/writing_udev_rules.html#example-cdrom
> 
> Where should I put those rules? I believe that /etc/udev/rules.d/70-
> persistent-cd.rules is automatically generated by the 75-cd-aliases-
> generator.rules. I hope that I can put those rules in a standalone file
> which can overwrite settings in
> /etc/udev/rules.d/70-persistent-cd.rules.

You can edit the same file. If after that it works as you want, you can
then put them in another file, just read Debian udev the docs to follow 
the instructions. As you already pointed out, this has changed in a very 
short period of time so depending on your Debian version, YMMV.
 
> BTW, that document is about 5 years old now, and my Debian doesn't have
> commands like udevtrigger, udevcontrol and udevtest for udev rules
> testing and debugging and more.
> 
> What are the equivalents for them?

Yep, udevadm (as Brian suggested) should point to the new commands. Whether 
in doubt, restarting also help.

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.07.02.16.06...@gmail.com

Reply via email to