On Sat, 30 Dec 2000, David and Alicia wrote:

>I'd like to know, can somebody put me straight on why we should be
>optimising our kernels? what is a kernel?
>David and Alicia

Hi David and Alicia,

Let's see. The kernel.
This is the heart of the operating system. It is a file you can find in
the /boot directory:

[paul@internet piks]$ ls -l /boot
drwxr-xr-x    2 root     root         4096 Nov 18 13:16 grub/
-rw-r--r--    1 root     root          431 Nov 11 21:07 kernel.h
lrwxrwxrwx    1 root     root           20 Nov 11 21:07 vmlinuz ->
vmlinuz-2.2.17-21mdk
-rw-r--r--    1 root     root       665029 Oct  5 13:24
vmlinuz-2.2.17-21mdk

(I snipped out a lot of things here).

The kernel is loaded when you boot Linux. That is like the IO.SYS and
CONFIG.SYS of MS-DOS (if that means anything), but more extensive. It is
what makes Linux work. It loads basic handling of input and output
(screen, keyboard)  and then goes on to load other things like scsi
support, ISDN support if needed, things like that. (Sort of like
autoexec.bat in MSDOS again, but here also: more extensive)

Sometimes a kernel does not have support for a certain piece of hardware
(like ISDN, SCSI, ZIP drives, certain special harddisks etc.). That is
when you have to decide whether you want to rebuild the kernel so it has
the support for your stuff, or if you can do with loading things
afterwards, the "loadable modules".

In my /etc/rc.d/rc.local file a few of these things are loaded:

# This loads proper support for the old ISDN card:
modprobe hisax io=0x180 irq=10 type=3 protocol=2 id=line0

# This loads the SCSI/IDE interface for the IDE CDburner so it is seen as
SCSI:
modprobe ide-scsi

If I were to take the hard road, I can futz around with the kernel so it
has builtin everything that I need. But the modules load so fast that I
can't be bothered.

Optimizing a kernel means putting in what you need, and taking out what
you don't need. If you want a mean, lean system, tuned to the max, you can
eliminate ZIPDISK support if you don't have a zipdrive, take out all kinds
of things. But you have to know what is what. Since I am too lazy to look
that up, and my machinery runs fine WITH everything, why should I bother.
"It ain't broke, so no need to fix it."
Optimizing can also mean not to use the kernel as compiled for a basic
pentium (i586), but compile it specifically for your Pentium II or III, or
your Athlon K6-MMX processor. But that's up to the people who like that.

So you do not HAVE to optimize your kernel.

An RPM file is a file used with the Redhat Package Manager.
Redhat, where Mandrake is based on, developed an easier way for people to
install and deinstall programs. Not everyone is handy in compiling and
linking sourcecode.
So they invented a package format called RPM, which contains all the files
you need for the program, and which also checks if the needed support
libraries for running the program are on your system. Not there? Then RPM
issues a messages and does not install a non-funcional program. You can
then locate the needed support libraries (http://rpmfind.net), install
those (through RPM :) and then you go on installing the program you want.

Since RPM maintains a database that knows what programs are installed, it
is easy to check if you have a program installed.
RPM as a program is not handy to use in some cases, so Mandrake supplies a
set of graphical interfaces to that. Kpackage and RPMdrake are the best
ones. In those, you just click at a .RPM file you downloaded, click
'install', and your click will be done.
In these programs you can also find what is installed, and uninstalling is
as easy as "point what has to go" and tell it to go.

I hope this makes things clear!
Paul

-- 
Veni, Vidi, Vi

http://nlpagan.net - ICQ 147208 - Registered Linux User 174403
             Linux Mandrake 7.2 - Pine 4.31


Reply via email to