linux kernel -- how to/what's the point of tinkering?

supernova87a

Senior member
Dec 6, 2000
261
0
0
I've been using linux for about a year now, and I often see/hear people discussing modifying the kernel.

I'd like to know why you would want to do this? Can you give specific examples of things you can do by modifying the kernel?

Is modifying the kernel and recompiling a difficult/time consuming thing to do?

Thanks!
 

aspitzer

Member
Jul 9, 2001
187
0
0
cd /usr/src/linux

To see the different options you can enable

"make menuconfig" (text version)
or

"make xconfig" (X version)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
You can do everything from add/remove drivers, to applying 3rd party patches. There are some good patches out there right now that can help with speed, sorry no links off the top of my head :p
 

Heisenberg

Lifer
Dec 21, 2001
10,621
1
0
Another thing you can do is customize it for your hardware. By removing all the drivers you don't need, the kernel will use less memory and be faster.
 

EmperorRob

Senior member
Mar 12, 2001
968
0
0
  1. SCSI emulation for CD burners to work
  2. Support for your devices; most commonly ethernet or audio
  3. Enable support for iptables to configure a firewall/masquerade machine
Those are probably the 3 most common.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Is modifying the kernel and recompiling a difficult/time consuming thing to do?

If you're writing your own patches/drivers, yes.

If you're just applying other people's patches and recompiling, no. Also remember applying patches from untrusted source is just plain dumb, unless you have the knowledge to read the diff and make sure it doesn't do anything malicious.

There's currently patches that help speed (low-latenty, kernel-preempt, Rik van Riel's rmap VM), patches that fix the IDE layer and add support for 48-bit addressing (IDE drives over 130G currently aren't recognized properly by Linux because the patches aren't standard yet) and many other things. I currently run a kernel patched for the XFS filesystem from SGI because it's not standard yet. You should be able to find almost any of them by searching the lkml (Linux-kernel mailing list).

Another thing you can do is customize it for your hardware. By removing all the drivers you don't need, the kernel will use less memory and be faster.

I prefer to just build as much as possible as a module, that way you don't have loaded what you're not using and I don't have to recompile my kernel if a NIC dies and I have to swap in a different model.
 

BlackOmen

Senior member
Aug 23, 2001
526
0
0
The generic kernel included with a distro has support for various motherboard chipsets, agp drivers, and other drivers compiled in. A generic kernel may also have RAID or SCSI drivers built in, which many user do not need. By compiling your own, you can trim the fat; you compile in only the motherboard chipset support you need, only the agp driver you need. You can also optimize the kernel for a specific x86 processor. In short, if you feel up to it, do.

>>Is modifying the kernel and recompiling a difficult/time consuming thing to do?
Configuring the kernel need only be as difficult as you make it. If you know what you need going in, it will be a lot easier. The speed of your machine is what might make it time consuming. For a point of reference, I compile in about 20 minutes on a Duron 700.

And if you need help, post back and I'm sure you'll get answers.
 

Electrode

Diamond Member
May 4, 2001
6,063
2
81
Building new kernels is the only way to make your computer perform it's best.

Some distros come with superbloated kernels that have support for a ton of hardware you've never even heard of, while others (like my favorite, Slackware) come with minimal kernels that support only the essential parts fo your system.

In the former case, you can strip out everything you don't need for a faster, smaller, and more efficient kernel. In the latter, you can add drivers to support things like framebuffer consoles, sound, X acceleration, and SCSI emulation.

All good distros come with the source to the included kernel so you can tweak as you see fit. It can usually be found in /usr/src/linux. If you want the latest and greatest, look no further than kernel.org!

I hope this has been an informative post.
 

fow99

Senior member
Aug 16, 2000
510
0
0
For loads of reasons. I am running Slackware 8.0 and I've got to recompile the kernel several times for:
1. my processor Athlon (speed)
2. My burner
3. Sound cmi 8738.

But generally, a custom kernal will give you better performance and better hardware support and maybe more free memory(smaller kernel)