LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   how are /dev files created? (https://www.linuxquestions.org/questions/linux-hardware-18/how-are-dev-files-created-104734/)

jkobrien 10-16-2003 11:30 AM

how are /dev files created?
 
Hi,

I'm running Slack 9.1 with a 2.4.22 based kernel, which I recompiled (possibly accounting for the following questions:) though everything else seems to work fine).

Two minor problems have me wondering about device files. How and when are these created? Is it as each device is detected during boot up? How can this process be modified? (alright, meddled with!)

For instance, if I reboot without a disk in my zip drive, I can't mount the disk because there is no /dev/hdd4 file. But if there is a disk in the drive when I boot, the /dev/hdd4 file is created and everything is fine.

A second example, the file /dev/sound/dsp has permissions crw-------, which causes an error message when starting X. This is easily remedied with chmod, but when I reboot it's gone back to crw-------.

Probably these are unrelated problems (presumably some configuration file somewhere) but I'd be glad of any pointers on /dev files or links to further reading.

Thanks in advance,

John

acid_kewpie 10-16-2003 12:54 PM

these entries are most likely to be controlled on your system by devfs, which over the last couple of years has replaced the former flat file format (what a lot of F's!) which actually was an exhaustive list of device entires, which sucked ass. devfsd monitors the system and creates the devices at boot time or whenever a new device is detected on the system. like when i plug a usb digital camera in to the system, it will automatically create entries for it, /dev/sda and /dev/sda1. i'd assume that your zip drive is not fancy enough to be able to be recognised. is that hotplug? not sure... anyway that's what controls it, and you can control it by fiddling with /etc/devfsd.conf and reading the manpage of course

acid_kewpie 10-16-2003 12:56 PM

your sound issue is quite possibly nothign to do with this though, and instead down to the PAM security modules. look at /etc/security/console.perms.

jkobrien 10-17-2003 06:42 AM

Many thanks for the helpful responses. It seems that the zip problem is something I'll have to live with until the 2.6 kernel is released according to this guy but I was able to take care of the /dev/sound/dsp problem and learned something at the same time!

John


All times are GMT -5. The time now is 11:58 PM.