View Single Post
Old 05-05-03, 02:14 PM   #4
Registered User
Join Date: May 2003
Posts: 12

Well, in all cases, you should at least try to compile one kernel once in your life if you seriousely want to stay on linux ;-)

So, do not fear too much of breaking your system. Everybody has once break his system ;-)

But, well, I do NOT recommand compiling a kernel under a redhat linux with the gcc-2.96, because THAT could really break down your system. I remember spending hours fighting with a kernel on a redhat with that dummy compiler.

So, first, check your compiler is either the 2.95.3 either the 3.X with gcc --version

Next, download the tarball of the kernel you want to compile from, with XX is your country code, or if you live in the USA.

If you want to compile a 2.4.21-preX, you have to first download the source for the 2.4.20 then the patch for the 2.4.21-preX you want. The patch is always in the subdirectory "testing" of the "v2.4" directory.

Go to /usr/src and uncrunch your kernel tarball there. If you downloaded the 2.4.20, it should create the directory linux-2.4.20. If you want to apply the patch, say, patch-2.4.21-pre7.bz2 (I suppose this file is located into your home), then go into the linux-2.4.20 and patch the kernel with the following command:

bunzip2 -c ~/patch-2.4.21-pre7.ba2 | patch -p 1

Then, you have to configure your kernel. Do the following command:

make menuconfig

or, if you prefer a clicy interface,

make xconfig

This should take you some time if this is the first time you compile a kernel. Maybe you should read very carefully every option help and so. Do not hesitate to read and ask about options you do not quite understand but have the feeling you should need it.

When you're done, compile your kernel with the following command:

make dep clean bzImage modules

Depending on your CPU, it should take around 15 minutes.

When you're ready to install your kernel, first do

make modules_install

to copy all the modules you selected into your system. Then I recommand you to backup your old kernel. This is usually a file pointed by a symbolinc link called /vmlinuz and is usually located into the /boot directory. Eventually, edit your /etc/lilo.conf in order to add a new entry pointing on your old kernel you just backuped. Finally, do

make bzlilo

to install the kernel as the file /vmlinuz. If this file is still a symbolic link, it will erase the corresponding file, so, take care. Maybe you should first erase the old symbolic link so you'll have a plain /vmlinuz file. In all cases, the make bzlilo will create a backup of your kernel called /vmlinuz.old

Now, some hints about configuring your kernel:

-) If you put "modules", it will mean that you'll have to "load" them, so take care. For example, if your harddrive is SCSI, do NOT put your SCSI card into a module, otherwise there will be a chicken-and-egg problem: the kernel won't be able to read the disk to load the module. In all cases, about the modules, depending on your distribution (I do not quite know redhat...) then you'll have to change some configuration file in order to load your new modules at boot time.

-) check the "Prompt for development and/or incomplete code/drivers", it will give you more options, marked usually as "experimental", but often useful.

-) do not touch the networking options. All the TCP stack is good enough by default.

-) Since you have a nforce chipset, be sure to check the IDE chipset called "AMD Viper" otherwise your harddrive will be slooooow, and for the sound part, check the "Intel ICH (i8xx), SiS 7012, NVidia nForce Audio or AMD 768/811x" driver.

Okay, not it's time for me to say "good luck" ;-)

And I repeat: do not hesitate to ask questions about options in your kernel.
pixelxeno is offline   Reply With Quote