Linux Kernel Basics.. Recompiling?
I have a few questions, or a need for an explanation. I've been using linux now since I was 17 ish and I am 23 now. I've done quite a bit of programming too... I'm very well versed in many problems and the operations of linux, even went to college for a while with linux courses.. but one thing I have yet to do myself is re-compile a Kernel...
What I understand, or think I understand, is that recompiling is using the source headers etc to recompile the standard kernel with the sources for your current kernel module configuration, to create a newer, tighter kernel binary with the support all built in... as in..
The vmlinuz, whatever your kernel's file for whatever distro your using now contains your network drivers, sound card drivers, scsi/raid drivers or whatever you got, in the main re-compiled binary....
As opposed to the original distro's kernel reaching to the kernel modules, probing and/or setting up all the modules automagikally or with user defined parameters, and loading them into memory...
Again, this is what I observe on a daily basis, hehe.. so I could be wrong. Since linux uses protected memory, that means that a kernel module crashing wouldn't cause the kernel itself to bail out... but, as long as you've tested yoru system, and you know it won't fail, then compiling the modules into the binary kernel from source up wouldn't be a problem.. but if it did screw up, your kernel would go bunk.... teets up...
If someone can like, verify that I'm not totally crazy, and that this is indeed what re-compiling accomplishes, hehe, that would rule.
If someone can also give me a quick rundown of what is nessacary before and after a compile, that would be cool. I have installed new outta the box kernels, and stuff... many times. I am very familiar with Debian and RedHat installations, the two opposite ends, the coke and pepsi as it were of linux distros.. I have for instance, upgraded a debian 2.4.x to a 2.4.20 or whatever kernel, but, that's basically exchanging packages, updating a few symlinks.. all done with binary packages, pre-compiled and stuff... redhat was even sillier, and offered no learning experience at all. At least Debian, you can take apart what is happening easier...
Anyways, any insight/help would rule.... thanks guys. This site.. is an amazing resource.
:D
Ryan
Well.. thanks for your help...
I put this under tutorials hoping that the responses would serve others as well as me. I am familiar with the linux kernel, and an OS's kernel in general, the function it serves.. I was looking for a little help.. I understand that's what this is all about...
But yes.. I understand that.. The kernel options.. say... adding and removing modules for different hardware.. tweaking to run faster.. cleaning it up.. adding and removing USB support.. legacy hardware support.. And I have done the same.. installed a new kernel without upgrading a distro.. I just never had to recompile, as most distros offer a few versions of a bloated basic set binary kernel and their sources versions based on what chip you run etc...
Thanks for the information.... Anyone else out there have some stories that would start this as being useful? That last post was basically a shot at me, made me feel stupid, and almost got me banned. The question I asked, was again, what are the steps nessacary to recompile a new kernel from source? For someone who hasn't done it a million times?
Ryan
So that I stop receiving negative points from people just reading it and dinging me...
Does anyone know a way to move this attempt to start a tutorial as is to a different area,
other than newbie tutorials?