On 06/25/2011 03:32 PM, Alexey Mishustin wrote:
> Hi.
> 
> After updating udev the links /dev/cdrom, /dev/dvd etc disappeared. There
> are four /dev/sgX but there is no /dev/srX at all. No hdX, all sdX are
> hard drives. So, I can't mount any cd or dvd.
> 
> My drive is IDE (Pioneer).

I assume it's connected to a PATA disk controller like my dvd player is?

#lspci -k   [output edited]
00:11.1 IDE interface: VIA Technologies, Inc. 
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
        Subsystem: VIA Technologies, Inc. 
VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE
        Kernel driver in use: pata_via

> # dmesg | grep sg
> msgmni has been set to 1759
> Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
> sd 0:0:0:0: Attached scsi generic sg0 type 0
> sd 0:0:1:0: Attached scsi generic sg1 type 0
> sd 2:0:0:0: Attached scsi generic sg2 type 0
> sd 3:0:0:0: Attached scsi generic sg3 type 0

Surprise, I also have sg* devices I didn't know about:

#dmesg | grep -i scsi
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
scsi0 : sata_promise
scsi1 : sata_promise
scsi2 : sata_promise
scsi3 : pata_via
scsi4 : pata_via      <----- this is the dvdrom, on my old PATA controller
scsi 0:0:0:0: Direct-Access     ATA      Maxtor 6Y080M0   YAR5 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] Attached SCSI disk
scsi 3:0:0:0: Direct-Access     ATA      Maxtor 7Y250P0   YAR4 PQ: 0 ANSI: 5
sd 3:0:0:0: [sdb] Attached SCSI disk
scsi 4:0:0:0: CD-ROM            ATAPI    iHDP118   4      GL05 PQ: 0 ANSI: 5
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 3:0:0:0: Attached scsi generic sg1 type 0
scsi 4:0:0:0: Attached scsi generic sg2 type 5    <----- the dvd is sg2
sr0: scsi3-mmc drive: 48x/48x cd/rw xa/form2 cdda tray
sr 4:0:0:0: Attached scsi CD-ROM sr0

#ls -l /dev/sg*
crw-rw---- 1 root disk  21, 0 Jun 26 04:50 /dev/sg0
crw-rw---- 1 root disk  21, 1 Jun 26 04:50 /dev/sg1
crw-rw---- 1 root cdrom 21, 2 Jun 26 04:50 /dev/sg2   <----- sg2 again
crw-rw---- 1 root disk  21, 3 Jun 26 04:50 /dev/sg3
crw-rw---- 1 root disk  21, 4 Jun 26 04:50 /dev/sg4

I'm trying to separate kernel device support problems from udev problems, as
you can see.

#cat /etc/udev/rules.d/70-persistent-cd.rules 
# This file was automatically generated by the /lib/udev/write_cd_rules
# program, run by the cd-aliases-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and set the $GENERATED variable.

# iHDP118_4 (pci-0000:00:11.1-scsi-1:0:0:0)
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.1-scsi-1:0:0:0", SYMLINK+="cdrom", 
ENV{GENERATED}="1"
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", 
ENV{ID_PATH}=="pci-0000:00:11.1-scsi-1:0:0:0", SYMLINK+="dvd", 
ENV{GENERATED}="1"

Note how the pci number matches the output of lspci -k.  If the number doesn't 
match
your hardware then you should delete the 70-persistent-cd.rules file and reboot.
A new file will be generated during the reboot.




Reply via email to