# mounting cd-rom make freeze !

## m_sylvain

Hello !

I'm experincing a cd problem with a new gentoo box :

I have  a cd-rom (hdb) and an ide cdr-rw (hdd)

I can mount any cd with hdd, but with hdc, it totally freeze the pc, and the only thing i can do is 'reset'.

I tried different kernel : gentoo-sources, vanilla-sources, ac-sources, but

i always have the same pb.

when i modprobe de ide-cd module, the dmesg cmd says me :

...

hdb:ATAPI 40X CD-ROM drive, 128kB Cache, DMA

Uniform CD-ROM driver Revision: 3.12

hdd: ATAPI 24X CD-ROM CD-R/RW drive, 2048kB Cache DMA

I've used the live cd to  install the gentoo, with this drive, and it works greet, so what's wrong here ?

Thanks for any help !   :Confused: 

Regards,

Sylvain

----------

## securiteaze

This thread may be related.

----------

## m_sylvain

Hi again  :Smile: 

I have no problem with the ide cd burner. It's just the 'normal' cd drive

which make the PC freeze when i try to mount a cd from it.

I tried to play audio cd with it, and no pb. I also tried to grip an audio cd, and it works also perfectly good.

Strange ...

sylvain

----------

## Lockup

any news? have you gotten it fixed?

cause im getting the same problem...

i also have a burner and a reader...i can read fine with burner(havent tried burning with it yet, though), but whenever i try to mount DATA cds with the cdrom reader, the whole pc freezes up...

some help would be greatly appreciated:)

----------

## nalin

just a thought, have either of you tried setting up hard drives on one ide and cdroms on second ide (ie devices for cd drives would be hdc and hdd), im using a cdrom and a cdburner with this setup and both work fine though I know its not ideal for copying cd's

----------

## Lockup

i doubt that this is the problem, as they work in other OS's

even other distros

----------

## SomeDude

well i had kinda the same problem with my CD-rom, after tuning off DMA with hdparm it worked fine.

DMA still worked for the burner though.

----------

## Lockup

think you could tell me the exact syntax? :Razz:  i dont know hdparm much, and my man files are kinda scrambled thru ssh for some reason i have yet to explore :p

----------

## SomeDude

hdparm is used with device name and option -d sets the DMA mode so for hdb it would be:

```

hdparm -d0 /dev/hdb

```

/*

to set the transfer mode to UDMA 66 use -X66 (this might be useful for Harddisks) because not using DMA slows your disks down to 4 MB/s (PIO 4  mode: Guess what the 4 is for   :Wink:  ) 

looking at hdparm is really useful so you might consider looking at the options at some other place.

If your ssh don't work right and u use a non US lang you might want to have a look in /etc/rc.conf at the keymap setting 

*/

so you might want to put this in /etc/hdparm (i don't know if it is the polical correct way to set it up but it works), well and then of course:

```

rc-update add hdparm default

```

makes sure it gets started

----------

## Lockup

WOO it worked:)

a little question with hdparm, lets say i have a script for the -d0 stuff in init.d, do i need to rc-update add default etc etc?

----------

## SomeDude

yes you do, if you just put it in init.d it's there but it only gets started once it is in the right runlevel (in this case default), you could also create a link (basically i think this is what rc-update does and i'd make sure my Harddisk has the flag -X66 turned on (try it before you put it in there)

you might want to emerge hdparm again (it is in sys-apps)

you can try your performance with this

```

hdparm -tT /dev/hda/ 

```

Have phun

----------

## Lockup

/dev/hda:

 Timing buffer-cache reads:   128 MB in  1.09 seconds =117.43 MB/sec

 Timing buffered disk reads:  64 MB in  2.58 seconds = 24.81 MB/sec

/dev/hdb:

 Timing buffer-cache reads:   128 MB in  1.11 seconds =115.32 MB/sec

 Timing buffered disk reads:  64 MB in  4.59 seconds = 13.94 MB/sec

after hdparm -X66...

/dev/hda:

 Timing buffer-cache reads:   128 MB in  1.10 seconds =116.36 MB/sec

 Timing buffered disk reads:  64 MB in  2.42 seconds = 26.45 MB/sec

/dev/hdb:

 Timing buffer-cache reads:   128 MB in  1.12 seconds =114.29 MB/sec

 Timing buffered disk reads:  64 MB in  3.51 seconds = 18.23 MB/sec

*scratches his head* hmm....doesnt seem to have changed much

----------

## SomeDude

if you try it with -d0 it should be awfully slow, is the CD-rom problem solved with -d0 ??

----------

