Unix Technical Forum

slack 10 cdrom detection issue

This is a discussion on slack 10 cdrom detection issue within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> hello all, thanks for taking the time to read my post. When slack 10 boots it detects my two ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 02:39 PM
nemo
 
Posts: n/a
Default slack 10 cdrom detection issue

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 02:39 PM
Blumf
 
Posts: n/a
Default Re: slack 10 cdrom detection issue

-----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-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 02:39 PM
Jeffrey Froman
 
Posts: n/a
Default Re: slack 10 cdrom detection issue

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 02:39 PM
nemo
 
Posts: n/a
Default Re: slack 10 cdrom detection issue

wow that was fast!! yes i think i am using udev, thanks alot for your
replies Jeffery & Blumf

~nemo

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 02:40 PM
Cricri
 
Posts: n/a
Default Re: slack 10 cdrom detection issue


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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 02:40 PM
Cricri
 
Posts: n/a
Default Re: slack 10 cdrom detection issue

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 :-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:38 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com