Click to See Complete Forum and Search --> : customizing the linux kernel


charlescpc
December 1st, 2004, 03:13 AM
I was just wondering where some good information on customizing a kernel in Linux. I have heard that you can streamline the kernel making it boot faster and run better.

Also, is this something a person new to Linux can handle or should it be left to Linux experts.

Titchski
December 2nd, 2004, 06:25 AM
I was just wondering where some good information on customizing a kernel in Linux. I have heard that you can streamline the kernel making it boot faster and run better.

Also, is this something a person new to Linux can handle or should it be left to Linux experts.

A lot depends on what "flavour" of linux you are running. I used Gentoo for a while, which forced you to build the kernel from scratch. After a while I went back to using Slackware and I'm debating whether to attempt to install a new kernel. I've no experience at all trying it on Mandrake/SuSE/RedHat (Fedora)

There are some great sites out there that can walk you through kernel configuring, but you have to remember that the reason you customise the kernel is so that it is customised to work with your system Its vital that you know exactly what hardware you have and what modules the existing kernel uses. I'll see if I can dig up some sites and post back. :thumbs:

Titchski
December 2nd, 2004, 06:31 AM
Here's a couple:

Upgrading Red Hat (http://www.linux-sxs.org/upgrading/migration26.html)

Linux Kernel Upgrade - Generic-ish (http://kerneltrap.org/node/view/799)

+Daemon+
December 2nd, 2004, 10:37 AM
I always recompile the kernel and make it small and fast, I take out allthe crap I dont need. I end up with a 1mb or less kernel so it fits on a floppy if I wanted to vs 25 mb :)

its worth it in the log run

fast run down

in a command prompt (shell, teminal, console)

cd /usr/src/linux
make menuconfig (use this to configure the options in the kernel)
(dependinf if its the 2.4 or 2.6 kernels this is diffrent)

2.4 kernel
----------

make menuconfig
make bzImage
make modules
make modules_install
cd arch/i386/boot
cp bzImage /boot/kerncustom24
(edit lilo.conf or grub what ever boot laoder u are using)

2.6 kernel
----------
make menuconfig
make
make modules_install
cd arch/i386/boot
cp bzImage /boot/kerncustom26
(edit lilo.conf or grub what ever boot laoder u are using)



note: you might have to mount your /boot partition if u made the /boot a seperate partition. do a "ls /boot" and see if there are files in there before you copy the kernel there. if no files are there then do a "mount /dev/hdxy /boot", were the x is in /dev/hdxy is the hard drive (a,b,c...), were y is in /dev/hdxy is the partition number were the boot partition is.

charlescpc
December 3rd, 2004, 06:33 AM
thanks for the replies.
I use Mandrake 10.1 with a 2.6 Kernel.
I don't really have anything I mind loosing if I totally screw up the install.
I would like to see if I could get the kernel down a little.
I have found several sites that show you how to patch the kernel and recompile a new one.

The main thing I'm trying to figure out is how to get rid of all the "extras".

Oh yea, setting up the wireless was a bitch. Might be good practice now that I know it can be done.

I'm still waiting till I can do away with the dual boot and just run Linux.........
Thanks