devfs and bootscripts...

Plasmatic plasmatic at
Fri Oct 5 01:27:20 PDT 2001

10/5/01 1:26:53 AM, Ian Molton <imolton at> wrote:

>On stardate Thu, 4 Oct 2001 18:23:31 -0400
>Sergey began the full scale invasion of earth with the following words:
>> Bad news for you ... You should stop using devfsd immediately - kmod
>> starts
>> modprobe and loaded device itself registers device nodes ...
>> Sorry.
>Since when? why doesnt my sg driver start when I access
>/dev/scsi/host0/bus0/target0/lun0/generic ?
>Unsubscribe: send email to listar at
>and put 'unsubscribe blfs-support' in the subject header of the message

That's why you need devfsd :)  With a regular device file, it already exists, and when it's accessed kmod kicks in and modprobe's for you.  
However, with devfs the file doesn't yet exist.  It's up to the device driver to create the file, and since the device driver isn't loaded, there is no 
file; a classic chicken and egg circumstance.  Where devfsd comes in is that it watches for this file access.  When ANY file in /dev is 
accessed, devfsd will check it's own config file for what to do, be it loading modules, making links, or running programs.  With devfsd loaded, 
your sg driver would start automatically.  THIS is what devfsd is about :)  Of course, not everyone needs this, but I sure find it handy.  I use it all 
the time for my sound card (although I'll have to set that one back up again ;)  When I try to access /dev/dsp, modprobe runs on my driver, 
loading up 4 or 5 others, then creates the device and voila.  When I stop using it (my MP3 is done playing) then the file disappears and the 
drivers are unloaded, with very little decrease in speed.  This saves memory and cleans up my /dev very nicely.

Of course, this is only half of what devfsd does, but it's probably the nicest, and the best reason to use it.  Again, your mileage may vary.



Note: The above are the thoughts, feelings, and reasonings of the author.  There may be errors or illogical reasoning involved.  If you happen to 
find any such errors, please correct them politely instead of flaming.  The author doesn't own any asbestos and would prefer to keep it that way 

Unsubscribe: send email to listar at
and put 'unsubscribe blfs-support' in the subject header of the message

More information about the blfs-support mailing list