|
|
| Next: Accepted naist-jdic 0.4.3-10 (source all) |
| Author |
Message |
Adam Myrow External

Since: Sep 17, 2009 Posts: 2
|
Posted: Thu Sep 17, 2009 8:18 pm Post subject: /dev/cdrom can't make up its mind where to link Archived from groups: alt>os>linux>slackware (more info?) |
|
|
Hi, I've had this problem with the last several versions of Slackware.
In my computer, I have two CD drives. One is a DVD writer as well, and
the second is just a CDRW. I primarily use the first drive. When I
reboot, the link for /dev/cdrom randomly points to one drive or the
other. I can never tell which is going to be /dev/cdrom. The rules in
/etc/udev/rules.d/70-persistent-cd.rules will correctly make links from
things like /dev/cdrom0 to the right drive. The problem is, a lot of
stuff expects /dev/cdrom to point to your CD ROM drive. For example,
mplayer and cdparanoia look for /dev/cdrom. So, I want it to always
point to the same drive.
One way I thought of is to create a symbolic link in /lib/udev/devices.
However, I was wondering if there was a better way? I tried removing
/etc/udev/rules.d/70-persistent-cd.rules, and it got rre-created, and
didn't solve the problem. Any advice would be appreciated. Thanks. |
|
| Back to top |
|
 |
Robby Workman External

Since: Jan 08, 2006 Posts: 258
|
Posted: Fri Sep 18, 2009 12:10 am Post subject: Re: /dev/cdrom can't make up its mind where to link [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On 2009-09-18, Adam Myrow <myrowaspamtrap RemoveThis @bellsouth.net> wrote:
> Hi, I've had this problem with the last several versions of Slackware.
> In my computer, I have two CD drives. One is a DVD writer as well, and
> the second is just a CDRW. I primarily use the first drive. When I
> reboot, the link for /dev/cdrom randomly points to one drive or the
> other. I can never tell which is going to be /dev/cdrom. The rules in
> /etc/udev/rules.d/70-persistent-cd.rules will correctly make links from
> things like /dev/cdrom0 to the right drive. The problem is, a lot of
> stuff expects /dev/cdrom to point to your CD ROM drive. For example,
> mplayer and cdparanoia look for /dev/cdrom. So, I want it to always
> point to the same drive.
>
> One way I thought of is to create a symbolic link in /lib/udev/devices.
> However, I was wondering if there was a better way? I tried removing
> /etc/udev/rules.d/70-persistent-cd.rules, and it got rre-created, and
> didn't solve the problem. Any advice would be appreciated. Thanks.
Post the contents of that file, and tell me which one of the
devices you *want* /dev/cdrom point at.
-RW |
|
| Back to top |
|
 |
Eef Hartman External

