[FC6] Installing Kernel Sources via yum

To obtain the kernel headers only:

# yum install kernel-devel

To get the kernel source, this will get a little complicated:

Download source rpm with yum
First we need to install the utility that will download the latest kernel source.

#yum install yum-utils
cd my-download-directory
#yumdownloader –source kernel –enablerepo updates-source

This will download the src.rpm file.

Install the kernel source
Install the kernel source package downloaded above:

#rpm -ivh kernel-2.6.18-1.2849.fc6.src.rpm


#rpmbuild -bp –target=$(uname -m) /usr/src/redhat/SPECS/kernel-2.6.spec

The source will now be located in two directories underneath /usr/src/redhat/BUILD/kernel-2.6.18/. vanilla will contain the standard kernel.org source tree (without patches). linux-2.6.18.ARCH will contain the patched redhat kernel sources.

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s