Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ok. I just want to make sure I've got this straight. I've kinda been hanging my head in shame. I've used linux for about 5 years now, and I just now made some sense out of the /etc/modprobe and how it relates to the kernel. (Don't we all have those unexplored basic areas?) Don't get me wrong, I understand that you have to put modules you want loaded in there. Here's what I think I've properly learned. Feel free to expand upon if you wish.
The kernel makes a call to a numeric reference. Say, device 80, 0. Then if its built into the kernel, the device is loaded as configured, automatically. If not - /etc/modprobe or /etc/modules.conf, depending on your kernel version is read for an alias to that device. From that it detemines the device driver to load. The device driver with its node number, 80, 0, is then used. So the userspace program for ex, would link to the device file or refernce, say /dev/video, which links to the module that is loaded by the kernel, say nv.ko which was figured out by /etc/modprobe, if it was a module. The module then interprets calls from the userspace program and interprets them into device calls, and vice-versa. Dependencies for the module were sorted out by /lib/modules/kernelversion/moddepwhatever. The mod dep file in /lib/modules/* also loaded any prior requirements for that module to be loaded. Phew. Have I got it, or am I off? I know its not a requirement to understand this, but the lower level I understand, the more I can manipulate what is really going on in my computer.
yep you got it
the only thing that sticks out at me is:
basically user space programs only write directly to character devices
(devices that read write data in a serial stream like a sound card for instance)
block devices -- like a hard drive for instance reads write data in fixed size blocks and provide random access to those blocks -- only the kernel code that implements the filesystem itself can write to that.
user space programms use the a library function or kernel system calls directly request the kernel to do that stuff for them. Whle it is possible to write directly to a hard drive anyone can tell you who has written a filesystem it's a very easy way to destroy the hard drive and have to through it in the trash.