Well, I have come to a new understanding of optical drive naming and just what openSUSE seems to be doing for us automatically each time we boot up SuSE. There is a file that registers each cdrom or dvd drive that is connected to our computers. It provides symbolic device links for each optical drive and places them in /dev folder.
And the name and the location of this file is:
/etc/udev/rules.d/70-persistent-cd.rules
Now my main openSUSE computer has but one optical drive and so here is a look at my 70-persistent-cd.rules optical configuration text file.
# This file was automatically generated by the /lib/udev/write_cd_rules
# program, run by the cd-aliases-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and set the $GENERATED variable.
# DVDRAM_GH24NS50 (pci-0000:00:12.0-scsi-2:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="cdrom1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="cdrw1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="dvd1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="dvdrw1", ENV{GENERATED}="1"
There will be a five line entry per optical drive you have installed in your system and a five line entry for any drive that used to exist, but has now been removed. My single optical DVD drive is an LG 24X model. But I had to get the box out to discover its model number was GH24NS50 as appears in the above file. After playing around with my optical drive I discovered that a new entry is made for each new or added drive found in your system. Further, for each additional optical drive installed, you will notice that the device names keep going up by one number. By that I mean the first optical drive uses cdrom1, cdrw1, dvd1, dvdrw1 while the next will be cdrom2, cdrw2, dvd2, dvdrw2 and on and on. If you replace a drive, you may find two entries with the same ending number. To see how this works, I went to kaffeine/KDE3 and modified the XINE media entries for cdrom and dvd to be /dev/cdrom1 & /dev/dvd1 respectivly. I had changed them both to /dev/sr0 which is the actual drive name for my optical drive. Using the new names found in the 70-persistent-cd.rules text file causes a DVD to play in Kaffeine.
Now one thing may become obvious here. There is no entry that specifies** /dev/dvd or /dev/cdrom**, the two names that seem to show up all over Linux for optical drives. The answer is simple, there is no automatic method that can assign these names that makes sense since only one optical drive can be /dev/dvd or /dev/cdrom, though these two names could point to two different optical drives.
In my case, the answer is simple, just add the /dev/dvd and /dev/cdrom names for my single optical drive. Thus here is a copy of my modified 70-persistent-cd.rules text file.
# This file was automatically generated by the /lib/udev/write_cd_rules
# program, run by the cd-aliases-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and set the $GENERATED variable.
# DVDRAM_GH24NS50 (pci-0000:00:12.0-scsi-2:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="cdrom1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="cdrw1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="dvd1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="dvdrw1", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:12.0-scsi-2:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1"
Now after making this change, even the CD player KsCD works with my audio CD’s. There are some programs like Banshee that did not have any problems reading my audio CD,s without making any changes to the 70-persistent-cd.rules text file, but this seemed to make more programs work properly for me.
What this text file is doing is providing symbolic device links in your /dev folder pointing to your real hardware. Further, you could create a symbolic link in /dev manually if you wanted to that pointed /dev/cdrom & /dev/dvd to your correct optical drive, but why bother if this file will do it for you automatically? If you should replace an optical drive, the old and new entries will be present and I determined you can delete the old entry if you wish. When a drive is replaced you will need to edit this file again to add the /dev/dvd & /dev/cdrom to point to your new optical drive. If you have more than one optical drive, there will be one entry set of five lines per optical drive made automatically for you. Make your entry for /dev/cdrom and/or /dev/dvd under the existing lines for the selected optical drive and you can only have one /dev/cdrom entry and one /dev/dvd entry in this entire file. Only ONE /dev/dvd entry per file and only ONE /dev/cdrom per file. Got it?
To edit this file you need root privilege. To use kwrite to do the editing use the following command:
kdesu kwrite /etc/udev/rules.d/70-persistent-cd.rules
After making any change to the 70-persistent-cd.rules text file you must reboot your computer to see how it works. Please let me know if you have any questions about using this prcedure to add /dev/dvd and /dev/cdrom to your configuration file. Programs that look for these will now work properly. Also, now you know that you could modify your device entries to use the automatically added drives like /dev/dvd1 or /dev/cdrom1 if you wanted to. Knowing how the 70-persistent-cd.rules optical drive configuration text file works will make you a smarter openSUSE Linux user.
Thank You,