Custom Linux Kernels with Debian and Fedora - page 2
The Debian Way of Customizing Kernels
Fedora patches its kernels all to heck, to the point that a vanilla kernel may not work. Of course it costs nothing but a bit of time to try. But if you want to use genuine Fedora kernel sources they come in source RPMs, so you'll have to build your kernel and then package it into an RPM. First fetch your kernel SRPM from your favorite Fedora mirror, such as:
$ wget http://mirrors.kernel.org/fedora/releases/7/Fedora/source/SRPMS/kernel-2.6.21-1.3194.fc7.src.rpm
Then make sure you have the RPM building tools, plus the normal build environment from part 1:
# yum install rpmdevtools
The next step is to create a build tree in your home directory, and make sure to do this as yourself and not as the root user:
This creates an
rpmbuildtree directory populated with BUILD, RPMS, SOURCES, SPECS, and SRPMS directories. Next, install the source RPM. This will unpack files into your new
$ rpm -ivh 2.6.21-1.3194.fc7.src.rpm
Ignore the warnings about "group kojibuilder does not exist."
Next, run the
%prep stage of the RPM rebuild, and make the
--target option match your CPU type:
$ rpmbuild -bp --target=i686 ~/rpmbuild/SPECS/kernel-2.6.spec
This extracts the kernel tarball and applies all the Fedora patches. Now change to the source directory of your new build tree:
$ cd ~/rpmbuild/BUILD/kernel-2.6.21/linux-2.6.21-1.3194.i686/
And get started with configuring your new kernel:
$ make mrproper $ make xconfig
Finally, roll it all up into an RPM:
$ rpmbuild --target i686 -ba ~/rpmbuild/SPECS/kernel-2.6.spec
Again, make the
--target option match your CPU type. Your new RPM should be in
~/rpmbuild/RPMS/i686/. Grab your new kernel.rpm and install it just like any other RPM:
# rpm -ivh kernel-2.6.21-1.3194.i686.rpm
This handles all the chores of copying files to
/boot and creating a boot menu entry, so all you do is reboot and select your new kernel from your boot menu.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Linux from Scratch, Ubuntu 14.01 Beta and Arch Updates