# can't detect cdrom drive

## arbuckle

I've got a cd/dvd rom drive that hasn't been detected at all recently. I don't know exactly when it stopped working. All I know is that it used to work just fine, and it still works just fine under windows. But for some reason gentoo can't detect it at all. I'm not very good at debugging this type of thing. I've already chatted a bit about it on #gentoo but no solution was found. 

It is an ATA drive. I don't have anything called /dev/cdrom* or /dev/dvd* 

I'm 99% sure I have the right chipset installed. I know it's impossible for anybody to debug this with the amount of information I've given, but I guess the first step would be for somebody to tell me what I need to post to get this solved. 

thanks.Last edited by arbuckle on Sun Jan 31, 2010 10:37 pm; edited 2 times in total

----------

## Mike Hunt

do you get any output from this?

```
grep ^[^#].*BLK_DEV_SR /usr/src/linux/.config
```

----------

## d2_racing

Hi, can you post this :

```

# lspci -n

```

----------

## arbuckle

requested information:

$   grep ^[^#].*BLK_DEV_SR /usr/src/linux/.config                                                                                 

CONFIG_BLK_DEV_SR=y

CONFIG_BLK_DEV_SR_VENDOR=y

---------------------

# lspci -n                           

00:00.0 0580: 10de:005e (rev a3)                  

00:01.0 0601: 10de:0050 (rev a3)

00:01.1 0c05: 10de:0052 (rev a2)

00:02.0 0c03: 10de:005a (rev a2)

00:02.1 0c03: 10de:005b (rev a3)

00:04.0 0401: 10de:0059 (rev a2)

00:06.0 0101: 10de:0053 (rev f2)

00:07.0 0101: 10de:0054 (rev f3)

00:08.0 0101: 10de:0055 (rev f3)

00:09.0 0604: 10de:005c (rev a2)

00:0a.0 0680: 10de:0057 (rev a3)

00:0b.0 0604: 10de:005d (rev a3)

00:0c.0 0604: 10de:005d (rev a3)

00:0d.0 0604: 10de:005d (rev a3)

00:0e.0 0604: 10de:005d (rev a3)

00:18.0 0600: 1022:1100

00:18.1 0600: 1022:1101

00:18.2 0600: 1022:1102

00:18.3 0600: 1022:1103

01:00.0 0300: 10de:0092 (rev a1)

05:06.0 0604: 3388:0021 (rev 11)

05:07.0 0200: 168c:0013 (rev 01)

05:0a.0 0104: 1095:3114 (rev 02)

05:0b.0 0c00: 104c:8023

05:0c.0 0200: 11ab:4320 (rev 13)

06:08.0 0400: 4444:0016 (rev 01)

06:09.0 0400: 4444:0016 (rev 01)

I also just noticed this:

# dmesg | grep sr

Driver 'sr' needs updating - please use bus_type methods

----------

## pappy_mcfae

Are you using X? IF so, do you have hal and dbus properly installed? Post your /etc/fstab and /etc/group files.

Blessed be!

Pappy

----------

## arbuckle

-----------------------------------fstab---------------------------------------------

/dev/sdb1		/boot		ext2		noauto,noatime	1 2

/dev/sdb3		/		ext3		noatime		0 1

/dev/sdb2		none		swap		sw		0 0

/dev/cdrom1		/mnt/cdrom	auto		noauto,ro,user	0 0

/dev/sda1		/mnt/ntfs       ntfs		noauto,ro,user,noexec,umask=0000  0 0

/dev/sdc2               /mnt/ipod       vfat            noauto,user,rw,async,nodev,nosuid,umask=0000,noexec     0 0

/dev/usbkey             /mnt/usb	vfat		noauto,user,rw,async,nodev,nosuid,umask=0000,noexec	0 0

#/dev/fd0		/mnt/floppy	auto		noauto		0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0

--------------------------------------------groups----------------------------------------------

root:x:0:root

bin:x:1:root,bin,daemon

daemon:x:2:root,bin,daemon

sys:x:3:root,bin,adm

adm:x:4:root,adm,daemon

tty:x:5:chris

disk:x:6:root,adm,haldaemon

lp:x:7:lp,chris,christopher

mem:x:8:

kmem:x:9:

wheel:x:10:root,chris,christopher

floppy:x:11:root,haldaemon

mail:x:12:mail

news:x:13:news

uucp:x:14:uucp,chris

man:x:15:man

console:x:17:

audio:x:18:chris,pulse,anne,jen,christopher

cdrom:x:19:chris,haldaemon,christopher

dialout:x:20:root

tape:x:26:root

video:x:27:root,chris,anne,jen,christopher

cdrw:x:80:haldaemon,chris,christopher

usb:x:85:chris,haldaemon,anne,jen,christopher

users:x:100:chris,anne,jen

nofiles:x:200:

smmsp:x:209:smmsp

portage:x:250:portage,chris,christopher

utmp:x:406:

nogroup:x:65533:

nobody:x:65534:

ldap:x:439:

sshd:x:22:

chris:x:1000:

pulse-access:x:1001:

pulse-rt:x:1002:

pulse:x:1003:

ntp:x:123:

lpadmin:x:106:

realtime:x:1004:

messagebus:x:1005:

haldaemon:x:1006:haldaemon

plugdev:x:1007:haldaemon,jen,christopher

gdm:x:1008:

stb-admin:x:1009:

postgres:x:70:

games:x:35:chris,anne,jen,christopher

ssmtp:x:1010:

mysql:x:60:

cron:x:16:

scanner:x:1011:

crontab:x:1012:

anne:x:1013:

jen:x:1014:

I can't say for sure if they are installed properly, but dbus and hal are running when the computer starts.

----------

## d2_racing

Can you post this :

```

# rc-update show

```

----------

## arbuckle

# rc-update show

           alsasound | boot

            bootmisc | boot

             checkfs | boot

           checkroot | boot

               clock | boot

         consolefont | boot

                dbus |      default

                hald |      default

            hostname | boot

             keymaps | boot

               local |      default nonetwork

          localmount | boot

             modules | boot

              net.lo | boot

            netmount |      default

           rmnologin | boot

            timidity |      default

             urandom | boot

                 xdm |      default

----------

## pappy_mcfae

Comment out this line:

```
/dev/cdrom1 /mnt/cdrom auto noauto,ro,user 0 0 
```

If you are using hal/dbus, invoking any optical drive (or usb device, for that matter) in /etc/fstab is inviting a non-working drive. If you still have issues, post the results of lspci -n, lsusb, and cat /proc/cpuinfo as well as your full kernel .config. 

Blessed be!

Pappy

----------

## arbuckle

I removed the fstab cdrom line, and rebooted. No change.

lspci

http://pastebin.com/f5d029d11

lsusb

http://pastebin.com/f4d803cd3

cpuinfo

http://pastebin.com/f253ce568

full kernel config

http://pastebin.com/f5ebaf316

----------

## d2_racing

Maybe the best for you should be to boot with the latest SystemRescueCD and post this :

```

# lspci -kvm

```

----------

## pappy_mcfae

I do believe I found your issue. One of your IDE interfaces wasn't set up. I also found enough things in your .config to start with a seed, and move from there. 

Click here for your new .config. Compile as is.

For the best results, please do the following:

1) Move your .config file out of your kernel source directory ( /usr/src/linux-2.6.30-gentoo-r4 ).

