vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hello all, thanks for taking the time to read my post. When slack 10 boots it detects my two cdrom drives (a sony reader and a yamaha reader/writer). My issue is that only one of them shows up in /dev as /dev/cdrom, there is no entry for the other (cdrom2 maybe?). Which one gets linked seems arbitrary, sometimes its the sony, other times its the yamaha. So /dev/cdrom sometimes points to /dev/hda, sometimes /dev/hdb. I am getting tired of manual creating links in dev. Any advice as to how to get things working consistantly? I am using a stock slack 10 install with the provided 2.6.7 kernel.Thank you |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 nemo wrote: > When slack 10 boots it detects my two cdrom drives (a sony reader and a > yamaha reader/writer). My issue is that only one of them shows up in /dev > as /dev/cdrom, there is no entry for the other (cdrom2 maybe?). /dev/cdrom is just a useful shortcut to whatever you want the main cdrom drive to be, various apps like xine default to looking for a /dev/cdrom rather than guessing which /dev/hd? it is. As for why they're flipping about between the two drives, are you using devfs? Or is this between different installs? Blumf -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBGqVkMid3IcxolsoRAj8BAJ9coHKwgqgdzPjUroOyf9 mCUQtR5wCfTeSx jR+nOJdyc0GhjwaqgNwmOKw= =baVd -----END PGP SIGNATURE----- |
| |||
| nemo wrote: > Which one > gets linked seems arbitrary, sometimes its the sony, other times its the > yamaha. So /dev/cdrom sometimes points to /dev/hda, sometimes /dev/hdb. I > am getting tired of manual creating links in dev. Any advice as to how to > get things working consistantly? I am using a stock slack 10 install with > the provided 2.6.7 kernel.Thank you Sounds like you're using udev to create your /dev entries. You can configure udev to provide the extra symlink to your second cdrom, have the symlinks named whatever you like, and make sure that they each point to the proper drive. Here's a nice little HOWTO on this topic: http://www.reactivated.net/udevrules.php Jeffrey |
| |||
| Le 11.08.2004 23:50, nemo a écrit : <snip> > I > am getting tired of manual creating links in dev. Any advice as to how to > get things working consistantly? I am using a stock slack 10 install with > the provided 2.6.7 kernel.Thank you > Same here. But i've found why. it's cause by this script /etc/udev/scripts/make_extra_nodes.sh execute by init in /etc/rc.d/rc.udev in make_extra_nodes.sh we find : .... # If we can, add a default /dev/cdrom and /dev/dvd link: if /bin/ls -l /dev | grep -w cdrom 1> /dev/null 2> /dev/null ; then ( cd $udev_root /bin/ls -l * | grep -w cdrom | cut -f 2 -d : | cut -f 2 -d ' ' | while read optical_device ; do # It has to be a cdrom. Last one wins. <---- as it is said ln -sf $optical_device cdrom # If it's a DVD, set that link as well: if grep -i dvd /proc/ide/$optical_device/model 1> /dev/null 2> /dev/null ; then ln -sf $optical_device dvd fi done unset optical_device ) fi .... the problem with this script is that "/proc/ide/$optical_device/model" don't contain any informative string to determine what cdrom drive is: dvd or burner or cdrom. for exemple : cat /proc/ide/hdc/model JLMS XJ-HD163D it is my DVD drive ( no string 'DVD' in it) |
| ||||
| Now i have found the answer ! simply create rules for udev : in /etc/udev/rules.d create a file call local.rules put in it this four lines : # Add for creatig symlink dvd/cdom and cdrw in /dev # need some work ie automatique detect KERNEL="hdc", SYMLINK="cdrom dvd" KERNEL="hdd", SYMLINK="cdrw" replace hdc and hdd with your nodes devices ( hda and hdb like you said in your post ) Don't forget to edit /etc/udev/scripts/make_extra_nodes.sh to remove (commented) the lines that create the cdrom symlink like this : ..... # If we can, add a default /dev/cdrom and /dev/dvd link: #if /bin/ls -l /dev | grep -w cdrom 1> /dev/null 2> /dev/null ; then # ( cd $udev_root # /bin/ls -l * | grep -w cdrom | cut -f 2 -d : | cut -f 2 -d ' ' | while read optical_device ; do # It has to be a cdrom. Last one wins. # ln -sf $optical_device cdrom # If it's a DVD, set that link as well: # if grep -i dvd /proc/ide/$optical_device/model 1> /dev/null 2> /dev/null ; then # ln -sf $optical_device dvd # fi # done # unset optical_device # ) #fi ...... This is because the script overwrite your cdrom symlink create by "local.rules" Work for me :-) |