LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   how to determine required kernel modules (https://www.linuxquestions.org/questions/slackware-installation-40/how-to-determine-required-kernel-modules-4175514748/)

slugman 08-13-2014 07:48 PM

how to determine required kernel modules
 
I gave up on setting up my Poweredge 2850 on 64 bit due to PSU issues, and am setting up the Poweredge750 in the meantime.

I setup my system, which has two identical 40Gb SATA's w/ 2 R0 arrays in mdadm, and /boot w/ R1. (I finally discovered why my old G3 ml350 did not boot correctly, lilo requires v 0.90 metadata).

My question is: in the faq it reccomends the use of generic. This is news to me--in the past if I wasn't running huge I would simply compile a long-term-stable candidate. For the purposes of making an initrd, you need to know any modules not in the kernel which you need to provide for the initrd.

Is there a correct method of doing this? TLDP mentions:

"You can see what modules are already loaded into the kernel by running lsmod, which gets its information by reading the file /proc/modules."

I'm still in setup though, which is using hugesmps.

During my testing days I would run:

lspci -vvv | grep modules

and then I'd make an initrd out of all the modules listed.

Upon inspecting /proc/modules and the above output, I do notice there are differences.

Is there a, "correct way," to derive this information? Now that I think about it, I don't want to make an initrd with redundant modules that are already in the kernel.

In all honesty, I'd like to compile a custom kernel with the modules my system requires in lieu of using generic, which is what brough about this post.

Thanks.

- Diego

- ftp://ftp.slackware.com/pub/slackwar...EADME_RAID.TXT
- http://www.tldp.org/LDP/lkmpg/2.6/html/x44.html

Ztcoracat 08-13-2014 10:08 PM

Hi:

I'm not a kernel module expert but I have a few ideas.

Developers use this page. Maybe it will help you.

To build external modules, you must have a prebuilt kernel available
that contains the configuration and header files used in the build.

https://www.kernel.org/doc/Documenta...ld/modules.txt

Finding out what modules that do not come with the kernel seem to be hard to find.(what I have found so far)

To change the drivers that are built into the kernel I think you would have to re-configure the kernel.
Use insmod and modprobe to load modules that you do need.
https://wiki.archlinux.org/index.php/kernel_modules

It might be the long way around but perhaps by reading the changelogs of older stable kernels compared to the top 3 kernels or so it might reveal what is not included.

slugman 08-13-2014 10:26 PM

thanks ztcorcat for the input.

You know, your post jogged my memory. I think the correct way is to run a search against .config. However, I think the only to really know for sure which keyword corresponds to which module/driver is by running a search in make menuconfig.

- Diego

Ztcoracat 08-13-2014 10:35 PM

Quote:

Originally Posted by slugman (Post 5220772)
thanks ztcorcat for the input.

You know, your post jogged my memory. I think the correct way is to run a search against .config. However, I think the only to really know for sure which keyword corresponds to which module/driver is by running a search in make menuconfig.

- Diego

Your Welcome-

Always glad to help.

Your right, with menuconfig you should be able to go through the menu and change the options you want.
Here's a list of configuration tools on this Gentoo page.

https://wiki.gentoo.org/wiki/Kernel/Configuration

slugman 08-13-2014 11:27 PM

I'm going to try and perl a way to automajically do this.

Didier Spaier 08-14-2014 01:52 AM

As root, run:
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -h
Quote:

I'd like to compile a custom kernel with the modules my system requires
You can "make oldconfig" followed by "make localmodconfig". Be aware that if you miss a module (e.g. for a removable device that was not plugged in at time of running "make localmodconfig") you'll have to do another compilation.

slugman 08-14-2014 11:42 AM

Awesome--thank you Didier. Yet again, you saved me from re-inventing the wheel.


All times are GMT -5. The time now is 10:58 PM.