# how to create a /dev file?!

## ronald_cn

my cdrom is CD RW PIO 4 with IDE.but it can't be found at boot time.and how can i create it under dev directory?

i tried....see below

#mknod /dev/optcd0 b 17 0

#chmod 600 /dev/optcd0

#ln -s /dev/optcd0 /dev/cdrom

but the error message was

#mount /mnt/cdrom

-bash:/dev/cdrom is not a valid block device.

----------

## pilla

Are you using devfs? If you are, you probably forgot to compile the proper hardware support for your disk.

----------

## phunkphorce

I guess that if it can't be detected at boot time, it won't exist for the system, so there is no point in creating any /dev entry because 

a) Even if you succeeded in creating the /dev entry manually, if the cd is not detected, it is as it was not there.

b) If you're using devfs, /dev entries are generated automatically and next time you boot, the one you created would be gone.

I'd suggest that you have a look at your kernel config. Most likely you forgot to include some important module or you chose the wrong one for your cd-rom, and check as well the output of the dmesg command to see what's the error given by the kernel.

----------

## ronald_cn

i have read the Gentoo FAQ,and compilied DEVs in the kernel.and my cdrom is working.it has another name "hdc",and then i 

#ln -s /dev/hdc /dev/cdrom

#mount /mnt/cdrom

its work!

----------

## ronald_cn

hehe...thank you very much!!!!

----------

## phunkphorce

 *ronald_cn wrote:*   

> hehe...thank you very much!!!!

 

You're welcome   :Cool: 

----------

