[opensuse] Two CDRW/DVDRW Drives and /dev links
I have two sata CDRW/DVDRW drives connected to my box, both of which work fine. I have a problem with the OS (SuSE 11.1) automatically changing links cdrom. cdrw, dvdrom, dvdrw in /dev. When I first boot up the above links are linked to /dev/sr1. If I place a cd or dvd in the "sr1 drive all works as it should. cds and dvds play burn etc. If I insert a cd or dvd in sr0, the OS changes the links to point to /dev/sr0 not /dev/sr1. If I remove the cd/dvd from the sr0 drive and place it in the sr1 drive the OS does not redo/change back the cdrom dvdrom etc. links to sr1. This creates problems with some of the SuSE apps such as the KDE Kioslave-audiocd and Audex to name a few. These apps will then work with the sr0 drive not the sr1 drive. Other apps seem to work just fine even though the OS has changed the links. My question is: Is there a way to stop the OS from changing the links? If I can get the OS to set the cdrom/dvdrom links to /dev/sr0 can I create my own links cdrom1/dvdrom1 to /dev/sr1 without the OS overwriting them? Thanks, Rodney -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Rodney Wishart wrote:
I have two sata CDRW/DVDRW drives connected to my box, both of which work fine. I have a problem with the OS (SuSE 11.1) automatically changing links cdrom. cdrw, dvdrom, dvdrw in /dev.
When I first boot up the above links are linked to /dev/sr1. If I place a cd or dvd in the "sr1 drive all works as it should. cds and dvds play burn etc. If I insert a cd or dvd in sr0, the OS changes the links to point to /dev/sr0 not /dev/sr1. If I remove the cd/dvd from the sr0 drive and place it in the sr1 drive the OS does not redo/change back the cdrom dvdrom etc. links to sr1. This creates problems with some of the SuSE apps such as the KDE Kioslave-audiocd and Audex to name a few. These apps will then work with the sr0 drive not the sr1 drive. Other apps seem to work just fine even though the OS has changed the links.
My question is: Is there a way to stop the OS from changing the links? If I can get the OS to set the cdrom/dvdrom links to /dev/sr0 can I create my own links cdrom1/dvdrom1 to /dev/sr1 without the OS overwriting them?
Thanks, Rodney
I'm replying to my own post in the event it may help some other poor sole. :) The fix was to edit the file 70-persistent-cd.rules in the folder /etc/udev/rules.d folder. Much to my own laziness, when things in the Linux world like hal, udev and mtab started to appear, I just got rid of them and did thinks "by hand", the old fashioned way. I liked making my own links, editing fstab, and manually mounting and unmounting my own devices. I had fun fixing this problem and it was a useful experience learning the great mysteries of UDEV. Anyway enough of this blabber and on to the fix... Here is my old 70-persistent-cd.rules file. Notice my two CDRW/DVDRW devices with the exact same symlinks. (Lord knows why anyone would want a setup like this.) # This file was automatically generated by the /lib/udev/write_cd_rules # program, probably 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. *********(OLD CODE)************ # (pci-0000:00:07.0-scsi-0:0:0:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:07.0-scsi-0:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:07.0-scsi-0:0:0:0", SYMLINK+="cdrw", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:07.0-scsi-0:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:07.0-scsi-0:0:0:0", SYMLINK+="dvdrw", ENV{GENERATED}="1" # (pci-0000:00:08.0-scsi-1:0:0:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:08.0-scsi-1:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:08.0-scsi-1:0:0:0", SYMLINK+="cdrw", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:08.0-scsi-1:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:08.0-scsi-1:0:0:0", SYMLINK+="dvdrw", ENV{GENERATED}="1" To make the change I just appended a "1" to the symlink names for the second drive: ***********(CHANGED CODE)**************** # (pci-0000:00:08.0-scsi-1:0:0:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:08.0-scsi-1:0:0:0", SYMLINK+="cdrom1", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:08.0-scsi-1:0:0:0", SYMLINK+="cdrw1", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:08.0-scsi-1:0:0:0", SYMLINK+="dvd1", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:08.0-scsi-1:0:0:0", SYMLINK+="dvdrw1", ENV{GENERATED}="1" After a reboot and changing of device names in the progs that used CD/DVD most thinks just worked as they should. It would be nice if this were the end of the story, sadly it is not. This fixed MOST not all of my issues. In KDE 4.2 on my box, some things still refuse to work. Even after changing its configuration settings, the KDE KIO audiocd slave, for some reason, does not like cdrom1 and seems to only work with cdrom. The KDE 4.x versions Kafiene and KsCD are dead also. Happily Audex, xine, xmms and my GTK CD/DVD progs work OK. Hope this was helpful. If not there's always the del key. Rodney -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Rodney Wishart wrote:
Hope this was helpful. If not there's always the del key.
Rodney
Yes, Stored in my quick fix file right next to my 70-persistent-net.rules fix for mysteriously swapping eth0/eth1 devices. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
David C. Rankin
-
Rodney Wishart