Re: How do I compile and install a kernel from source?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Konosky wrote:
> I have been installing the kernel rpms with yum/synaptic, but I have 
> read that the "vanilla" kernels, which I am guessing are the original 
> source-code versions, have more features, but are sometimes less stable 
> becuase thet are not edited for specific distributions. Is this correct?

That *really* depends. Fedora 2.6 kernels are not very different from
the vanilla kernels from kernel.org.

More features? It depends. If you compile from source, you might compile
in features that the Red Hat lawyers are worried about (their engineers
build kernels for Fedora and RHEL), or the engineers don't feel are
worthwhile for enough people, or are still experimental.

On the other hand, Fedora still carries a number of patches that the
kernel.org tree doesn't have: IIRC, selinux and exec-shield both rely
on kernel patches. So you will lose their functionality. (In both cases,
the functionality is security-related. You shouldn't need either, but
in the event of a bug being exploited, these might limit the effects).

On the gripping hand, you can find and install these patches yourself.

Then there's the 4G/4G split that i686 Fedora kernels have. This has
been reported to cause slow-downs, and is a Fedora patch in itself.

How stable is it? There's very little in it, these days. If you
configure in experimental features, you might expect problems. But in my
experience, there's no difference. I've only had a stable kernel crash
once, and I suspect the memory there.

In the past, there have been the occasional wobbles from Linus and from
the Red Hat team. There will be in the future: they're only human[1].

Note that you have to learn your way around the kernel numbering scheme.
And that's changing. Linus isn't planning to release a 2.7 development
(= unstable) kernel any time soon. 2.6.n kernels, where n is a whole
number, are supposed to be stable. 2.6.m.n kernels (e.g. the current
2.6.8.1) are bug-fixes. Other kernels (2.6.9-rc1, 2.6.8.1-mm2, etc)
are development or "release candidate" kernels, possibly not released
by Linus, and not necessarily stable.

> I would like to compile the latest kernel version from source just to 
> see how it's done and also to see if the "vanilla" kernel is stable 
> enough for my system. Once it is compiled, will I have to manually add 
> the kernel to the grub config file?

Yes.

> Any tips/tricks I should know about 
> when compiling a custom kernel?

Try make -j2 (or higher numebrs if you have SMP and/or hyperthreading).

Read the README file in the top directory.

Change grub.conf to boot by device (e.g. root=/dev/hda6), not label.
For your first attempt, compile in everything you need to boot: don't
modularise ext3 or your IDE drivers, for example. That way, you should be
able to boot without an initrd.

Keep backup kernels around and working. Get an alternative boot disk, so
if you make a real mistake, you can get in and fix it.

Have fun!

> I am currently using 2.6.7-1.496_4.rhfc2.at, and I had tried the 
> 2.6.8-1, but went back after finding out about the CD-burning bug. Has 
> this been fixed?

Well, the current stable kernel *is* 2.6.8.1. But I understand there is
work being done in the development tree to get user CD burning working
again.

James.

[1] Mostly human, if you believe some of the penguin tales...
-- 
E-mail address: james | "We completely deny the allegations, and we're
@westexe.demon.co.uk  | trying to identify the alligators."



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux