Installing Custom Kernel
You can get away in most of the cases just by installing the kernel headers, but if you need to modify kernel parameters, then you'll have to install a custom kernel.
To install the kernel headers, first you need to find out what kernel you are using. To find that out do the following:
In my case, when I perform that command I get: 2.6.22-1-41.fc7
Now depending on which system you're running, you'll have to append .x86_64 or .i686 or whichever system you're using to the end of that number.
As we have been using a x86_64 distribution we use the following command to download the kernel headers:
Building Custom Kernel
There are many prebuilt packages at the repositories for the version of the kernel of the Fedora distribution.
With this procedure, we can build our own kernel in a way that will look the same as the Fedora distribution so we can use those prebuilt modules.
Download the latest kernel for your system, as August 2007, to get it:
Once the file is downloaded:
#rpmbuild -bp --target x86_64 kernel-2.6.spec
#rpmbuild -bp --target i686 kernel-2.6.spec
If you get the error: sparse >= 0.3 is needed by kernel-18.104.22.168-41.fc7.i686, just install sparce:
Now go to the directory /usr/src and delete any symbolic link pointing to another kernel:
Now, create a new symbolic link:
#ln -s redhat/BUILD/kernel-2.6.22/linux-2.6.22.x86_64 linux
#ln -s ../redhat/BUILD/kernel-2.6.22/linux-2.6.22.x86_64 22.214.171.124-41.fc7-x86_64
#ln -s redhat/BUILD/kernel-2.6.22/linux-2.6.22.i686 linux
#ln -s ../redhat/BUILD/kernel-2.6.22/linux-2.6.22.i686 126.96.36.199-41.fc7-i686
Go to /usr/src/linux, edit the Makefile, look for the line EXTRAVERSION and set it to .1-41.fc7, at the end, the line should look like:
Now, perform the following commands to copy the original configuration of your Fedora installation:
#cp -p /boot/config-188.8.131.52-41.fc7 .config
If you want to perform changes in the configuration of the kernel, do a:
Once you're happy with your kernel, compile it, compile the modules and install it: