Summary: | sys-fs/udev-103 creates wrong symlinks to cdrom-devices in /dev | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tobias Brink <tobias.brink> |
Component: | [OLD] Core system | Assignee: | udev maintainers <udev-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | betelgeuse, gg.alex.weiss |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 126089 | ||
Attachments: | Using only new persistent-cd-handling |
Description
Tobias Brink
2006-12-13 11:36:21 UTC
> but after every boot they point to either sr0 or sr1, randomly. Sometimes they
> all point to sr1. After doing a little research I found the following lines in
> /etc/udev/rules.d/50-udev.rules:
> ENV{ID_CDROM}=="?*", PROGRAM="seq_node.sh %r %k cdrom",
> SYMLINK+="%c", GROUP="cdrom"
> ENV{ID_CDROM_CD_RW}=="?*", PROGRAM="seq_node.sh %r %k cdrw",
> SYMLINK+="%c"
> ENV{ID_CDROM_DVD}=="?*", PROGRAM="seq_node.sh %r %k dvd",
> SYMLINK+="%c"
> ENV{ID_CDROM_DVD_R}=="?*", PROGRAM="seq_node.sh %r %k dvdrw",
> SYMLINK+="%c"
BTW, removing/commenting these lines leads to the system using the rules in /etc/udev/rules.d/75-cd-aliases-generator.rules, which are better (always the same symlinks after reboot, sr0 is cdrom, sr1 is cdrom1) but have a tiny problem:
As my DVD-burner is the second drive (sr1), its symlink is /dev/cdrw1 and not /dev/cdrw, which doesn't exist. At least this is still better than random device symlinks.
(In reply to comment #1) > BTW, removing/commenting these lines leads to the system using the rules in > /etc/udev/rules.d/75-cd-aliases-generator.rules, which are better (always the > same symlinks after reboot, sr0 is cdrom, sr1 is cdrom1) but have a tiny > problem: > As my DVD-burner is the second drive (sr1), its symlink is /dev/cdrw1 and not > /dev/cdrw, which doesn't exist. At least this is still better than random > device symlinks. What I said there isn't true. Today the mentioned setup showed the same problems as the original one. Should have checked it better before reporting, sorry. I have two internat CD drives: hdc, dvd-rom, and hdd, cdrw drive and an external DVDRW drive, conected by USB. After power-on the system, with external drive powered off: AthlonXP ~ $ ls -ld /dev/dv* lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/dvd -> hdc lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/dvd1 -> hdc AthlonXP ~ $ ls -ld /dev/cd* lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/cdrom -> hdc lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/cdrom1 -> hdc lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/cdrw -> hdd I power on the external dvdrw drive, and then: AthlonXP ~ $ ls -ld /dev/cd* lrwxrwxrwx 1 root root 3 dic 31 13:51 /dev/cdrom -> sr0 lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/cdrom1 -> hdc lrwxrwxrwx 1 root root 3 dic 31 13:51 /dev/cdrom2 -> sr0 lrwxrwxrwx 1 root root 3 dic 31 13:51 /dev/cdrw -> sr0 lrwxrwxrwx 1 root root 3 dic 31 13:51 /dev/cdrw1 -> sr0 AthlonXP ~ $ ls -ld /dev/dv* lrwxrwxrwx 1 root root 3 dic 31 13:51 /dev/dvd -> sr0 lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/dvd1 -> hdc lrwxrwxrwx 1 root root 3 dic 31 13:51 /dev/dvd2 -> sr0 lrwxrwxrwx 1 root root 3 dic 31 13:51 /dev/dvdrw -> sr0 After this, i disconnect the external drive, and then: AthlonXP ~ $ ls -ld /dev/dv* lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/dvd1 -> hdc AthlonXP ~ $ ls -ld /dev/cd* lrwxrwxrwx 1 root root 3 dic 31 13:48 /dev/cdrom1 -> hdc Except dvd1 and cdrom1, all other symlinks are missing. I can second this, I have two machines (x86) which has multiple cdrom/dvd, don't reboot thise so often, but noticed that half of the symlinks pointed at the wrong unit. At least I haven't had this problem before, so thinking of masking the 10x series and go back to 98, which I think did work fine for me. As current udev-103 ebuild has two sets of rules for cdrom-devices: 1. in 50-udev.rules: Using perhaps broken seq_node.sh. 2. in 70-persistent-cd.rules 75-cd-aliases-generator.rules I vote for deleting Part 1 and just keeping the calls to cdrom_id and the GROUP setting. Even better would be version bumping to udev-104 as that seems to generate better rules based on serial-number and or similar. Changes needed here as I suggest are: 1. Delete all cdrom-rules from 50-rules. 2. Use new 60-cdrom_id.rules. 3. Add a pure ownership rule to 60-cdrom_id.rules: ENV{ID_CDROM}=="?*", GROUP="cdrom" Created attachment 106947 [details, diff]
Using only new persistent-cd-handling
Old cdrom-handling has been removed and works correct from udev-ebuilds starting with udev-103-r3. (In reply to comment #7) > Old cdrom-handling has been removed and works correct from udev-ebuilds > starting with udev-103-r3. Closing as FIXED. *** Bug 165328 has been marked as a duplicate of this bug. *** |