Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Which modules to load automatically
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Honeypuck
n00b
n00b


Joined: 25 Apr 2014
Posts: 2
Location: Berlin

PostPosted: Sat Apr 26, 2014 8:41 pm    Post subject: Which modules to load automatically Reply with quote

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
View user's profile Send private message
comprookie2000
Developer
Developer


Joined: 25 Jul 2004
Posts: 906
Location: Pompano Beach, Florida

PostPosted: Sat Apr 26, 2014 9:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9168

PostPosted: Sat Apr 26, 2014 9:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2336

PostPosted: Sat Apr 26, 2014 10:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Honeypuck
n00b
n00b


Joined: 25 Apr 2014
Posts: 2
Location: Berlin

PostPosted: Sat Apr 26, 2014 10:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4348

PostPosted: Sun Apr 27, 2014 5:52 am    Post subject: Reply with quote

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
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2336

PostPosted: Sun Apr 27, 2014 11:48 am    Post subject: Reply with quote

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
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 4348

PostPosted: Mon Apr 28, 2014 11:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum