LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 08-14-2008, 03:49 PM   #1
Gruik
LQ Newbie
 
Registered: Sep 2006
Location: France (33)
Distribution: Arch
Posts: 10

Rep: Reputation: 0
How do /dev/cdrom symlinks work


Hi,

Just a question about those symlinks created by udev i think :
Is it important to have them ?
Does it mean that my dvd readers/burners will work better if i have them ?

I went back to Linux a few weeks ago and the last week i realized /dev/cdrom was missing. I thought my drives were not recognized by the kernel so i tried to add several PATA and SCSI drivers into my kernel, i found that the "JMicron" driver was used to make my dvd burner recognized (but not my other dvd drive, my everyday cd/dvd drive).
I wonder what's the link between my dvd rw of brand "Nec" and JMicron, but anyway i realized that my both cdrom drives were present by the files /dev/sr0 and /dev/sr1 (i was first looking for /dev/hdc or something).

There's only /dev/cdrom, /dev/dvdrom, /dev/cdrw and /dev/dvdrw pointing to /dev/sr1 (my dvd writer)
Code:
$ ls /dev -l | grep sr
lrwxrwxrwx 1 root root         3 août 14 19:24 cdrom -> sr1
lrwxrwxrwx 1 root root         3 août 14 19:24 cdrw -> sr1
lrwxrwxrwx 1 root root         3 août 14 19:24 dvd -> sr1
lrwxrwxrwx 1 root root         3 août 14 19:24 dvdrw -> sr1
srw-rw-rw- 1 root root         0 août 14 17:24 log
lrwxrwxrwx 1 root root         3 août 14 19:24 scd0 -> sr0
lrwxrwxrwx 1 root root         3 août 14 19:24 scd1 -> sr1
brw-rw---- 1 root cdrom  11,   0 août 14 19:24 sr0
brw-rw---- 1 root cdrom  11,   1 août 14 19:24 sr1
I use /dev/scd0 to mount a cdrom and it works fine, but as i asked in the beginning, i'm hoping there's no difference when a drive is detected and when it's not detected.


2 lines from dmesg
Code:
scsi 4:0:0:0: CD-ROM            TEAC     DV-516E          2.01 PQ: 0 ANSI: 5
scsi 4:0:1:0: CD-ROM            _NEC     DVD_RW ND-3520A  1.04 PQ: 0 ANSI: 5
dmesg about "sr"
Code:
$ dmesg | grep sr
Driver 'sr' needs updating - please use bus_type methods
sr0: scsi3-mmc drive: 270x/48x cd/rw xa/form2 cdda tray
sr 4:0:0:0: Attached scsi CD-ROM sr0
sr 4:0:0:0: Attached scsi generic sg2 type 5
sr1: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
sr 4:0:1:0: Attached scsi CD-ROM sr1
sr 4:0:1:0: Attached scsi generic sg3 type 5
Notes:
- Kernel 2.6.26
- My cdrom drives are PATA not SATA (but my hard disk drives are SATA)
- Gentoo
- 64bit system
 
Old 08-14-2008, 04:26 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
AIUI, the symlinks are really just a convenience feature; a way to clean up the mess of different systems having different names for the same types of device, or as a way to simply make devices easier to use and remember. You're certainly not required to use them, and as they are just symlinks, bypassing them and going directly to the main dev entry should cause no trouble.

Another nice use of udev's symlinks is the ability to have a single device name always associated with a particular device. Before udev, using removable devices was often a problem. Device XYZ could be /dev/sda one day and /dev/sdb the next. Now you can have udev detect device XYZ and always create a symlink /dev/XYZ, that could be used no matter if the actual device is sda, sdb, sdc, or whatever. A good example of this is the /dev/disk subdirectory, where block devices (like hard disks and usb thumbdrives, but not cd drives) have dedicated symlinks based on things like serial number and drive label.

On the other hand, I don't think there is as yet a universal consensus on just what symlinks should be standard on systems. On this current system I have /dev/hdc linked to /dev/cdrom and /dev/cdrw, and I have /dev/hdd linked to /dev/dvd and /dev/dvdrw. But both drives are dvd writers. I suppose some day I might go in an fix udev to create more logical symlinks, but for now, I usually just use the base devices instead.

BTW, a quick google seems to indicate that the jmicron is a sata controller, or perhaps a kind of pata/sata translator. So you may actually have a sata drive using a pata converter there.
 
Old 08-14-2008, 06:14 PM   #3
Gruik
LQ Newbie
 
Registered: Sep 2006
Location: France (33)
Distribution: Arch
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for your answer


Quote:
Originally Posted by David the H. View Post
BTW, a quick google seems to indicate that the jmicron is a sata controller, or perhaps a kind of pata/sata translator. So you may actually have a sata drive using a pata converter there.
Okay then, seems that there's some JMicron controllers on my MSI motherboard (btw, it's an MSI P45 Neo (Intel P45 chipset))
 
  


Reply

Tags
cdrom, detection, jmicron, pata, scsi, udev


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount /dev/hdc /dev/cdrom doesn't work ShrikesHarvest Linux - Newbie 10 02-21-2009 08:05 AM
I am having a problem with my symlinks in the /dev directory JasonC10203 Linux - Newbie 2 08-13-2008 09:49 AM
/dev/cdrom1,/dev/cdrw1 symlinks made at each boot by udev which i dont want deepclutch Linux - Software 2 01-04-2007 08:39 AM
mount /dev/hdc /dev/cdrom doesn't work amandaortega Linux - Hardware 6 12-01-2006 05:48 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 08:11 PM


All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration