LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Why all the fuss about Kernels? (https://www.linuxquestions.org/questions/slackware-14/why-all-the-fuss-about-kernels-60847/)

Fredstickman 05-20-2003 01:50 PM

Why all the fuss about Kernels?
 
Perhaps it's my pending status as a newbie or perhaps my PC runs slack 9.0 all too well, but I simply don't understand the need to compile a new kernel. I'm using the default one from install (bare.i, I believe) and everything works perfectly.

Why is everyone in a hurry to compile a new kernel? I know what they do, of course, but I simply don't understand why everybody wants a new one, nor the advantages of a new one. I've scoured the net looking for the purpose, and the only reason I've found so far is "Just to say I compiled my own kernel".

Note that I am a newbie, and although I thought I knew everything after mastering the windows system, I tried slack and have no idea what I'm doing. I'm just reading tons of information about slack, and bragging to all my friends how I have linux and they don't.

tcaptain 05-20-2003 01:59 PM

Well for most standard uses, the pre-compiled kernel works just fine right off the install. There usually isn't a need to re-compile your kernel.

Now, there are many good reasons to do so however...the two that apply to me are:

1) I use linux on older machines

- Pre-compiled kernels are usually loaded with every option conceivable, although some are better than others...this makes for a big resource hog that's sitting in your memory. On my older laptop I re-compile the kernel and remove everything I don't need (like Ham radio support...or MFM drive support or whatever..). This does make for a small, but nice performance boost. Even on a brand new powerful machine, a lean kernel makes a difference.

and

2) sometimes special modules need to be compiled in...

- sometimes the stock kernel doesn't have the options you need for your hardware, like maybe wireless options for your card etc...


I've run into 1) mostly....

busbarn 05-20-2003 02:08 PM

I agree. In my case, I needed to recompile the kernel to get my zip drive working on gentoo. I need to make the usb mass storage module as well as load the right uhci module. Overall, it's one more thing you can do to tweak your system to be exactly the way you want it.

Plus it gives you the right to say, "I recompiled my own kernel...and survived."

killi 05-20-2003 02:29 PM

and if you want your system to run more smoothly and work
much better!!!

in my case i had to recompile because i got an error about
i810 chipset and i recompiled to fix it

cheers

erling

tcaptain 05-20-2003 02:37 PM

Keep in mind something else...

When you are using a pre-compiled kernel, it was compiled on another machine and its made to work with the lowest common denominator.

When you compile a kernel for yourself, its compiled on your exact machine...so the binary code instruction is essentially optimized for your CPU. Thats why even if you just re-compile your kernel and keep all the same options, its still going to be more efficient...

This is why a lot of people rave about how fast and performant the Gentoo distro is....because everything is compiled on your machine FOR your machine.

docGonzo2000 05-20-2003 05:55 PM

Also, if you have more that ~990 megs of memory, you have to enable a kernel option for high memory. There are a few other things as well...I usually tend to leave a lot of modules for my kernel. You never know what hardware you might come across.

Also, you can tell the kernel what kind of processor you have so that it works specifically for your architecture, including any special CPU instruction sets.

Aussie 05-20-2003 09:29 PM

The precompiled kernels are 'generic' kernels built to run on as many machines as users may want to install on.
My custom kernels are built for the hardware they run on, and for the job that I want them to do.

fireftr223 05-20-2003 10:36 PM

I recompile for sound. Yep, that's right..I run old hardware and it is a necessary evil, but I rather like hearing noise from my system from time to time.

Btw, if anyone would like to send me some winning lotttery tickets to get some decent hardware I won't turn you away ;)

saiz66 05-20-2003 10:44 PM

how hard is it to compile a kernel? i am a newbie and i don't know how to start compiling a kernel... i have seen the compiling kernel forum... and i was wondering where i can find help for compiling my kernel.

Solean 05-20-2003 10:57 PM

all you have to do is prepare, configure, the type

make dep;make clean;make bzImage;make;make install;make modules;make modules_install

saiz66 05-20-2003 11:53 PM

that seemed kind of vague... how can i make a kernel optimized for my system?... is there a kernel tutorial for a newbie like me? i am kind of intimitated by creating a kernel.. and could the kernel mess up my system?

nvn 05-21-2003 04:01 AM

Just don't worry...it's absolutely, totally easy. :cool: The steps of the compiling process are listed in numerous places and guides (for example, DaOne's guide here on LQ). When it comes to the configuration of the kernel...well, inevitably you have to know a little bit about your hardware and computers in general, but you don't have to be a 1337 h4Xx0r if that's what you think. :) If you configure it using menuconfig or xconfig, it's easy to get a grip of, and there's help for almost every option. I recommend you pre-edit lilo.conf and Makefile in the source before compiling, so to have a backup of the old kernel IF something should go wrong with the new one.

Oh, and in reply to the original question of the thread; I really can't see myself running a stock kernel. Well, maybe I would if it was optimized on a computer configured EXACTLY like mine, but...nah. I wouldn't. :) Having the power to configure the system according to your exact needs is one of the beauties with Linux. Use it. :)

kater 05-21-2003 09:13 AM

The tldp.org and slacwkare.com Kernel-Howto will help you.


All times are GMT -5. The time now is 06:16 PM.