# cd reading probs AARRG!

## Anubis

Ok, so here's an interesting one.  I have a plextor cdrw and a shuttle dvdrom drive setup.  I hadn't actually tried to read any cd's until recently and I have had nothing but frustration.  Basically, if I put in an audio cd xmms doesn't find anything.  If I put in a data cd and try to mount it I get this:

```

bash-2.05b$ mount /mnt/cdrw 

mount: block device /dev/cdroms/cdrom1 is write-protected, mounting read-only

mount: No medium found

```

This happens for me both as the root user and my login user.  However, I am able to burn audio cd's using k3b without any problem?!  I've followed the advice in this thread as well without success:

https://forums.gentoo.org/viewtopic.php?t=16484&highlight=

Here is my grub.conf:

```

default=0

timeout=10

splashimage=(hd0,1)/grub/splash.xpm.gz

title Gentoo Linux

        root (hd0,1)

        kernel /boot/bzImage root=/dev/hda3 hdc=ide-scsi hde=ide-scsi

title Windows XP Pro

        rootnoverify (hd0,0)

        chainloader +1

title Gentoo Previous Kernel

        root (hd0,1)

        kernel /boot/bzImage.prev root=/dev/hda3 hdc=ide-scsi

title Gentoo Test Kernel

        root (hd0,1)

        kernel /boot/bzImage.test root=/dev/hda3 hdc=ide-scsi hde=ide-scsi

```

My fstab:

```

/dev/hda2               /boot           ext2            noauto,noatime          1 1

/dev/hda3               /               xfs             noatime                 0 0

/dev/hdh5               /media          vfat            users,umask=0000        0 0

/dev/hda5               none            swap            sw                      0 0

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,ro,users         0 0

/dev/cdroms/cdrom1      /mnt/cdrw       iso9660         noauto,users            0 0

proc                    /proc           proc            defaults                0 0

```

My test kernel has ide cd rom support compiled out, my normal kernel has it compiled in, neither work.  Here is my devfsd.conf:

```

# Sample /etc/devfsd.conf configuration file.

# Richard Gooch  <rgooch@atnf.csiro.au>         3-JUL-2000

#

# The Gentoo Linux Team - http://www.gentoo.org/

#     - Many fixes, etc

#

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/devfsd.conf,v 1.12 2002/09/29 17:31:01 azarah Exp $

# Enable full compatibility mode for old device names. You may comment these

# out if you don't use the old device names. Make sure you know what you're

# doing!

REGISTER        .*           MKOLDCOMPAT

UNREGISTER      .*           RMOLDCOMPAT

# You may comment out the above and uncomment the following if you've

# configured your system to use the original "new" devfs names or the really

# new names

#REGISTER       vc/.*        MKOLDCOMPAT

#UNREGISTER     vc/.*        RMOLDCOMPAT

#REGISTER       pty/.*       MKOLDCOMPAT

#UNREGISTER     pty/.*       RMOLDCOMPAT

#REGISTER       misc         MKOLDCOMPAT

#UNREGISTER     misc         RMOLDCOMPAT

# You may comment these out if you don't use the original "new" names

REGISTER        .*           MKNEWCOMPAT

UNREGISTER      .*           RMNEWCOMPAT

# Enable module autoloading. You may comment this out if you don't use

# autoloading

LOOKUP          .*           MODLOAD

# Uncomment the following if you want to set the group to "tty" for the

# pseudo-tty devices. This is necessary so that mesg(1) can later be used to

# enable/disable talk requests and wall(1) messages.

REGISTER        ^pty/s.*     PERMISSIONS -1.tty  0600

REGISTER        ^pts/.*      PERMISSIONS -1.tty  0600

# Uncomment this if you want permissions to be saved and restored

# NB: Do NOT change the following!

# Do not do this for pseudo-terminal devices

REGISTER        ^pt[sy]/.*   IGNORE

CHANGE          ^pt[sy]/.*   IGNORE

CREATE          ^pt[sy]/.*   IGNORE

DELETE          ^pt[sy]      IGNORE

REGISTER        .*           COPY    /lib/dev-state/$devname $devpath

CHANGE          .*           COPY    $devpath /lib/dev-state/$devname

CREATE          .*           COPY    $devpath /lib/dev-state/$devname

DELETE          .*           CFUNCTION GLOBAL unlink /lib/dev-state/$devname

RESTORE         /lib/dev-state

# You can force default like this :

# PERMISSIONS owner_and_group access_mode

# Video4Linux devices

REGISTER       v4l/.*       PERMISSIONS root.video 660

# ALSA/OSS stuff

# Comment/change these if you want to change the permissions on

# the audio devices

LOOKUP          snd          MODLOAD ACTION snd

LOOKUP          dsp          MODLOAD

LOOKUP          mixer        MODLOAD

LOOKUP          midi         MODLOAD

REGISTER        sound/.*     PERMISSIONS root.audio 660

REGISTER        snd/.*       PERMISSIONS root.audio 660

# Uncomment this to let PAM manage devfs

#REGISTER        .*           CFUNCTION /lib/security/pam_console_apply_devfsd.so pam_console_apply_single $devpath

# Autoload the sg module if generic scsi driver compiled as module.

#LOOKUP          ^sg$      MODLOAD ACTION sg

# Give the cdrw group write permissions to /dev/sg0

# This is done to have non root user use the burner (scan the scsi bus)

#REGISTER        ^scsi/host.*/bus.*/target.*/lun.*/generic    PERMISSIONS root.cdrw 660

# General note for the following auto creation of symlinks:

#

#    If you change the device that the symlink points to,

#    you should also remove the symlink before restarting

#    devfsd

# Create /dev/cdrom for the first cdrom drive

LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom

REGISTER        ^cdrom/cdrom0$   CFUNCTION GLOBAL mksymlink $devname cdrom

UNREGISTER      ^cdrom/cdrom0$   CFUNCTION GLOBAL unlink cdrom

# Create /dev/dvd for the second cdrom drive

# (change 'cdroms/cdrom1' to suite your setup)

# NOTE: We add the fully qualified path here, else some apps

#       have problems to resolve the true device (drip comes to mind)

#LOOKUP          ^dvd$           CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 dvd

#REGISTER        ^cdrom/cdrom1$  CFUNCTION GLOBAL mksymlink ${devpath} dvd

#UNREGISTER      ^cdrom/cdrom1$  CFUNCTION GLOBAL unlink dvd

# Create /dev/cdrw for the first cdrom on the scsi bus

# (change 'sr0' to suite your setup)

#LOOKUP          ^cdrw$          CFUNCTION GLOBAL mksymlink sr0 cdrw

#REGISTER        ^sr0$           CFUNCTION GLOBAL mksymlink $devname cdrw

#UNREGISTER      ^sr0$           CFUNCTION GLOBAL unlink cdrw

# Create /dev/mouse

LOOKUP          ^mouse$          CFUNCTION GLOBAL mksymlink misc/psaux mouse

REGISTER        ^misc/psaux$     CFUNCTION GLOBAL mksymlink $devname mouse

UNREGISTER      ^misc/psaux$     CFUNCTION GLOBAL unlink mouse

# Manage USB mouse

REGISTER        ^input/mouse0$   CFUNCTION GLOBAL mksymlink $devname usbmouse

UNREGISTER      ^input/mouse0$   CFUNCTION GLOBAL unlink usbmouse

REGISTER        ^input/mice$     CFUNCTION GLOBAL mksymlink $devname usbmouse

UNREGISTER      ^input/mice$     CFUNCTION GLOBAL unlink usbmouse

# Support additional config installed by packages ...

INCLUDE /etc/devfs.d

# devfsd.conf ends here

```

