# Missing cdroms dir in /dev

## snorkel

I just got gentoo booting and I tried to mount my cdrom with

mount /dev/cdroms/cdrom0 /mnt/cdrom

and it fails , so took a look in /dev and there is no cdrom dir or cdrom0

How do I know what device is my cdrom?

Thanks,

Tony

----------

## pjp

Moved from Installing Gentoo.

Could you post your cdrom section from /etc/devfsd.conf?  Something like:

```
# Create /dev/cdrom for the first cdrom drive

LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom

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

UNREGISTER      ^cdroms/cdrom0$   CFUNCTION GLOBAL unlink cdrom
```

----------

## DuF

Check if you have something like that /dev/scsi/host0/bus0/target0/lun0/cd (it's my configuration, it's just an exemple) ?

If you have an ide cdrom and if you use lilo you need to indicate hdx=ide-scsi in lilo.conf.

In your kernel you need to have support for scsi emulation also and other stuffs, look at the gentoo install documentation, all you is mentionned.

Or maybe you need to update your /etc/devfsd.conf.

----------

## happy

For reference here is my information from /dev/devfsd.conf

# Create /dev/cdrom for the first cdrom drive

LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom

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

UNREGISTER      ^cdroms/cdrom0$   CFUNCTION GLOBAL unlink cdrom

Further, here is some misc info from my system:

msp root # uname -a

Linux msp 2.4.19-xfs-r2 #1 Tue Jan 14 15:14:24 PST 2003 i686 Intel(R) Pentium(R) 4 CPU 1400MHz GenuineIntel GNU/Linux

msp root # cat /etc/fstab

# /etc/fstab: static file system information.

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.10 2002/11/18 19:39:22 azarah Exp $

#...

# <fs>                  <mountpoint>    <type>          <opts>                  

#...

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

msp root # lsmod

Module                  Size  Used by    Tainted: PF

sg                     24124   0  (autoclean) (unused)

sd_mod                 10380   0  (autoclean) (unused)

vmnet                  20576   6

vmmon                  19892   0

ext3                   56512   1  (autoclean)

jbd                    35464   1  (autoclean) [ext3]

aic7xxx               109044   0  (unused)

scsi_mod               80472   3  [sg sd_mod aic7xxx]

3c59x                  24240   1

My I am using a cd-rw as my cdrom.

My kernel has IDE/ATAPI CDROM set to modules.

My kernel has all the appropriate SCSI set to modules too.

I can't think of anything else.

 :Confused: 

----------

## Caffeine

I'm having the same problem! My devfsd.conf is the same as everyone elses.

/dev/scsi is empty, as is /dev/cdroms. I have a ide CDROM/DVD player.

I have a /proc/sys/dev/cdrom/ directory.  

Any ideas?

----------

## discostu

I am also having the same problem. I just got my ide cdrom working again and I was going to make sure my dvdrom was working after I rebooted I could no longer mount my cdrom. 

```
# Create /dev/cdrom for the first cdrom drive

LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom

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

UNREGISTER      ^cdroms/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        ^cdroms/cdrom1$  CFUNCTION GLOBAL mksymlink ${devpath} dvd

UNREGISTER      ^cdroms/cdrom1$  CFUNCTION GLOBAL unlink dvd
```

```
$ lsmod

Module                  Size  Used by    Tainted: P

sg                     25324   0  (autoclean) (unused)

ide-cd                 27272   0  (autoclean)

sr_mod                 13400   0  (autoclean) (unused)

cdrom                  26048   0  (autoclean) [ide-cd sr_mod]

usb-storage            26252   0  (unused)

scsi_mod               51780   2  [sg sr_mod usb-storage]

usb-uhci               20908   0  (unused)

usbcore                61344   1  [usb-storage usb-uhci]

NVdriver             1067360  10
```

```
ls -l /dev/cdrom

lr-xr-xr-x    1 root     root           13 Jan 23 00:47 /dev/cdrom -> cdroms/cdrom0

$ ls -l /dev/cdroms

total 0

$ ls -l /dev/ide/host0/bus0/target0/lun0/

disc   part1  part2  part5  part6  part7  part8

$ ls -l /dev/ide/host0/bus0/target0/lun0/

total 0

brw-------    1 root     root       3,   0 Dec 31  1969 disc

brw-------    1 root     root       3,   1 Dec 31  1969 part1

brw-------    1 root     root       3,   2 Dec 31  1969 part2

brw-------    1 root     root       3,   5 Dec 31  1969 part5

brw-------    1 root     root       3,   6 Dec 31  1969 part6

brw-------    1 root     root       3,   7 Dec 31  1969 part7

brw-------    1 root     root       3,   8 Dec 31  1969 part8
```

Please help!

----------

## Caffeine

I fixed it by recompiling my kernel after removing all scsi stuff. Kinda weird.

----------

## itkovian

Well, I'm experiencing the same problems. I've got my kernel compiled with IDE cdrom as a module. /etc/devfsd.conf shows the lines for the cdrom stuff as shown various times above.

the /etc/fstab shows the line:

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

when trying to mount /mnt/cdrom I get:

fiddler root # mount /mnt/cdrom

mount: special device /dev/cdroms/cdrom0 does not exist

and when I try to insert the module manually I get:

fiddler root # modprobe cdrom

/lib/modules/2.4.19-gentoo-r10/kernel/drivers/cdrom/cdrom.o: unresolved symbol devfs_dealloc_unique_number_Re17e9c26

/lib/modules/2.4.19-gentoo-r10/kernel/drivers/cdrom/cdrom.o: unresolved symbol devfs_alloc_unique_number_Raeb202b0

/lib/modules/2.4.19-gentoo-r10/kernel/drivers/cdrom/cdrom.o: insmod /lib/modules/2.4.19-gentoo-r10/kernel/drivers/cdrom/cdrom.o failed

/lib/modules/2.4.19-gentoo-r10/kernel/drivers/cdrom/cdrom.o: insmod cdrom failed

I haven't tried  compiling the cd stuff into the kernel, since I'd rather have it as a module. The devfs thingie has been compiled into the kernel.

I don't have a /proc/sys/dev/cdrom* , nor a /dev/cdrom*

Anybody any ideas? Thx.

----------

## itkovian

Last night I recompiled the kernel, with cdrom support into it, instead of as a module and all of a sudden everything seems to work fine.

I now have /dev/cdroms/ and I can mount a cd a non-root user, as specified by my fstab. Neat. Now, I still can't figure out where the module stuff went wrong.

----------

## Lars

Hi,

'til now I had the same problems, can't mount /mnt/cdrom but now it's fixed, here what I have done:

I have a ide CDROM/DVD player.

I have done:

modprobe ide-scsi

(want' to use cdrdao to read cd's  :Wink: 

lsmod now shows, that the following modules are added.

nls_iso8859-1

ide-scsi

ide-cd

sr_mod (SCSI CDROM)

cdrom

isofs

now mount /mnt/cdrom is possible for me.

/etc/devfsd.conf is the same as discostu has.

in /etc/fstab

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

in /boot/grub/grub.conf I've also added the follows to the kernel parameters

hdb=ide-scsi

Kernel is 2.4.20 vanilla is someone is interest in.

hope that helps

Lars

----------

## ggelln

THANKS!

That helped me in a big way!

Gabriel

----------

