I have two CD peripherals to which udev does not always attribute the same symlinks. In some cases, the following (expected) symlinks are produced: $ ls -alh /dev/cdrom* lrwxrwxrwx 1 root root 3 avr 2 21:58 /dev/cdrom -> hdc lrwxrwxrwx 1 root root 3 avr 2 21:58 /dev/cdrom1 -> hdd However, after rebooting the machine, the symlinks are often (but not always) inverted as shown below: $ ls -alh /dev/cdrom* lrwxrwxrwx 1 root root 3 avr 3 00:45 /dev/cdrom -> hdd lrwxrwxrwx 1 root root 3 avr 3 00:45 /dev/cdrom1 -> hdc The problem is only very recent (a couple of weeks), perhaps following a recent upgrade of udev. $ emerge --info Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15-gentoo-r1 i686) ================================================================= System uname: 2.6.15-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz Gentoo Base System version 1.6.14 dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i386-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CHOST="i386-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LC_ALL="fr_CA.utf8" LINGUAS="fr pl" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X Xaw3d aac aalib acpi alsa apm arts asf audiofile avi bash-completion berkdb bidi bitmap-fonts browserplugin bzip2 cdda cdio cdparanoia cdr cjk crypt cups curl dri dts dvd eds emboss encode esd exif expat f77 fam ffmpeg flac font-server foomaticdb fortran freetype gd gdbm gif gimp gimpprint glut gnome gnutls gphoto2 gpm gstreamer gtk gtk2 httpd idn imagemagick imlib ipv6 isdnlog jabber java jpeg kde lcms ldap libg++ libwww live logitech-mouse mad matroska mikmod mmx mng motif mozilla mozsvg mp3 mpeg mysql ncurses nls nsplugin ogg oggvorbis openal opengl oss pam pam_console pcre pdflib perl png povray pppd python qt quicktime readline real scanner sdl spell sse sse2 ssl stream svga symlink tcpd tetex theora tiff tlen truetype truetype-fonts type1-fonts udev unicode usb vcd vidix vlm vorbis win32codecs wmf wxwindows xanim xine xml2 xmms xosd xpm xprint xv xvid xvmc zlib video_cards_radeon linguas_fr linguas_pl userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, INSTALL_MASK, LANG, LDFLAGS, PORTDIR_OVERLAY
What version of udev are you using? And yes, this is a known problem :(
known issue...
I use the latest stable version of udev, i.e, 079-r1. (In reply to comment #2) > known issue... > (In reply to comment #1) > What version of udev are you using? > > And yes, this is a known problem :( >
I guess this is related to bug 127815 so I'll put my input here. I got the following in the changelog on a debian machine at work today: udev (0.088-1) unstable; urgency=medium The %e parameter is deprecated. The cd-aliases.rules file should be replaced with custom rules or with the cd-aliases-generator.rules file, which will automatically create rules for the /dev/cdrom* aliases. Would it help if I provide the cd-aliases-generator.rules and the script that generates the names (or do you already know the debian way to solve this problem)?
Thank you for your help. Would this solve the problem with the cdrom symlinks? If yes, it would help to receive the cd-aliases-generator.rules file as well as the script you mentioned. What should I exactly do with these files? Where can I find information about the Debian solution? I am not too familiar with these issues... :) (In reply to comment #4) > I guess this is related to bug 127815 so I'll put my input here. > > I got the following in the changelog on a debian machine at work today: > > udev (0.088-1) unstable; urgency=medium > > The %e parameter is deprecated. The cd-aliases.rules file should be > replaced with custom rules or with the cd-aliases-generator.rules file, > which will automatically create rules for the /dev/cdrom* aliases. > > Would it help if I provide the cd-aliases-generator.rules and the script that > generates the names (or do you already know the debian way to solve this > problem)? >
Yes, I am very aware of the current Debian "solution" for this issue, however, it too has issues with multiple cdrom drives, and is not something that I think is good for us to implement. But I am working with those developers to come up with a proper solution.
Ah, I didn't know it was a "solution" :-)
When there's a solution available, I'd be glad to help test it.
I have this problem too with udev-087. I tried fixing it by adding the following four lines to 10-local.rules but they didn't fix the problem. KERNEL=="hdb" SYSFS{removable}=="1" SYMLINK+="cdrom" KERNEL=="hdb" SYSFS{removable}=="1" SYMLINK+="dvd" KERNEL=="hdc" SYSFS{removable}=="1" SYMLINK+="cdrom1" KERNEL=="hdc" SYSFS{removable}=="1" SYMLINK+=""dvd1" One strange thing is that it seems the cdrom symlinks work more often than the dvd symlinks. For now I'm planning to set the symlinks manually from /etc/conf.d/local.start.
Should now be fixed in the latest versions of udev.