My user is a member of all the pertinent groups:

```

root::0:root

bin::1:root,bin,daemon

daemon::2:root,bin,daemon

sys::3:root,bin,adm

adm::4:root,adm,daemon

tty::5:

disk::6:root,adm,myuser

lp::7:lp

mem::8:

kmem::9:

wheel::10:root,myuser

floppy::11:root,myuser

mail::12:mail

news::13:news

uucp::14:uucp

man::15:man

cron::16:cron

console::17:

audio::18:myuser

cdrom::19:myuser

dialout::20:root,myuser

ftp::21:

sshd::22:

at::25:at

tape::26:root,myuser

video::27:root,myuser

squid::31:squid

gdm::32:gdm

xfs::33:xfs

games::35:

named::40:named

mysql:x:60:

postgres::70:

cdrw::80:myuser

apache::81:

nut::84:

usb::85:

vpopmail:x:89:

users::100:games,myuser

nofiles:x:200:

qmail:x:201:

postfix:x:207:

postdrop:x:208:

portage::250:portage

utmp:x:406:

nogroup::65533:

nobody::65534:

cdrecording::101:myuser

```

Here is what dmesg finds:

```

Kernel command line: root=/dev/hda3 hdc=ide-scsi hde=ide-scsi

ide_setup: hdc=ide-scsi

ide_setup: hde=ide-scsi

    ide2: BM-DMA at 0xa000-0xa007, BIOS settings: hde:pio, hdf:pio

    ide3: BM-DMA at 0xa008-0xa00f, BIOS settings: hdg:pio, hdh:pio

hda: IC35L040AVER07-0, ATA DISK drive

hdc: PLEXTOR CD-R PX-W1610A, ATAPI CD/DVD-ROM drive

hde: DVDROM 12X, ATAPI CD/DVD-ROM drive

hdh: IC35L060AVER07-0, ATA DISK drive

```

I'm at wits end, any suggestions would be greatly appreciated.

----------

## oniq

Are you sure /dev/cdroms/cdrom0 and /dev/cdroms/cdrom1 exist?

----------

## Anubis

Yup:

```

bash-2.05b$ ll /dev/cdroms/ | grep cdrom*

lr-xr-xr-x    1 root     root           34 Dec 31  1969 cdrom0 -> ../scsi/host0/bus0/target0/lun0/cd

lr-xr-xr-x    1 root     root           34 Dec 31  1969 cdrom1 -> ../scsi/host0/bus0/target1/lun0/cd

```

Me still stumped...heh.

----------

## Anubis

holy #*(@*$# bloody hell.  Well, it looks like I somehow had the drives named wrong...well backwards that is.  I off hand placed a cd in my dvd drive (cdrom) and accidentally clicked on cdrw and boom, all the tracks appeared.  Gonna have to look into this more when I get home since I'm taking off for a college basketball game.

----------

