Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm looking at creating a completely modular system. This includes modules for disk controllers, filesystems, etc. My goal is to have a system that can take any sort of hardware changes in stride -- and it seems like an interesting project.
Anyway, I'm looking for anyone who has done something similar, and anyone who has any input on this. As I figure it, I'll need an initrd with all the modules on it. On boot, coldplugging will be used to load necessary modules and a simple hotplug script can be used until the system boots. Hopefully this will take care of loading things like IDE and SCSI drivers.
My biggest issue is whether modules will load on their own... For example, the real time clock module doesn't ever seem to get loaded unless I explicitly load it; I really want complete automation, meaning no doing anything by hand.. But I'm not sure this is possible.
Along those same lines, when I try to mount an xfs partition (without specifying the fstype) in my initrd image, modprobe is not called. I must use -t xfs in order for it to be called. My initrd is basically just busybox.. So is this perhaps a busybox issue, or is it deeper than that?
So the root of my question, I guess, is: Is it possible to have *completely* automated module loading? I don't ever want to have to type modprobe and I don't ever want to have to edit /etc/modules.conf. I want the advantages of having everything compiled in combined with the advantages of modules. I also want the absolute fewest number of things compiled into the kernel as possible. ext2 is a must, but no other filesystems, no disk controllers, etc.
What you want is impossible, the kernel isn't designed to load modules in the fashion you want. When you type 'mount /dev/blah /mnt/blah' it lets all of the registered filesystems read the device to decide which it belongs to, but it won't load any unloaded filesystem drivers unless you implicitly tell it to, as you've noticed.
You can have a list of modules to load on bootup (/etc/modules on Debian) but the kernel only does some very basic autoloading.
What you want is impossible, the kernel isn't designed to load modules in the fashion you want. When you type 'mount /dev/blah /mnt/blah' it lets all of the registered filesystems read the device to decide which it belongs to, but it won't load any unloaded filesystem drivers unless you implicitly tell it to, as you've noticed.
Hi Noth, thanks for replying.
This hasn't been my experience -- when I try mounting a filesystem in a normal setting (no initrd), if the module isn't loaded, it gets automatically loaded. After poking through util-linux's mount source, I figured out why. It has code to probe the filesystem type if none is specified. Busybox's mount doesn't do this. Busybox mount does, apparently, support /etc/filesystems, so that's a viable, if less than optimal, solution. Maybe I'll code up a tiny version of util-linux's detection and try and get it into busybox.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.