Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Reviews



Custom Linux Kernels with Debian and Fedora
The Debian Way of Customizing Kernels

Carla Schroder
Thursday, August 9, 2007 11:45:02 AM

Earlier this week we took a tour of the generic way of building custom Linux kernels. Today we'll look some nice Debian shortcuts, and Fedora's unique way of building custom kernels.

The Debian Way of Customizing Kernels

Debian's kernel source packages are named linux-source-[version]. The current official source package versions are linux-source-2.6.18 (stable), linux-source-2.6.21 (testing and unstable), and linux-source-2.6.22 (unstable and experimental).

Binary Debian kernel packages are named linux-image-[version]. It's been this way since version 2.6.12, if you're remembering the olden days of the kernel-source and kernel-image packages. The new naming convention opens the door to using other kernels with Debian, which I don't know what those would be, but Debian is ready for them.

To get started, install a build environment (see part 1), plus your kernel sources and the fakeroot package:

# aptitude install linux-source-2.6.22 kernel-package fakeroot

This downloads the source tarball into /usr/src/ where we do not want it, so you need to move it to your personal kernel-building directory:

# mv /usr/src/linux-source-2.6.22.tar.bz2 ~/kernel

Change to your personal kernel-building directory and unpack the tarball:

$ tar zxvf linux-source-2.6.22.tar.bz2

Then change to the top-level source directory and start configuring your new kernel:

$ cd linux-source-2.6.22
$ make mrproper
$ make xconfig

When you're done slogging through configuration, run these commands:

$ make-kpkg clean

$ make-kpkg -rootcmd fakeroot -rev kernel.1 linux_image

fakeroot gives you enough root privileges to build kernels as an ordinary user. It won't let you run commands that need genuine root privileges, but it's good enough for kernel-building. This leaves you with a .deb package named linux-image-2.6.22_kernel.1_i686.deb. Of course you may make the -rev option say whatever you want. Then install it in the usual way with dpkg:

# dpkg -i linux-image-2.6.22_kernel.1_i686.deb

This installs the modules and handles module dependencies, creates a boot menu entry, and copies the kernel and related file to the /boot directory. Now you can reboot, select your new kernel from the boot menu, and play with your new kernel.

Next: The Fedora Way of Customizing Kernels »

Skip Ahead

1 The Debian Way of Customizing Kernels
2 The Fedora Way of Customizing Kernels
3 What Kernel Options To Use?





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers