You are not logged in.

#1 2011-05-30 01:36:49

tesjo
Member
Registered: 2007-11-30
Posts: 164

DVD CD symlinks

I do not have symlink /dev/dvd or otherwise to /dev/sr0. I have found this post
https://bbs.archlinux.org/viewtopic.php?id=119456
but I am not running 'testing' though I have udev 171-1.

So my question is am I to manual creat the symlinks or am I missing something?

Last edited by tesjo (2011-05-31 03:57:23)

Offline

#2 2011-05-30 09:10:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: DVD CD symlinks

When I installed udev I got:

...
==> SUCCESS
(3/6) upgrading mkinitcpio-busybox                 [#################################################] 100%
(4/6) upgrading nspr                               [#################################################] 100%
(5/6) upgrading nss                                [#################################################] 100%
(6/6) upgrading udev                               [#################################################] 100%
ATTENTION UDEV:
---------------
Kernel 2.6.32 or newer is now required.
OSS emulation modules are not loaded by default, add to rc.conf if needed.
Arch specific cd symlinks are now no longer created.
cd and net persistent rules will no longer be autogenerated,
see <https://wiki.archlinux.org/index.php/Udev> for details.
Errors are now logged (possibly to the console) by default.

Offline

#3 2011-05-30 14:42:41

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: DVD CD symlinks

I am not sure that removal of the arch specific rules is the issue. Previously I had the file /etc/udev/rules.d/75-cd-aliases-generator.rules.optional, which I am not sure was included as it was always appended optional.

I mount everything fine in thunar using gvfs, hence udisks and udev. I do not have hal (though I tried it and it made no difference).  The problem can be seen in mplayer where specifying the device works.

$mplayer dvd://
...
Couldn't open DVD device: /dev/dvd (No such file or directory)

$mplayer -dvd-device /dev/sr0 dvd://

In Exhaile I cannot change the device to see any audio disks. I did not find anything relevant to this in the arch udev wiki page. So for now I am at a loss what to do.

Last edited by tesjo (2011-05-30 14:43:23)

Offline

#4 2011-05-30 14:46:02

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: DVD CD symlinks

mplayer has the -dvd-device flag, as well as the syntax dvd://device. I'm sure it's possible to specify a device in the config as well...

Offline

#5 2011-05-30 14:53:08

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: DVD CD symlinks

Right, as I said specifying the device works but for other application I may or may not be able to, and I dont want to fix every appication that may look for /dev/dvd or /dev/cdrom or whatever.  I'd like to have these general symlinks to /dev/sr0 available.

Offline

#6 2011-05-30 15:20:46

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: DVD CD symlinks

I downgraded to udev 168-2, and all the links are there.

I do not know, but I find it difficult to think that arch devs would remove the arch rules if they knew a user would have to maintain personal udev rules for this. So maybe this is a bug.

Offline

#7 2011-05-30 15:31:35

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: DVD CD symlinks

This is not a bug. This is the developers cleansing the udev package of every last bastardization we've tacked onto it in the last few years (and there's more to come). Upstream does not provide this functionality, so therefore, Arch should not either. If you want the functionality yourself, add it. Rolling back to udev 168 is a poor solution. Porting the functionality from udev-168 to an independent set of code that can be posted on the wiki? Fantastic solution.

Last edited by falconindy (2011-05-30 15:32:25)

Offline

#8 2011-05-30 16:16:43

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: DVD CD symlinks

Thanks for the replies. What I needed to know was that this was the expected behavior now, from my not fully understanding the udev install output. If I can use my applications by configuring the default device, if needed, I will. And maybe these links wont be needed.

Edit:
Ok this is not elegant but it is working for me.
I created file /etc/udev/rules.d/82-cdrom.rules as follows

# Custom CD-ROM symlinks
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrom cdrw dvd dvdrw"

Last edited by tesjo (2011-05-30 21:47:18)

Offline

#9 2011-05-31 03:57:07

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: DVD CD symlinks

I have marked this unsolved since it seems that the problem is rules not being generated as they should be acording to rc.sysinit, neither of these are generated for me.

# Adding persistent network/cdrom generated rules
# When the rules are generated before /etc is mounted rw they are saved to /run,
# we therefore need to copy this from /run to /etc. This functionality is going away one day.
for f in cd net; do
    [[ -f /run/udev/tmp-rules--70-persistent-$f.rules ]] || continue
    stat_busy "Adding persistent $f udev rules"
    /bin/cat "/run/udev/tmp-rules--70-persistent-$f.rules" >> "/etc/udev/rules.d/70-persistent-$f.rules"
    stat_done
done

I wonder if this is a problem for anyone else as I haven't really seen any other threads on the issue.

Offline

#10 2011-06-05 18:43:32

KimTjik
Member
From: Sweden
Registered: 2007-08-22
Posts: 715

Re: DVD CD symlinks

[SOLVED]

I don't really know how to sort this out. It becomes a strange mess to me. For VLC (or similar searching for dev:///dev/dvd):

I added a udev rule with symlinks. Check - works.
Udiskie takes care of user access. Check - works.
First added DVD. Check -works.
Second and every other DVD. Fail.

I don't understand this. Is there some kind of conflict going on between typical file managers, like thunar, and udev rules? It seems like launching thunar once and everything just breaks.

...

Now everything seems to be in place. A stupid mistake by me to not define a proper ownership group for the rule.

Last edited by KimTjik (2011-06-05 19:03:46)

Offline

#11 2011-07-15 20:22:01

jcpotts
Member
From: Texas
Registered: 2011-07-09
Posts: 3

Re: DVD CD symlinks

tesjo wrote:

Ok this is not elegant but it is working for me.
I created file /etc/udev/rules.d/82-cdrom.rules as follows

# Custom CD-ROM symlinks
SUBSYSTEM=="block", KERNEL=="sr0", SYMLINK+="cdrom cdrw dvd dvdrw"

I found in my other Gentoo box a /etc/udev/rules.d/70-persistent-cd.rules, which i adapted for this Archlinux machine :

SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1f.1-scsi-0:0:0:0", SYMLINK+="cdrom cdrw dvd", ENV{GENERATED}="1"

It works, so far. And its filename matches the code at the end of /etc/rc.sysinit

Offline

#12 2011-07-16 01:10:21

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: DVD CD symlinks

I abhor udev rules. I found the cleanest, simplest solution to also be the easiest to remember; I just stuck the creation of the 4 needed symlinks into /etc/rc.local.
K.I.S.S. :)

Offline

Board footer

Powered by FluxBB