2005 12 10: basic kernel configuration
Now let's say you just installed the kernel source packages from your favorite distro on your brand spanking new super cool box..
You'd like to optimize the kernel..
First of, you go to the kernel source directory, usualy by typing
cd /usr/src/linux
Most distro's come with their own fully packed kernel configurations
that support most hardware, this way their distro will boot on damn nearly any kind of puter..
We don't want that, we just want our nice optimized for this box ony kernel..
So first we need to know what we have in the box..
by typing lspci as super user (root) you'll get something like this..
It would be a good idea to print this.. or keep somwhere where you can
find it..
Now let's clean up that kernel, but before we do that we copy the kernel
configuration file to a safe place, and there's no place like home..
cp .config /home/the_jinx
Were still in the kernel source folder and type make mrproper
This removes all old intermediate objects and loads Linux Torvalds default
kernel configuration..
Now we can make menuconfig or make xconfig and
add the stuff we need (or want) and remove the stuff we don't need..
If you still can't find any kernel parts for your hardware, try
lspci -vvv this gives a whole lot of info so
proppably lspci -vvv | less would be smart..
if it's a 2.4.x kernel then you'll need to do a
make dep
if it's a later kernel you don't need dep
Then I usualy do:
make bzImage modules -j3 && make modules_install install
But some might like: make bzImage modules modules_install better and do their own installing.
That's all..
If you are using lilo, and make install.. be sure to add the .old image make install creates.
That way you can allways use the previous kernel image (do remember that this only works once, the .old file is overwritten next make install)
reboot
Now if you're not planning on doing anything to your kernel anymore you can remove the intermediate files (again)
make clean
This makes the next time you compile the kernel take signifficanlty longer,
all the parts have to be re-compiled, couse you removed all the intermediate objects.
So only make clean if you realy need the diskspace!
and are willing to wait a little longer next time you compile the kernel..
That's all for now..
Be sure to read the kernel upgrade tutorial too..
You'd like to optimize the kernel..
First of, you go to the kernel source directory, usualy by typing
cd /usr/src/linux
Most distro's come with their own fully packed kernel configurations
that support most hardware, this way their distro will boot on damn nearly any kind of puter..
We don't want that, we just want our nice optimized for this box ony kernel..
So first we need to know what we have in the box..
by typing lspci as super user (root) you'll get something like this..
root@computer:/usr/src/linux# lspci
00:00.0 Host bridge: ServerWorks CNB20-LE Host Bridge (rev 01)
00:09.0 USB Controller: Compaq Computer Corporation ZFMicro Chipset USB (rev 05)
00:0d.0 VGA compatible controller: Matrox Graphics, Inc. MGA 2164W [Millennium II]
00:0f.0 ISA bridge: Compaq Computer Corporation Triflex PCI to ISA Bridge (rev 0c)
00:0f.1 IDE interface: Compaq Computer Corporation Triflex Dual EIDE Controller (rev 0a)
00:11.0 Host bridge: ServerWorks CNB20-LE Host Bridge (rev 01)
01:07.0 Network controller: Compaq Computer Corporation ProLiant Integrated Netelligent 10/100 (rev 10)
01:09.0 SCSI storage controller: LSI Logic / Symbios Logic 53c875 (rev 04)
00:00.0 Host bridge: ServerWorks CNB20-LE Host Bridge (rev 01)
00:09.0 USB Controller: Compaq Computer Corporation ZFMicro Chipset USB (rev 05)
00:0d.0 VGA compatible controller: Matrox Graphics, Inc. MGA 2164W [Millennium II]
00:0f.0 ISA bridge: Compaq Computer Corporation Triflex PCI to ISA Bridge (rev 0c)
00:0f.1 IDE interface: Compaq Computer Corporation Triflex Dual EIDE Controller (rev 0a)
00:11.0 Host bridge: ServerWorks CNB20-LE Host Bridge (rev 01)
01:07.0 Network controller: Compaq Computer Corporation ProLiant Integrated Netelligent 10/100 (rev 10)
01:09.0 SCSI storage controller: LSI Logic / Symbios Logic 53c875 (rev 04)
It would be a good idea to print this.. or keep somwhere where you can
find it..
Now let's clean up that kernel, but before we do that we copy the kernel
configuration file to a safe place, and there's no place like home..
cp .config /home/the_jinx
Were still in the kernel source folder and type make mrproper
This removes all old intermediate objects and loads Linux Torvalds default
kernel configuration..
Now we can make menuconfig or make xconfig and
add the stuff we need (or want) and remove the stuff we don't need..
If you still can't find any kernel parts for your hardware, try
lspci -vvv this gives a whole lot of info so
proppably lspci -vvv | less would be smart..
if it's a 2.4.x kernel then you'll need to do a
make dep
if it's a later kernel you don't need dep
Then I usualy do:
make bzImage modules -j3 && make modules_install install
But some might like: make bzImage modules modules_install better and do their own installing.
That's all..
If you are using lilo, and make install.. be sure to add the .old image make install creates.
That way you can allways use the previous kernel image (do remember that this only works once, the .old file is overwritten next make install)
reboot
Now if you're not planning on doing anything to your kernel anymore you can remove the intermediate files (again)
make clean
This makes the next time you compile the kernel take signifficanlty longer,
all the parts have to be re-compiled, couse you removed all the intermediate objects.
So only make clean if you realy need the diskspace!
and are willing to wait a little longer next time you compile the kernel..
That's all for now..
Be sure to read the kernel upgrade tutorial too..