Since: Jul 12, 2009 Posts: 11
|
Posted: Fri Sep 18, 2009 5:10 am Post subject: Re: /dev/cdrom can't make up its mind where to link [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Adam Myrow wrote:
> Hi, I've had this problem with the last several versions of Slackware.
> In my computer, I have two CD drives. One is a DVD writer as well, and
> the second is just a CDRW. I primarily use the first drive.
I created rules (at home, don't have them with me) in 70-persistent-cd.rules
to let it create /dev/dvd to the DVD drive, /dev/cdwriter to the
CD-RW and /dev/cdrom to one of them (currently it is the DVD drive
as the CD-RW is having some problems).
Essentially they look like this
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:0:0",
SYMLINK+="cdrom", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:0:0",
SYMLINK+="cdwriter", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.2-scsi-1:0:0:0",
SYMLINK+="dvd", ENV{GENERATED}="1"
(this machine only has a single drive, a DVD-RW, so all three point to
the same device here, the PATH part differentiates between the present
devices).
You CAN edit the 70-persistent-cd.rules file, as long as you keep a
ENV{GENERATED}="1" on every line you add to it.
As you already found out, when you remove it a new (default) one will
be generated again (that is actually true for all 70-persistent-*
rules files, they are called persistent because WHEN they are present
their contents will be used instead of generating a new rule file on
every reboot).
--
Eef Hartman, Delft University of Technology, dept. SSC/ICT |
|
| Back to top |
|
 |
Leszek Pietryka External

Since: Sep 18, 2009 Posts: 1
|
Posted: Fri Sep 18, 2009 6:10 pm Post subject: Re: /dev/cdrom can't make up its mind where to link [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Dnia piątek, 18 września 2009 03:18 Adam Myrow napisał:
> Hi, I've had this problem with the last several versions of Slackware.
> In my computer, I have two CD drives. One is a DVD writer as well, and
> the second is just a CDRW. I primarily use the first drive. When I
> reboot, the link for /dev/cdrom randomly points to one drive or the
> other. I can never tell which is going to be /dev/cdrom. The rules in
> /etc/udev/rules.d/70-persistent-cd.rules will correctly make links from
> things like /dev/cdrom0 to the right drive. The problem is, a lot of
> stuff expects /dev/cdrom to point to your CD ROM drive. For example,
> mplayer and cdparanoia look for /dev/cdrom. So, I want it to always
> point to the same drive.
>
> One way I thought of is to create a symbolic link in /lib/udev/devices.
> However, I was wondering if there was a better way? I tried removing
> /etc/udev/rules.d/70-persistent-cd.rules, and it got rre-created, and
> didn't solve the problem. Any advice would be appreciated. Thanks.
You might try putting in /etc/rc.d/rc.local, assuming that the DVD drive
is /dev/sr0 and CDRW is /dev/sr1:
ln -s /dev/sr0 /dev/cdrom
ln -s /dev/sr0 /dev/dvd
It is a lame solution, but should work. |
|
| Back to top |
|
 |
Grant External

Since: Feb 26, 2009 Posts: 22
|
Posted: Fri Sep 18, 2009 8:10 pm Post subject: Re: /dev/cdrom can't make up its mind where to link [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Fri, 18 Sep 2009 23:42:46 +0200, Leszek Pietryka <leszekptr.spamwynocha.RemoveThis@gazeta.pl> wrote:
>Dnia pi?tek, 18 wrze?nia 2009 03:18 Adam Myrow napisa?:
>
>> Hi, I've had this problem with the last several versions of Slackware.
>> In my computer, I have two CD drives. One is a DVD writer as well, and
>> the second is just a CDRW. I primarily use the first drive. When I
>> reboot, the link for /dev/cdrom randomly points to one drive or the
>> other. I can never tell which is going to be /dev/cdrom. The rules in
>> /etc/udev/rules.d/70-persistent-cd.rules will correctly make links from
>> things like /dev/cdrom0 to the right drive. The problem is, a lot of
>> stuff expects /dev/cdrom to point to your CD ROM drive. For example,
>> mplayer and cdparanoia look for /dev/cdrom. So, I want it to always
>> point to the same drive.
>>
>> One way I thought of is to create a symbolic link in /lib/udev/devices.
>> However, I was wondering if there was a better way? I tried removing
>> /etc/udev/rules.d/70-persistent-cd.rules, and it got rre-created, and
>> didn't solve the problem. Any advice would be appreciated. Thanks.
>
>You might try putting in /etc/rc.d/rc.local, assuming that the DVD drive
>is /dev/sr0 and CDRW is /dev/sr1:
>
>ln -s /dev/sr0 /dev/cdrom
>ln -s /dev/sr0 /dev/dvd
Did you mean this?
ln -s /dev/sr1 /dev/dvd
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |
jim dorey External

Since: Jun 11, 2007 Posts: 8
|
Posted: Sat Sep 19, 2009 7:05 am Post subject: Re: /dev/cdrom can't make up its mind where to link [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Adam Myrow wrote:
> One way I thought of is to create a symbolic link in /lib/udev/devices.
> However, I was wondering if there was a better way? I tried removing
> /etc/udev/rules.d/70-persistent-cd.rules, and it got rre-created, and
> didn't solve the problem. Any advice would be appreciated. Thanks.
i'd probably throw a rule in fstab...wrong? |
|
| Back to top |
|
 |
Adam Myrow External

Since: Sep 17, 2009 Posts: 2
|
Posted: Sat Sep 19, 2009 10:10 am Post subject: Re: /dev/cdrom can't make up its mind where to link [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
As it turns out, the fault lies in
/etc/udev/rules.d/70-persistent-cd.rules. For whatever reason, it
has lines that create symbolic links from /dev/cdrom to both drives.
In other words, there is a rule that creates a link from /dev/cdrom to
/dev/sr0. Later, there is one for /dev/cdrom to /dev/sr1. I would have
thought that whichever was last in the file would always win, but this
isn't the case. So, it would seem that Udev executes its rules
asynchronously. The solution was to delete the second rule. Now, the
link points where I want it to. Actually, the same problem exists with
/dev/cdr, /dev/cdrw, and /dev/cdwriter. I bet if they were both DVD
drives, /dev/dvd, /dev/dvdrw, and /dev/dvdwriter would have double
rules as well. I'd call this a bug in Udev. |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|