# [~SOLVED] Problems with cdroms/dvds

## psdasilva

Hi!

I don't know when these problems began because I don't use cdrom/dvds too much.

I had a mount line in fstab using /dev/cdrom.

Now I noticed that /dev/cdrom does not exist. Instead there is /dev/cdrom1.

So, I changed fstab accordingly i.e. from /dev/cdrom to /dev/cdrom1.

(BTW, is this normal?)

This is what is happening:

Very rarely some CDs get automounted in kde! In general I got the following dmesg:

 *Quote:*   

> 
> 
> hda: command error: status=0x51 { DriveReady SeekComplete Error }                                                           
> 
> hda: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }                                                      
> ...

 

"mount" almost always succeeds on these CDs and then I am able to completely read all files, but on very few occasions it freezes itself and every command that accesses the disks. I need to use alt-ptrscr+{U,S,B} (kernel hack keys) to restart the computer.

HW problems are excluded because this happens on 2 different PCs and windows, installed on one of them, correctly recognizes and uses the cdrom.

Thanks for any help/comments on how to fix this?Last edited by psdasilva on Mon Feb 22, 2010 10:45 pm; edited 1 time in total

----------

## VoidMage

Try both removing fstab entry and migrating to pure libata setup.

----------

## psdasilva

 *VoidMage wrote:*   

> Try both removing fstab entry and migrating to pure libata setup.

 

I am sorry. Would you pls. detail? How do I do that?

Thank you.

----------

## cach0rr0

 *psdasilva wrote:*   

>  *VoidMage wrote:*   Try both removing fstab entry and migrating to pure libata setup. 
> 
> I am sorry. Would you pls. detail? How do I do that?
> 
> Thank you.

 

basically...you're using the old CONFIG_IDE drivers for your disk controller

You should be using only CONFIG_ATA

CONFIG_IDE names things as /dev/hd*

CONFIG_ATA names things as /dev/sd*

(simplified explanation, there's more to it than that)

You should have this unchecked completely, as per the example below

(this is CONFIG_IDE)

```

< > ATA/ATAPI/MFM/RLL support

```

And have only this ticked

(this is CONFIG_ATA)

```

<*> Serial ATA (prod) and Parallel ATA (experimental) drivers 

```

You will then want to find the PATA driver that works for your CDROM. You will probably need to select [*]   ATA SFF support before it will be visible. 

If you were using one of the drivers under CONFIG_IDE for your hard disk, you will also need to make sure you include the correct CONFIG_ATA driver for it now, as all of the CONFIG_IDE stuff will be gone. 

In summary: you should have NOT have ATA/ATAPI/MFM/RLL support selected, and should ONLY have Serial ATA (prod) and Parallel ATA (experimental) drivers  selected, including whatever drivers beneath that you need to support your disk controllers (for both your hard drives AND your cdrom)

If you are unsure what driver to choose, check the first link in my signature.

----------

## psdasilva

Thank you very much.

Just one more question: If I remove the mount line from fstab where does the dvd/cdrom get mounted?

Is there anything else to config?

----------

## cach0rr0

 *psdasilva wrote:*   

> Thank you very much.
> 
> Just one more question: If I remove the mount line from fstab where does the dvd/cdrom get mounted?
> 
> Is there anything else to config?

 

The device itself will already exist as /dev/sr0

udev will create symlinks named, for example, /dev/dvd, /dev/cdrom, pointed at /dev/sr0

Normally your desktop environment will have tools to get info from HAL and automount it, often done at /media/<somename>, but that's largely transparent to the user if they're running things in a graphical setting.

----------

## psdasilva

OK! It's done.

I needed to delete /etc/udev/70-persistent-cd.rules.

Now udev creates /dev/cdrom and /dev/dvd instead of /dev/cdrom<n> and /dev/dvd<n>.

About the new drivers ...

They seem to work fine. I got no freezes so far. But automatically mount of certain (old?) r/w CDs still fail! I think the problem has something to do with the initial "reads" of the CDs. When the CDs have poor quality, it seems that some errors are found in earlier reads. Later, when the CD gets more perhaps stabilized these errors probably went away. This could be the reason why I can mount them manually and successfully read the files.

In fact dmesg shows some blocks in error while trying to automount those CDs.

Removing the mount line from /etc/fstab causes the CDs being mounted into a subdir of /media.

I put it back so that CDs get mounted in /cdrom (I use this dir for simplicity and because some scripts I wrote refer to it). There is no change in the behavior.

Thanks for the help.

----------

