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.
My stock kernel is about 85MB and using "make menuconfig" I managed to deselect a bunch of options and I got it down to 34MB. But there is still a large number of options that I have no clue if they are really needed or not. menuconfig explains a little about each option but not really enough to really make a good decision for us non-tech people.
I am running a home Desktop computer with nothing special: GNOME, speakers, printer, etc. so I do not need all the techy extra stuff included in the kernel.
I was googleing but did not find any tutorial on how to achieve a fast/efficient kernel. Any good tuts around? Thanks.
Try the make xconfig or make gconfig [whichever is there] and you can find description about each option. Also use the lzma compression for smaller file size.
The best thing to do is leave most drivers as modules and only compile into the kernel anything that is absolutely necessary for accessing the HDD and filesystem ... your HDD controller driver and your filesystem driver should be built-in, the rest leave as modules.
Are you sure about those figures? 85 and 34 MB? Slackware's kernels are 4.8 MiB for the huge, and 2.5 MiB for the generic. I doubt if Debian's stock kernel is that much bigger.
Are you sure about those figures? 85 and 34 MB? Slackware's kernels are 4.8 MiB for the huge, and 2.5 MiB for the generic. I doubt if Debian's stock kernel is that much bigger.
Wow ..! those stock kernels are huge. I have 3.5 mb kernel, and I think that I can still do some more trimming. I use several different variants. I use the git sources, gentoo-sources, and now testing the zen-sources. I have to say with the timer enhancements, and the BFS patch, I have to say Zen-sources is fast. I boot very quickly.
As a suggestion I would encourage you check out this guy's site, he frequents the Gentoo forums, Pappy's Kernel seeds. I learned alot from his custom .config files. Its a trial and error process. At first I had to compile several times to get it right. I kept my stock kernel until I could stabilize my new kernel.
That package includes every existing driver under the sun, not just the kernel image. When most people talk about the size of the kernel, they are talking about the size of the compressed linux kernel image (usually vmlinuz), not taking into account any external driver.
You can see the size of the kernel image using ls -l on /boot
About stripping down the kernel, it will be hit and miss, new options get added with every new minor release, other change, other go away, the linux kernel is a very dynamic beast. There are a few things that are really critical, like the hd controller and fs drivers, which needs to be accessible before anything else can be reached. There are lots of drivers in the kernel, if you want to really strip it down that much you are going to need lots of patience, I'd start with sensors, network and sound, there are quite a few there and you only need one a few.
But, as someone said, unless you are really constrained in space, it's not much of a deal. Your system will perform the same.
The best thing to do is leave most drivers as modules and only compile into the kernel anything that is absolutely necessary for accessing the HDD and filesystem ... your HDD controller driver and your filesystem driver should be built-in, the rest leave as modules.
Those also can be compiled as modules and loaded from initrd.
I think, the whole (or at least most important) point of initrd is to allow root filesystem driver and HDD driver be modules
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.