View previous topic :: View next topic |
Author |
Message |
Honeypuck n00b
Joined: 25 Apr 2014 Posts: 2 Location: Berlin
|
Posted: Sat Apr 26, 2014 8:41 pm Post subject: Which modules to load automatically |
|
|
Hi all,
I am new to Gentoo Linux (used Ubuntu, Debian and Sabayon before though) and this is my first install. Following the handbook I am somewhat stuck at the point where I have to manually put kernel modules into /etc/conf.d/modules after having compiled a kernel via the genkernel tool.
Put simply, I am not sure which modules I need for a functioning system. Using the find command "find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko' | less" gives me an impressive of modules that have been compiled. But except for some obviously hardware related modules I am pretty sure I need according to lspci & hwinfo, I do not know which modules a required for Gentoo to run on my machine.
I search around in the forum, but it seems everybody knows what to do at that point except for me, so please bear with me. Maybe someone could give me a hint where to look for an answer or tell me where I'm wrong.
Thanks |
|
Back to top |
|
|
comprookie2000 Retired Dev
Joined: 25 Jul 2004 Posts: 925 Location: Sun City Center, Florida
|
Posted: Sat Apr 26, 2014 9:03 pm Post subject: |
|
|
Don't put anything in there for now, I never have needed it in a few years. They should get loaded by Udev. If later on you find out something is not working because the module did not get loaded you can set this up but IMHO it won't be needed. _________________ http://dev.gentoo.org/~dabbott/ |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21633
|
Posted: Sat Apr 26, 2014 9:09 pm Post subject: |
|
|
If you build your own kernel, then you have the luxury of building exactly what you need and no more. As part of that, if you plan to always use a particular kernel feature, you can include it in the kernel instead of loading it as a module. Some people even use kernels with no modules. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sat Apr 26, 2014 10:10 pm Post subject: |
|
|
Honeypuck ...
to follow on from what comprookie2000 and Hu have said, I only have one module (acpi_cpufreq) set in /etc/conf.d/modules, but as Hu pointed out most of what is needed to boot and for general usage is best to be builtin. I don't use udev but modules are loaded in some cases (like mounting a vfat filesystem, or running iptables) automatically, for others I have them loaded at certain time (ie, via a preup() function in /etc/conf.d/net) and others as I need them (efivars, B.A.T.M.A.N, and others). So, the best stategy is, as comprookie2000 suggested, do nothing :) ... just make sure the basic things (sata controller, rootfs filesystem, etc) are builtin in and not modules.
best ... khay |
|
Back to top |
|
|
Honeypuck n00b
Joined: 25 Apr 2014 Posts: 2 Location: Berlin
|
Posted: Sat Apr 26, 2014 10:30 pm Post subject: |
|
|
Thanks for the quick responses. Frankly, the handbook didn't make it totally clear how to decide which modules are needed if any at all. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Sun Apr 27, 2014 5:52 am Post subject: |
|
|
khayyam wrote: | like mounting a vfat filesystem, or running iptables) automatically |
These are just exceptions which often are not loaded automatically when you need them: If you have no other vfat partition but insert a corresponding stick, the mount command willl not automatically detect the vfat filesystem if you have not loaded the module before manually.
With iptables it is even worse: If you are running a script to setup iptables which does not e.g. "modprobe ip_conntrack", the iptables commands will fail with strange errors. Similarly for encryption modules and cryptsetup.
However, as mentioned, these are exceptions. |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Apr 27, 2014 11:48 am Post subject: |
|
|
mv wrote: | khayyam wrote: | like mounting a vfat filesystem, or running iptables) automatically |
These are just exceptions which often are not loaded automatically when you need them: If you have no other vfat partition but insert a corresponding stick, the mount command willl not automatically detect the vfat filesystem if you have not loaded the module before manually. |
mv ... you mean when using udev? Here (using mdev) fvat is loaded, but this can probably be explained by the fact that those devices with fvat are listed in fstab ... so perhaps 'automatically' isn't actually the case.
mv wrote: | With iptables it is even worse: If you are running a script to setup iptables which does not e.g. "modprobe ip_conntrack", the iptables commands will fail with strange errors. Similarly for encryption modules and cryptsetup. However, as mentioned, these are exceptions. |
Yes, the script does infact do that, my bad. I guess the point I was making is that in my use case having to manually load modules is only ever needed on occassions when I'm using something that generally requires manual intervention (afaik, udev doesn't autoload B.A.T.M.A.N, or efivars, if something happens to use/need them).
best ... khay |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Mon Apr 28, 2014 11:22 am Post subject: |
|
|
khayyam wrote: | so perhaps 'automatically' isn't actually the case |
I guess "mount -a" loads the module if it is in fstab. However, if the format is "auto" msdos/vfat partitions are not recognized if the module is not loaded before. Which makes sense: You do not load systematically all filesystem drivers only because some might be used... |
|
Back to top |
|
|
|