# udev and cdrom device

## koelle

Hey,

i got a problem with my cdrom device since i switched from devfsd to udev. Here's my fstab:

 *Quote:*   

> /dev/cdroms/cdrom0	/mnt/cdrom	iso9660		noauto,user,exec,ro		0 0

 

When i try to mount it, i get the message that special device /dev/cdroms/cdrom0 doesn't exist. Where's the cdrom device located under udev??

I bet that I'll have the same problem with my cdburner and dvddevice. I have a CDRW/DVD Combo device. Here's my fstab entries for cdburner and dvd:

 *Quote:*   

> /dev/cdroms/cdrom0	/mnt/dvd	auto		noauto,user,exec,ro		0 0
> 
> /dev/sr0		/mnt/cdrw	auto		noauto,user,exec,ro		0 0

 

Can someone help me? Thanks.

koelle

----------

## rhill

well, im no expert, but i can tell you that all my cdrom-type entries in /dev are symlinks to hdc or hdd.  maybe try replacing /dev/cdroms/cdrom0 with /dev/hdc in fstab.  are they ide (atapi) or scsi drives?  if they were ide were you using scsi emulation to use them?  and last question, are you tarring and rebuilding your dev tree?  this is controlled in /etc/conf.d/rc  what you want to have is

```
RC_DEVICE_TARBALL="no"
```

my reasoning is maybe some links stuck around that shouldn't have, and that's screwing things up.  if you have an ide cd burner, it shouldn't be a sd0 device

----------

## koelle

Hi,

i have the tarball set to "no". I just found out that i am able to mount my cdburner. Changing /dev/cdroms/cdrom0 to dev/hdc did not work. Got the same message (device hdc does not exist ...)

My device is a scsi device. It's somehow weird that /dev/hdc doesn't exist, because i have this in my grub.conf:

 *Quote:*   

> hdc=ide-scsi

 

that's for my CDRW/DVD Combo device.

greetings koelle

----------

## Zyne

run this cmd:

```

$ ls -l /dev |grep -i hdc

```

it'll show you which nodes point to your cdrw...

you can of course to the same in /dev/cdroms

if no results come back, you should review your udev rules

edit: just read that it's a scsi device...

if it's scsi, you'll have to look for sda, sdb, sdc and so on (not sure though)

What I summed up above definitely works for IDE cdroms... dunno about scsi...

----------

## koelle

Hi,

ls -l /dev  |grep -i hdc doesn't work. I looked through my udev rules file (/etc/udev/rules.d/50-udev.rules). Here's what might have something to do with my cdrom device:

 *Quote:*   

> # cdrom symlinks and other good cdrom naming
> 
> BUS="ide",  KERNEL="hd[a-z]",  PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
> 
> BUS="scsi", KERNEL="sr[a-z]",  PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
> ...

 

greetings koelle

----------

## dsd

is ide-cd loaded or compiled in? what happens if you disable ide-scsi? (its no longer needed in 2.6)

----------

## kimchi_sg

bumping this topic, because i have this problem after a fresh stage "1 on 3" installation ( https://forums.gentoo.org/viewtopic.php?t=274968 ). My CDROM is  a ide cdrom, which the liveCD detected as /dev/hdc, but the hdc device is no longer around after I emerged udev. Regardless of RC_DEVICE_TARBALL="no" or "yes", the hdc device refuses to appear.

----------

## robfantini

try this  as it solved missing  /dev/snd and /dev/hdb1 hdb2 b3 entries.  

1-  rm /dev/.devfsd

2-  reboot

----------

## kimchi_sg

Well, i don't have a /dev/.devfsd file.  :Sad: 

I did a ls -a /dev/ and found a directory .udevdb/ and .udev file. Tried removing them. That didn't solve the problem.

----------

## robfantini

Well removing the .devfsd file may not have been  what solved my problem.  

 Last night I had upgraded udev to udev-051  ... 

That may have solved the problem i was having with missing /dev entries.

----------

## kimchi_sg

But I already have udev-051.  :Sad: 

```
kimchi@dev ~ $ emerge -pv udev

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] sys-fs/udev-051  (-selinux) -static 0 kB 

Total size of downloads: 0 k
```

----------

## robfantini

well I'm not sure exactally what fixed my problem.  must of been a combination of a few things.

I've  RC_DEVICE_TARBALL="yes"   

If you want I could send a  dev.tar of /dev ..

----------

## kimchi_sg

The strange thing is that right in the first boot after the install, there were lots more device files in /dev/ . And hdc was one of them!   :Shocked: 

But when I tried to mount /mnt/cdrom, it gave me errors: if I defined /dev/cdroms/cdrom0 as the device to mount in /etc/fstab , I got "file not found"; when I changed the device to /dev/hdc , I got the error

```
hdc is not a valid block device
```

  :Rolling Eyes: 

That was with

```
RC_DEVICES="auto"

RC_DEVICE_TARBALL="yes"
```

in /etc/conf.d/rc, and sadly, even the hdc device disappeared after I changed to RC_DEVICES="udev". I have not been able to get the device back.

----------

## robfantini

did you try booting devfs instead of udev ?

----------

## kimchi_sg

No. I use udev right from the start. I've installed Gentoo this way about 5 times already, and this is the first time this problem pops up. Strange...  :Rolling Eyes: 

----------

## lytenyn

I had this problem once and all I forgot was to load the cdrom-support, try: 

```
 modprobe cdrom 
```

(but as you use ide-scsi (what for?), perhaps you need another module)

udev will automagically create the device nodes, once you have the corresponding module loaded.

----------

## robfantini

There is an  update  to UDEV which may help. 

 [ udev-052 ]

It includes a new /etc/udev/scripts/cdsymlinks.sh  , which may solve the problem.

In case you don't already have this set,  add this to /etc/portage/package.keywords:

 sys-fs/udev                         ~x86

----------

## toon

Hi, you probably still have something like this in your kernel arguments:

```
hdc=ide-scsi
```

Take it out and reboot.

That should solve your problem, I hope.   :Wink: 

Regards,

Toon.

----------

