Summary: | sys-fs/udev-104 - external CD/DVD USB 2.0 drive /dev symlinks breaks internal CD/DVD IDE drives /dev symlinks. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Francisco Lloret <fcolloret> |
Component: | [OLD] Core system | Assignee: | udev maintainers <udev-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Francisco Lloret
2007-03-28 20:21:04 UTC
Reopen if you can reproduce w/ udev-107 (make sure that you have no orphaned/stale junk in /etc/udev/rules.d and that you've run etc-update properly). After a few changes: -Deleted old /etc/udev/scripts directory -udev updated to last portage version (108) the issue is only partialy solved. Now: At the beginning i have: $ ls -ld /dev/cd* lrwxrwxrwx 1 root root 3 2007-03-29 20:33 /dev/cdrom -> hdc lrwxrwxrwx 1 root root 3 2007-03-29 20:32 /dev/cdrom1 -> hdd lrwxrwxrwx 1 root root 3 2007-03-29 20:32 /dev/cdrw1 -> hdd $ ls -ld /dev/dv* drwxr-xr-x 3 root root 60 2007-03-29 20:32 /dev/dvb lrwxrwxrwx 1 root root 3 2007-03-29 20:33 /dev/dvd -> hdc $ I connect the external drive, and then: $ ls -ld /dev/cd* lrwxrwxrwx 1 root root 3 2007-03-29 20:35 /dev/cdrom -> sr0 lrwxrwxrwx 1 root root 3 2007-03-29 20:32 /dev/cdrom1 -> hdd lrwxrwxrwx 1 root root 3 2007-03-29 20:35 /dev/cdrw -> sr0 lrwxrwxrwx 1 root root 3 2007-03-29 20:32 /dev/cdrw1 -> hdd $ ls -ld /dev/dv* drwxr-xr-x 3 root root 60 2007-03-29 20:32 /dev/dvb lrwxrwxrwx 1 root root 3 2007-03-29 20:35 /dev/dvd -> sr0 lrwxrwxrwx 1 root root 3 2007-03-29 20:35 /dev/dvdrw -> sr0 $ Same problem: hdc symlinks are missing, but, if i disconnect the external drive, then... $ ls -ld /dev/cd* lrwxrwxrwx 1 root root 3 2007-03-29 20:36 /dev/cdrom -> hdc lrwxrwxrwx 1 root root 3 2007-03-29 20:32 /dev/cdrom1 -> hdd lrwxrwxrwx 1 root root 3 2007-03-29 20:32 /dev/cdrw1 -> hdd $ ls -ld /dev/dv* drwxr-xr-x 3 root root 60 2007-03-29 20:32 /dev/dvb lrwxrwxrwx 1 root root 3 2007-03-29 20:36 /dev/dvd -> hdc $ hdc re-appears!!! But, why is unavailable when external drive is connected? Of course, i executed etc-update after udev update, and all the files in /etc/udev/rules.d are files installed with the udev emerge (i don't modify this files), and two aditional files: 99-libsane.rules (don't does anything with CD/DVD drives, i supose this file is installed by sane) and my own file 20-mis.udev.rules that i use for externals units (is the only file hand-modified by me) with this content: $ cat 20-mis.udev.rules # Link permanente para el ZIP KERNEL=="sd[a-z]4", SYSFS{model}=="ZIP 100 ", SYMLINK+="disk/zip100" # Para el lector HAMA KERNEL=="sd[a-z]1", SYSFS{model}=="SD Card Reader ", SYMLINK+="disk/sd-reader" KERNEL=="sd[a-z]1", SYSFS{model}=="MS Card Reader ", SYMLINK+="disk/ms-reader" # Para el MP3 KERNEL=="sd[a-z]1", SYSFS{model}=="Audio Player ", SYMLINK+="disk/mp3" # Para el disco duro externo KERNEL=="sd*", SYSFS{vendor}=="ST380011", SYMLINK+="disk/externo%n" that don't does anything with CD drives. The entire /etc/udev/rules.d directory is: $ ls -l total 120 -rw-r--r-- 1 root root 592 mar 29 20:29 05-udev-early.rules -rw-r--r-- 1 root root 478 feb 11 11:34 20-mis.udev.rules -rw-r--r-- 1 root root 55 oct 13 13:29 30-svgalib.rules -rw-r--r-- 1 root root 10710 mar 29 20:29 50-udev.rules -rw-r--r-- 1 root root 1303 mar 29 20:29 60-persistent-input.rules -rw-r--r-- 1 root root 3762 mar 29 20:29 60-persistent-storage.rules -rw-r--r-- 1 root root 1264 mar 29 20:29 64-device-mapper.rules -rw-r--r-- 1 root root 1542 feb 17 17:18 70-persistent-cd.rules -rw-r--r-- 1 root root 490 feb 17 14:58 70-persistent-net.rules -rw-r--r-- 1 root root 186 mar 29 20:29 75-cd-aliases-generator.rules -rw-r--r-- 1 root root 839 mar 29 20:29 75-persistent-net-generator.rules -rw-r--r-- 1 root root 186 feb 20 21:39 90-hal.rules -rw-r--r-- 1 root root 700 mar 29 20:29 95-udev-late.rules -rw-r--r-- 1 root root 61163 nov 26 19:21 99-libsane.rules Please also attach the content of 70-persistent-cd.rules My guess is that you have two or more lines in 70-persistent-cd.rules that point to /dev/cdrom. $ cat 70-persistent-cd.rules # uPD720133 (pci-0000:00:02.2-usb-0:3:1.0-scsi-0:0:0:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:3:1.0-scsi-0:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:3:1.0-scsi-0:0:0:0", SYMLINK+="cdrw", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:3:1.0-scsi-0:0:0:0", SYMLINK+="dvd", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:3:1.0-scsi-0:0:0:0", SYMLINK+="dvdrw", ENV{GENERATED}="1" # DVD-ROM_DDU1621 (pci-0000:00:09.0-ide-1:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:09.0-ide-1:0", SYMLINK+="cdrom", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:09.0-ide-1:0", SYMLINK+="dvd", ENV{GENERATED}="1" # PLEXTOR_CD-R_PX-W5224A (pci-0000:00:09.0-ide-1:1) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:09.0-ide-1:1", SYMLINK+="cdrom1", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:09.0-ide-1:1", SYMLINK+="cdrw1", ENV{GENERATED}="1" # uPD720133 (pci-0000:00:02.2-usb-0:1:1.0-scsi-0:0:0:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:1:1.0-scsi-0:0:0:0", SYMLINK+="cdrom2", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:1:1.0-scsi-0:0:0:0", SYMLINK+="cdrw2", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:1:1.0-scsi-0:0:0:0", SYMLINK+="dvd2", ENV{GENERATED}="1" ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:1:1.0-scsi-0:0:0:0", SYMLINK+="dvdrw2", ENV{GENERATED}="1" $ Litle CORRECTION: the external DVD-RW drive is USB 2.0, not Firewire. the Firewire unit is the external hard disk. Sorry for the confusion. Note: the 70-persistent-cd.rules was automaticaly generated. I don't modified it by hand. # uPD720133 (pci-0000:00:02.2-usb-0:3:1.0-scsi-0:0:0:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:3:1.0-scsi-0:0:0:0", SYMLINK+="cdrom", ENV{GENERATED}="1" [...] # DVD-ROM_DDU1621 (pci-0000:00:09.0-ide-1:0) ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:09.0-ide-1:0", SYMLINK+="cdrom", ENV{GENERATED}="1" As you can see there are two rules generating the cdrom symlink. Best solution is to just delete this file, and let udev recreate it. By either rebooting, or calling udevtrigger. Thanks. In the original 70-persistent-cd.rules, deleting (with the external dvd-rw disconnected) all the info except the for the two internal drives solves the problem: when i connect the dvd-rw external drive, udev adds the corresponding lines in this file, end then it works ok. I made a backup copy of the file in /root. I delete it from /etc/udev/rules.d and then power-off the system, when i boot up the system, and after entering X i connect the external drive, the /etc/udev/rules.d/70-persistent-cd.rules file only contains info for the external drive, and don't works ok. Then, i run udevtrigger and it adds entries for the two internal drives, but the drives order in inverted. Deleting the file, running then udevtrigger with the external drive disconnected and then connecting the dvd-rw drive, then works i want: cdrom and dvd symlinks for DVD-ROM internal drive, cdrom1 and cdrw1 symlinks for the CD-RW internal drive, and cdrom2, cdrw2, dvd2 and dvdrw2 symlinks for the external dvd-rw drive. Is curious that, if the 70-persistent-cd.rules file don't exist, when the system starts don't creates the file, and then you power up the external drive, udev creates the file, but it contains only information for the external drive. The bahaviour seems correct as you describe it: While bootup/starting udev /etc/udev/rules.d is not yet writable, and udev stores the created rules under /dev. That rules are written to /etc/udev/rules.d/ when shutting down. |