2) Issue the command make mrproper. This is a destructive step. It returns the source to pristine condition. Unmoved .config files will be deleted!

3) Copy my .config into your source directory.

4) Issue the command make && make modules_install.

5) Install the kernel as you normally would, and reboot.

6) Once it boots, please post /var/log/dmesg so I can see how things loaded.

Blessed be!

Pappy

----------

## arbuckle

oh man...I completely forgot about this post. (and my disk still isn't working)

The .config link is broken.

ugh...I'll look around my kernel for things they may be related to an IDE setup...

sorry about that.

----------

## pappy_mcfae

Ah, you are alive. I still have the .config if you need it, I'm sure.

BB!

P

----------

## arbuckle

I think I'll just grab one of your kernel seeds and start from scratch. I've been neglecting mine for a long time. Can you tell me exactly what kernel options I should be looking out for to make sure that my IDE cdrom/dvd rom drive will work?

Thanks.

----------

## pappy_mcfae

All you would need to do is to set up your hard drive controllers with the SATA drivers. The SCSI underpinnings and such are already set up and ready to go in the seed.

If you have any issues doing the setup, don't hesitate to ask.

BB!

P

----------

## arbuckle

Ok, I used the kernel seed for 2.6.31-gentoo-r6

Everything works fine except my usb mouse and CDROM drive.

Oddly, the keyboard works. The mouse is usb, and the keyboard is not. PS/2 or something. 

Some of my usb ports seem dead as well.....I don't think that this is related, but they don't even output their 5V that they should. 

http://pastebin.com/m38a06d16

thanks.

EDIT!!!! I figured out the USB problem. I forgot OHCI support....

----------

## VoidMage

The other problem may be caused by both CONFIG_IDE and CONFIG_ATA

being set. Unset CONFIG_IDE and try again.

----------

## arbuckle

unset config_ide, no change.

----------

## VoidMage

Pastebin syslog then (at least dmesg part of it).

----------

## arbuckle

http://pastebin.com/m2c7725e1

----------

## pappy_mcfae

Post /etc/fstab.

BB!

P

----------

## arbuckle

# <fs>			<mountpoint>	<type>		<opts>		<dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sdb1		/boot		ext2		noauto,noatime	1 2

/dev/sdb3		/		ext3		noatime		0 1

/dev/sdb2		none		swap		sw		0 0

#/dev/cdrom1		/mnt/cdrom	auto		noauto,ro,user	0 0

/dev/sda1		/mnt/ntfs       ntfs		noauto,ro,user,noexec,umask=0000  0 0

/dev/sdc2               /mnt/ipod       vfat            noauto,user,rw,async,nodev,nosuid,umask=0000,noexec     0 0

/dev/usbkey             /mnt/usb	vfat		noauto,user,rw,async,nodev,nosuid,umask=0000,noexec	0 0

#/dev/fd0		/mnt/floppy	auto		noauto		0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0

----------

## pappy_mcfae

That looks right. Now post the results of rc-update show.

BB!

P

----------

## arbuckle

# rc-update show

           alsasound | boot

            bootmisc | boot

             checkfs | boot

           checkroot | boot

               clock | boot

         consolefont | boot

                dbus |      default

                hald |      default

            hostname | boot

             keymaps | boot

               local |      default nonetwork

          localmount | boot

             modules | boot

              net.lo | boot

            netmount |      default

           rmnologin | boot

            timidity |      default

             urandom | boot

                 xdm |      default

----------

## pappy_mcfae

Looking good there, too. Post /etc/group.

BB!

P

----------

## arbuckle

# cat /etc/group                    

root:x:0:root                                        

bin:x:1:root,bin,daemon                              

daemon:x:2:root,bin,daemon                           

sys:x:3:root,bin,adm                                 

adm:x:4:root,adm,daemon

tty:x:5:chris

disk:x:6:root,adm,haldaemon

lp:x:7:lp,chris,christopher

mem:x:8:

kmem:x:9:

wheel:x:10:root,chris,christopher

floppy:x:11:root,haldaemon

mail:x:12:mail

news:x:13:news

uucp:x:14:uucp,chris,christopher

man:x:15:man

console:x:17:

audio:x:18:chris,pulse,anne,jen,christopher

cdrom:x:19:chris,haldaemon,christopher

dialout:x:20:root

tape:x:26:root

video:x:27:root,chris,anne,jen,christopher

cdrw:x:80:haldaemon,chris,christopher

usb:x:85:chris,haldaemon,anne,jen,christopher

users:x:100:chris,anne,jen

nofiles:x:200:

smmsp:x:209:smmsp

portage:x:250:portage,chris,christopher

utmp:x:406:

nogroup:x:65533:

nobody:x:65534:

ldap:x:439:

sshd:x:22:

chris:x:1000:

pulse-access:x:1001:

pulse-rt:x:1002:

pulse:x:1003:

ntp:x:123:

lpadmin:x:106:

realtime:x:1004:

messagebus:x:1005:

haldaemon:x:1006:haldaemon

plugdev:x:1007:haldaemon,jen,christopher

gdm:x:1008:

stb-admin:x:1009:

postgres:x:70:

games:x:35:chris,anne,jen,christopher

ssmtp:x:1010:

mysql:x:60:

cron:x:16:

scanner:x:1011:

crontab:x:1012:

anne:x:1013:

jen:x:1014:

----------

## pappy_mcfae

cdrom:x:19:chris,haldaemon,christopher 

plugdev:x:1007:haldaemon,jen,christopher 

According to this, only chris and christopher will have access to the CDROM (optical) drive. However, plugdev gets squirrely, in that chris is not a member. By my reckoning, that puts you down to only one user who can use the optical drive. It's also a good idea to mirror those users in plugdev and usb.

In a nutshell, whoever is in group cdrom has access to that drive. No other users should be able to use it, not even root. If chris and christopher can use the drive, then you need to adjust permissions for all other users who desire to use the optical drive.

If that is not the case, then we have to look at hardware issues. If you have another OS installed, switch to that, and see if the optical drive works. Even better, install a boot CD and see if the optical drive boots the system. If you get no boot, or no optical drive functionality in another OS, then it's a hardware fault.

BB!

P

----------

## arbuckle

err, well I don't haven have a /dev/cdrom or /dev/dvd file. Shouldn't those two files be created regardless of permissions? 

I've tried using the drive on windows. It's fine. I was able to burn and play a DVD.

----------

## Ron Olsen

I've had similar problems on my Gentoo system as well. On my system, /dev/hdc is the DVD ROM drive and /dev/hdd is the DVD Writer, and /dev/cdrom, etc. are symbolic links.  I fixed the problem of a missing /dev/cdrom by

```

cd /dev

ln -s hdc cdrom

```

This link is created at boot time by udev, using the rules in /etc/udev/rules.d/70-persistent-cd.rules

You need to have the correct info in this file to have /dev/cdrom and other optical drive links created at boot time.

But if they are not, you can always create them manually as in the above code snippet.Last edited by Ron Olsen on Sun Jan 31, 2010 7:55 pm; edited 1 time in total

----------

## arbuckle

no /dev/h* either.

----------

## Ron Olsen

Do you have any devices in /dev that are in the cdrom group? What do you get from

```
cd /dev

ls -l | grep cdrom

```

Also, what is in your /etc/udev/rules.d/70-persistent-cd.rules ?

----------

## arbuckle

nothing.

----------

## Ron Olsen

Maybe you should try running the Gentoo 10.1 Live DVD and see if it can boot from your drive:

http://www.gentoo.org/main/en/where.xml

----------

## VoidMage

Anyway, with CONFIG_ATA, cdroms will be /dev/sr*

----------

## arbuckle

I got it detected...for weird things now..

it's detected as cdrom4 and dvd4

and it wont play any media (audio or dvd cds). I don't know about data disks yet. 

here are the changes to my kernel...

# diff /boot/kernel-2.6.31-gentoo-r6.config-3 /boot/kernel-2.6.31-gentoo-r6.config-4                                                           

4c4                                                                             

< # Sat Jan 30 18:51:18 2010                                                    

---                                                                             

> # Sun Jan 31 16:24:06 2010                                                    

658c658,721                                                                     

< # CONFIG_IDE is not set                                                       

---                                                                             

> CONFIG_IDE=y                                                                  

>                                                                               

> #                                                                             

> # Please see Documentation/ide/ide.txt for help/info on IDE drives            

> #                                                                             

> CONFIG_IDE_XFER_MODE=y                                                        

> CONFIG_IDE_TIMINGS=y                                                          

> CONFIG_IDE_ATAPI=y                                                            

> # CONFIG_BLK_DEV_IDE_SATA is not set                                          

> CONFIG_IDE_GD=y                                                               

> CONFIG_IDE_GD_ATA=y                                                           

> # CONFIG_IDE_GD_ATAPI is not set                                              

> # CONFIG_BLK_DEV_DELKIN is not set                                            

> CONFIG_BLK_DEV_IDECD=y                                                        

> CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y

> # CONFIG_BLK_DEV_IDETAPE is not set

> # CONFIG_BLK_DEV_IDEACPI is not set

> # CONFIG_IDE_TASK_IOCTL is not set

> CONFIG_IDE_PROC_FS=y

>

> #

> # IDE chipset support/bugfixes

> #

> # CONFIG_IDE_GENERIC is not set

> # CONFIG_BLK_DEV_PLATFORM is not set

> # CONFIG_BLK_DEV_CMD640 is not set

> # CONFIG_BLK_DEV_IDEPNP is not set

> CONFIG_BLK_DEV_IDEDMA_SFF=y

>

> #

> # PCI IDE chipsets support

> #

> CONFIG_BLK_DEV_IDEPCI=y

> CONFIG_IDEPCI_PCIBUS_ORDER=y

> # CONFIG_BLK_DEV_GENERIC is not set

> # CONFIG_BLK_DEV_OPTI621 is not set

> # CONFIG_BLK_DEV_RZ1000 is not set

> CONFIG_BLK_DEV_IDEDMA_PCI=y

> # CONFIG_BLK_DEV_AEC62XX is not set

> # CONFIG_BLK_DEV_ALI15X3 is not set

> CONFIG_BLK_DEV_AMD74XX=y

> # CONFIG_BLK_DEV_ATIIXP is not set

> # CONFIG_BLK_DEV_CMD64X is not set

> # CONFIG_BLK_DEV_TRIFLEX is not set

> # CONFIG_BLK_DEV_CS5520 is not set

> # CONFIG_BLK_DEV_CS5530 is not set

> # CONFIG_BLK_DEV_HPT366 is not set

> # CONFIG_BLK_DEV_JMICRON is not set

> # CONFIG_BLK_DEV_SC1200 is not set

> # CONFIG_BLK_DEV_PIIX is not set

> # CONFIG_BLK_DEV_IT8172 is not set

> # CONFIG_BLK_DEV_IT8213 is not set

> # CONFIG_BLK_DEV_IT821X is not set

> # CONFIG_BLK_DEV_NS87415 is not set

> # CONFIG_BLK_DEV_PDC202XX_OLD is not set

> # CONFIG_BLK_DEV_PDC202XX_NEW is not set

> # CONFIG_BLK_DEV_SVWKS is not set

> # CONFIG_BLK_DEV_SIIMAGE is not set

> # CONFIG_BLK_DEV_SIS5513 is not set

> # CONFIG_BLK_DEV_SLC90E66 is not set

> # CONFIG_BLK_DEV_TRM290 is not set

> # CONFIG_BLK_DEV_VIA82CXXX is not set

> # CONFIG_BLK_DEV_TC86C001 is not set

> CONFIG_BLK_DEV_IDEDMA=y

----------

## pappy_mcfae

Post the whole .config. You've got a conflict going.

BB!

P

----------

## arbuckle

http://pastebin.com/f2825ac95

----------

## pappy_mcfae

I never throw things away. Since I still had your old .config that I created, and you never picked up, I just updated it to your current version of gentoo-sources. This should fix your ills, and assure a stable base for your system.

Blessed be!

Pappy

----------

## arbuckle

I looked at the diff between my config and that config you just posted. they are very different. I'd like to be able to keep on top of my own kernel, could you just summarize the important changes?

thanks.

----------

## pappy_mcfae

When I saw the hard drive settings, I restarted with the old .config I created for you, but didn't get uploaded. I updated said .config to the present version of your kernel source. As for changes that were important, the most important was to use only the SATA drivers. 

When you mix ATA/ATAPI/MFM/RLL drivers and SATA, you get messes. I would also imagine you had the SCSI setup incorrect, but I never got down to that part on make xconfig. When I find lots of settings that exist out of my range of what's ok, I start over. 

To find out those setting ranges, go to my web site, and look up the settings pages. That will explain up to networking. I am back to finishing device drivers, and hope to have it ready and up by next weekend, at the latest.

My best advice would be for you to compare the differences, and look up the settings I have listed so far to see reasons as to why I made the changes reflected in your new .config. That will give you an insight into why I set things up as I do.

Blessed be!

Pappy

----------

## arbuckle

Hi,

I tried your kernel exactly as posted. Everything works, but the dvd/cdrom devices are still labeled dvd4 and cdrom4 and if there is a disk in the drive at boot the screen with all the [ok]s gets flooded with cdrom io errors. I can't read them they fly by too quickly. I tried it under windows again, works there. Is there some software that may be messing with it? What commands would you recommend for debugging drives in general? I know there is something called hdparam. I seem to vaguely remember some user space lib ata library, can I make sure it's not installed, I forget the name. 

thanks.

EDIT: maybe it's a checksum error...the drive SOUNDS normal when it reads.

----------

## pappy_mcfae

Checksum errors mean one of two things, either you have a bad drive or the disk you're trying to read is fried. As long as there are no optical drives listed in /etc/fstab, which there weren't, as I recall, and the permissions for your user are right, then you should have decent optical drive operation.

Try numerous disks. If they all bomb, I'm seriously thinking bad drive. Without seeing the system working myself, it's hard to say one way or the other.

BB!

P

----------

