Compile a kernel for FC3
Site Navigation:

Compile a kernel for FC3

Author:  Sven Knispel
Updated:  [udate]

The following article explains the process of compiling a new kernel for FC3, based on an official kernel distribution.

1. Setup the Fedora Kernel sources

The Fedora kernel sources are required in order to get the Fedora specific .config; the sources won't be used in the compilation process as we will get an official ditribution for that.
For more information about this step please have a look at the Fedora Core 3 Release Notes.

Download kernel-source RPM (e.g. from
Currently kernel-2.6.9-1.667.src.rpm

Install the kernel and set it up (as root):
rpm -ivh kernel-2.6.9-1.667.src.rpm
rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec

2. Download and prepare an official kernel

Download a kernel from an official mirror ( e.g. linux-2.6.10.tar.bz2
and decompress it to /usr/src (logged on as root):
bzip2 -cd linux-2.6.10.tar.bz2 | tar xvf - -C /usr/src/

Change to the source directory: cd /usr/src/linux-2.6.10/ and apply whatever patches you wish (e.g. Suspend to Disk (swsusp as described here)

Finally clean-up the source-tree: make mrproper

3. adjust the official kernel to Fedora

Check the kind of installation you have:
uname -rm
2.6.9 i686

and copy the corresponding .config file (as root):
cp /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/configs/kernel-2.6.9-i686.config /usr/src/linux-2.6.10/.config
Note: I used i386 here as uname told me that this is what I have.

Update the .config file (as root): make oldconfig ... and answer what you know (if you don't, leave it as default).

Configure kernel options:

  • make xconfig for QT-based version
  • make config for text based version
... and change the options you want (be carefull about those you don't know).

4. Compile and install the kernel

Compile the kernel (as root):
make all

Prepare and install(as root):
make modules_install
make install

You'll find the result in the boot-loader menu /boot/grub/grub.conf

That's it, now you can reboot.....

5. Troubleshooting

First booting the customized vanilla kernel I got errors in the bootlog (dmesg) of this kind:
audit(1103024559.699:0): avc: denied { write } for pid=662 exe=/sbin/minilogd

After some research I found that these are related to SELinux and is supposed to occur only in Kernel 2.6.9. My experience is that the same problem occurs with Kernel 2.6.10 as well.
To get rid of them by disabling SELinux by adding the option selinux=0 to my grub parameter line.
A more correct manner yould have been to add audit=0 to the grub parameter line, but this would obviously only have removed the log, not the cause.

For more about SELinux in FC3 have a look here.