LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-15-2009, 08:07 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,242

Rep: Reputation: 48
USB CD-ROM and IDE-CD-ROM device name conflicts in Lenny


On my Lenny (2.6.26) system I have a USB CD-ROM and IDE-ROM (Primary slave) connected to the system. My fstab contains the following:
Code:
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hdb        /media/cdrom   iso9660 ro,user,auto    0       0
However upon booting my IDE CD-ROM does not get mounted automatically because of the following reason:
Code:
debian:~# ls -l /dev/cd*
lrwxrwxrwx 1 root root 3 2009-01-15 17:56 /dev/cdrom -> scd0 (edited)
lrwxrwxrwx 1 root root 3 2009-01-15 17:56 /dev/cdrw -> scd0
debian:~#
It seems that udev points both the deices to my USB CD-ROM (scd0)? So every time I have to manually mount my CDROM like this:
Code:
mount /dev/hdb /mnt
On my Etch (2.6.25) system with the same setup everything use to work fine and I use to get my /dev/ like this:
Code:
debian:~# ls -l /dev/cd*
lrwxrwxrwx 1 root root 3 2009-01-15 17:59 /dev/cdrom -> hdb
lrwxrwxrwx 1 root root 4 2009-01-15 17:59 /dev/cdrom1 -> scd0
lrwxrwxrwx 1 root root 4 2009-01-15 17:59 /dev/cdrom2 -> scd0
lrwxrwxrwx 1 root root 4 2009-01-15 17:59 /dev/cdrw1 -> scd0
lrwxrwxrwx 1 root root 4 2009-01-15 17:59 /dev/cdrw2 -> scd0
debian:~#
Anybody has any clues what's going on?

Last edited by kushalkoolwal; 01-15-2009 at 08:36 PM.
 
Old 01-15-2009, 08:32 PM   #2
David the H.
Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 5,320

Rep: Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196
Huh? I don't see what you're saying. /dev/cdrom is a symlink to hdb, and /dev/cdrw is a symlink to scd0. You have two separate devices there, just like you should. The dev entries are different from your old layout though.

If you want both of them to be able to mount, you need to create separate fstab entries for each device, mounting to different mount points.

Finally, your automount system probably pays attention to fstab if there's an entry there for the device, but works independently if there isn't one. So you may have to look at the configuration there instead. I can't say much else about it though, since I don't know how yours works.
 
Old 01-15-2009, 08:35 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,242

Original Poster
Rep: Reputation: 48
Sorry there was a typo in the post. I have corrected (edited) that now.

Regardless of the fstab file both the devices (cdrom and cdrw) points to scd0.
 
Old 01-16-2009, 12:44 AM   #4
David the H.
Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 5,320

Rep: Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196Reputation: 1196
Ok, I see what you mean. But those are still just symlinks to the actual devices added for general convenience. You obviously also have /dev/hdb and /dev/scd0 in there, and those are the main device nodes. You should be able to use those directly instead. If you want to alter what symlinks are generated, you'll have to look into editing the udev rules for the devices.

And since you have an fstab entry for hdb, then you can use mount to call it without any options other than the path (that's what fstab does; it provides a fixed list of mount options so that you don't have to type the full command each time). The "auto" option will generally not work because it's removable media (it really should have the "noauto" option instead, because "auto" just means it will try to mount the drive at boot), but you should be able to simply call "mount /dev/hdb" or "mount /media/cdrom". scd0, on the other hand, will need the full mount command each time you manually mount it because it doesn't have an fstab entry. If you want it to work the same way, then you'll have to add one.

Now as I said before, fstab only directly affects the mount command. It otherwise has little to do with your distro's automount system, which probably uses some combination of pmount or dbus calls or something. Each distro and desktop environment does it a bit differently. But many automount systems will start by checking fstab, and if it finds an entry will run the mount command found there. If it doesn't find an entry, then it will use whatever internal processses it has set up for mounting the device. So if it's automounting you're having trouble with, and it seems to be the case, then you'll have to look at fixing those settings instead.
 
Old 01-16-2009, 12:47 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,242

Original Poster
Rep: Reputation: 48
It seems that the issue is from 2.6.26 kernel onwards...If I use 2.6.25 everything works fine. Wonder if anything related to device management changed in the new kernel release.

Also I saw this post which was answered by you. The OP was also using 2.6.26 kernel.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting an USB-Device as CD-Rom DieVirulenz Linux - Hardware 7 12-31-2008 04:25 PM
Lockup of CD Rom/DVD Rom Device by shell process jiju.jacob Linux - Newbie 2 07-19-2008 02:54 AM
error when booting Lenny cd-rom gol Debian 1 02-10-2008 11:22 PM
bad dmesg output when using ide-scsi boot parameter for IDE CD/DVD-ROM Locura Slackware 7 09-29-2003 02:36 AM
DVD-ROM not detected CD-RW mistaken as CD-ROM Device DarkXtar Slackware 21 06-02-2003 07:58 PM


All times are GMT -5. The time now is 12:27 PM.

Main Menu
 
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
Open Source Consulting | Domain Registration