• Welcome to Powerbasic Museum 2020-B.
 

Getting Started - What's a Kernel and Why Rebuild It?

Started by Donald Darden, March 22, 2008, 11:23:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald Darden

Kernel is another name for the core of an Operating System.  It is usually the smallest segment that is still coherent and able to exist on its own.  It has to be loadable, capable of have some function, and it has to be extensible.  By extensible, we mean that it can be extended with the addition of drivers, modules, and other software forms, and thus tailored for different applications.

Operating Systems are sometimes compared to onions, because much of the additions made can be described as layers, similar to what you find in an onion.  Others might choose the idea of a golf ball, with a core surrounded by wrappings and a hard outer skin.  These are good analogies.

One of the features of the Linux core is that it allows for many additions and extensions to be handled as modules, which can be added, replaced, or removed almost at will.  This means the core can run without interruption while such changes are taking place - few reboots are required.  However, anything that is truly a part of the core would necessitate a rebuild of the kernel and a restart of the system in order to take effect.  In some situations, installing or replacing drivers might require rebuilding the kernel.  In other cases, the driver becomes part of a module that can be installed or replaced on the fly.

The linux kernel and surrounding software are being constantly revised and extended, and this is tracked with version control.  Different lines of development mean that everything is being tracked independently of everything else.  The people that put together the various distributions of Linux have the freedom to select whatever they want to be part of that distribution, and thus we also track distributions by their versions, making note of the features they offer.

Windows users never had to consider the nature of their operating system before.  Many people do not even know about automatic updates and how to use this feature to download and install patches and updates with minimal fuss.  To them, there is only the major release name or number for their version of Windows, such as 95, 95 SE, 98, NT, 2K, XP, and Vista.  Various flavors of Windows may have additional designations, such as Home, Basic, Professional, Server, or Media Center attached.  And Windows has also accustomed us to think in terms of New PC -> New OS -> New Apps.  Or just New OS -> New Apps if you are thinking of making do with an older box.

Most updates done to Linux involve the outer layers, and these are handled by various methods, such as apt-get or Synaptic Package Manager.  It has been said that for many people, one of the most confusing things about the Linux world is that there is no one right way to do anything - there are all sorts of ways to do the same thing, some being somewhat better than others.  With DOS and Windows, the choices are fewer, and therefore less confusing.

In Windows, you usually have to look for applications updates and packages yourself.  Microsoft makes it possible for you to get some non-OS updates from them as part of your automatic updates, but so few vendors take advantage of this that I suspect that they charge a premium for the service.  With Linux, particularly those that use the Debian method of updating, the various repositories let your system stay current with virtually no effort on your part.

You also have the option to update the kernel, which means replacing it completely without disturbing the other layers.  This would require a reboot to implement, but entails few risks.  There is no real equivalent for doing this with Windows.  You can attempt to repair or replace Windows, but the disruption to the Registry is sufficient to force you to reinstall many applications.  There are programs that attempt to archive and restore your registry in case this happens, but it is beyond what many people feel capable of doing, or understand how to do.

In Linux, the naming and placement of folders and files is often of great significance.  This is somewhat true of Windows, but the adiption of the Registry gave applications a common meeting place for storing crutial data that would permit you to install applications on other drives or using different paths.  But this flexibility comes at a high price, because the Registry now represents a single point of failure in the Windows structure.

And another aspect of Linux not found in Windows is that you have full access to the source code, and can not only rebuild your kernel if need be, but upgrade and replace it, or create your own distribution if you like.

I;m just getting ready to take a plunge at this myself.  My reason for doing so is that I want the ability to add Virtual Additions to existing distributions of Linux if I need them.  Without Virtual Additions, I find that Linux runs awkwardly in a guest OS environment.  So I need a way to try and deal with that.  Now later on, I may find that the OSes that interest me most won't need to do this, but right now it seems like a necessary step forward,

I began my search online using Linux Kernel Rebuild for my search key, and there is a lot of postings available.  I could narrow the search by adding a specific distro name, such as Ubuntu or Slackware, but in general the approach used should be about the same, because it is all Linux.

Here are some links I have uncovered already:

http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO.html
http://www.lesbell.com.au/Home.nsf/504ca249c786e20f85256284006da7ab/a81f3ecb7cf5028eca256cf2003035ca?OpenDocument
http://www.linuxscrew.com/2008/03/04/10-advices-before-you-rebuild-linux-kernel/
http://ubuntuforums.org/archive/index.php/t-30697.html
http://www.fsdaily.com/EndUser/An_Ubuntu_guide_to_taming_the_Linux_kernel

Ain't Google just the greatest?