[SATLUG] compiling a kernel
afcasta at satx.rr.com
Wed Jun 25 05:54:13 CDT 2008
On Tue, 2008-06-24 at 22:02 -0500, Bruce Dubbs wrote:
> Chris Lemire wrote:
> > How long does it usually take a Linux user to configure his or her first
> > kernel ready for compiling? I still don't know whether or not to include many
> > things in, have them as modules or not have support for them at all into the
> > kernel. I guess a person will spend quite a while Googling each item to see
> > how it should be configured. The help pages help but still is not obvious for
> > every feature of the kernel whether include, make it a module or not have
> > support for it at all.
> I like menuconfig. If you go to the help page for each option, it will normally
> say "If unsure say Y." (or N). If you don't know, use the recommendation.
I prefer menuconfig to the gconfig and xconfig gui based options - on a
small system it allows more system resources to be available for when
you're compiling the kernel.
> I generally don't like modules. I know what my hardware is and build that into
> the kernel. The main reason for modules is for distros that don't know what the
> target hardware will be, so they try everything.
I don't do monolithic kernels these days because I'm always changing out
the hardware, and modules allow more flexability.
> On the other hand, sometimes modules are your only option. I use two: Nvidia
> and VMware. They are both proprietary.
> Also, you don't need initrd when compiling you own kernel. You know the file
> system types you use, so just build them into the kernel. initrd is again for
> distros who don't know if their users will boot to ext2/3, reiserfs, jfs, xfs,
> etc. In that case, you don't want a lot of unused drivers built into the kernel.
If when you're finished compiling and installing modules, etc., you do a
"make install" then your initrd-[version].img file gets built for you
and /boot/grub/grub.conf gets updated, too.
> The initial build of a kernel doesn't have to be perfect. You can always go
> back to a known good kernel and try again. Forgetting a driver or other option
> is common. Rebuilding, copying the appropriate files to /boot and rebooting can
> get very fast with a few repetitions.
That again is why I like modules - I rarely have to recompile, and
modules that aren't needed don't get loaded:
[afcasta at phrodo ~]$ uname -a
Linux phrodo 184.108.40.206 #1 SMP Mon Jun 23 09:24:53 EDT 2008 i686 i686 i386
When I was building monolithic kernels, I'd often get up to #5 or #6
before I got everything to work.
More information about the SATLUG