SlackwareThis Forum is for the discussion of Slackware Linux.
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've seen some posts on here with people running stripped-down kernels, so I thought I'd ask a few questions:
1) I want to compile in (to the kernel) the modules my computer is currently using to optimize performance, as well as get rid of the initrd. I can view the list of all the modules I'm using with lsmod, but how do I find them all in the kernel configuration menu? Do I just look them up in my .config and set them =y, or is there a better way?
2) If I only compile in the modules my computer is currently using and don't compile any other modules, how would I deal with USB devices? Is there a configuration option to support all USB devices so I don't have to recompile the kernel every time I plugin a new USB device? Or are all USB devices covered by compiling in the EHCI and OHCI drivers? Is firewire the same?
3) AMD Phenom 2 x4 940: is this just k8 on the processor family menu? It seems like there should be a k10 option, but I didn't see it anywhere.
1. You could do that, though I have always just walked through and enabled them in the menus. Your machine probably isn't actually using more than say a dozen modules, the rest are either loaded through various services or "just in case". It really doesn't take much time to work your way through what you do and do not need.
2. There is no blanket module for all USB devices, each one individually (with the exception of standardized devices like mass storage) has it's own module. You would need to enable any of those on top of the core USB support. You could enable them all as loadable modules and simply leave them unloaded until you need them, but a little logic goes a long way here. How many types of USB devices do you really think you will be plugging in? The kernel has support for everything from LEGO bricks to a USB vibrator, you certainly aren't going to be using them all (unless you are planning one hell of a party). Just enabling the things you are likely to use should be enough, and in the unlikely event you need something else you only need to build the module real quick and load it up, you wouldn't need to replace the kernel or even reboot.
Not sure about 3 though, don't have any (modern) AMD hardware.
1. Can you give me a good link on doing that? I've been looking through this: http://www.gentoo.org/doc/en/kernel-config.xml, but they don't cover everything. If I post my lsmod output could you tell me which modules I'm actually using?
2. Crazy that they have a USB vibrator driver! Anyway, I'll probably be using various iPods, a Logitech Harmony remote (I don't know if they've integrated the driver into the kernel yet), a Microsoft USB transceiver, and various thumb drives. I guess I have some research to do...
Maybe a better way to do this would be to compile in the modules from 1, but use Pat's generic config file so I create modules for any other possible device I could use. Would this degrade the performance much? At least I wouldn't be using an initrd.
1) I want to compile in (to the kernel) the modules my computer is currently using to optimize performance, as well as get rid of the initrd.
Optimize performance ?. Hmmmm - dunno about that. There are other options that will affect performance, but merely removing modules ain't likely to.
Getting rid of the initrd is o.k., but my major beef with standard distro builds is the recompile time for all those modules.
There are scripts around that find the applicable option for all your currently loaded modules. I've always just gone through the menu - I always find something else I want to turn on and test; hacking or group scheduler or auditing or something ...
Do I just look them up in my .config and set them =y, or is there a better way?
You would be better off using 'make menuconfig' and selecting that way. Sometimes enabling an option will also autoenable another and editing .config by hand probably won't pick that up (afaik).
@syg00: My presumption is not loading any modules (at all) is faster. Do you have a link for that script to find all currently loaded modules? That would be nice.
you can do lsmod to find the modules you are currently using. also there is kernel config file that comes with the stock kernels. look in /boot. you can use this with "make menuconfig" when configuring the kernel so that all of the options from the stock kernel will be the same. then you can just add and remove what you like.
Thanks, but lsmod doesn't show me where in the kernel menus the driver is located. Plus I have to plugin all of my USB devices and find where everything is with lsusb...
Not loading any modules = huge kernel? With the new kernels there is the
Code:
make localmodconfig
option that will strip your kernel of all the modules you aren't currently using. The trick there will be to make sure you have EVERYTHING that might be plugged in via USB at some point connected and powered on at the time you issue the command. There is a thread on LQ with a good discussion on this. I would read that thread prior to building your kernel with that option. Even after that it's a good idea (read that as almost essential) to THEN double check everything with:
Code:
make gconfig
As was stated above, this won't neccessarily have an impact on performance. The processor type and features section when looking at
Code:
make gconfig
will be the most likely place to improve your performance by localizing it to your specific machine, changing preemption, etc. Compiling in support for your / partition's filesystem will likely allow you to do away with the need for an initrd. It's all that I need personally.
Google "alien kernel" to find Alien Bob's slackware kernel how-to. It's a good read and if you follow it, you won't be removing your old kernel, which is handy since stripping a kernel is a good way to have a non-bootable kernel.
Thanks for that. I'll have to check if the 2.6.31 kernel has this option, as I'm trying to use Nvidia's propietary video driver and I've seen posts that it won't work with the newest.
I read up on Alien Bob's kernel guide a while back--I'll have to check if he's updated it.
The 190.53 nvidia driver will work up to 2.6.32. With the patch it will work on 2.6.33. There was a recalled Nvidia driver (I'm actually running it now, and so far so good) that builds fine against the 2.6.33 kernel. I ran 190.53 for a month with the 2.6.33-rc5 kernel (I'm still running that kernel) It works fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.