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

Re: How to rebuild Woody kernel (Newbie)



On Wed, May 22, 2002 at 10:18:11PM +0200, DSC Siltec wrote:
| I've installed Woody, but have discovered that I don't have 
| (a) ALSA for my sound (alternately ymfpci.o) or 
| (b) support for my USB (which I assume will be necessary if I want to
| upload my digital camera pictures to my Linux box.)

I don't know about ALSA, but USB support is included in the
prepackaged kernels.  Oh, are you using 2.2 or 2.4?  I don't think the
.debs for 2.2 kernels have USB.  Upgrade to 2.4 :-).

| So I found out I have to rebuild my kernel.  Never having done this
| before, I went to the Linux Kernel HOWTO, and pulled up HOWTO
| Rebuild the Kernel.
| 
| The stuff looks like greek to me.  

Debian's kernel-package is much easier to use.  It takes care of
everything but configuration and updating your boot loader for you.
That howto is for building from a tarball distributed by kernel.org
and is probably geared for RH.

| For another thing, I am not at all sure which modules I'll be needing,
| and it looks like I'll have to know that.

Yeah, that's kind of important to know when building a kernel.

| I can pick up my filesystem from module okay, and I can figure out
| my chip, and I can probably safely assume that I have a PCI
| motherboard.  But most of these things were bypassed in the initial
| woody installation.  

They weren't bypassed at all.  You never compiled a kernel during your
woody installation :-).  Herbert Xu has put together a decent default
configuration that works for most people out-of-the-box.

| Ideally, it would be nice to get a list of the modules that I already
| have and their installation values -- I am sure that they would be
| listed somewhere in ETC, if I knew where to look.

You can find that configuration in /boot/config-<kernel version>.  Go
ahead and start building your kernel.  You'll find the option in the
configuration interface for loading an existing config file.  You can
use that as a starting point.

| So I was wondering -- are there any better howtos out there, possibly
| more in line with Woody?  Or is there a newbie guide on rebuilding the
| kernel?

You can try reading the documentation in the "kernel-package" package.
Basically use this command to build your kernel :


fakeroot make-kpkg clean  && \
    fakeroot make-kpkg \
        --config=xconfig \
        --append-to-version=-custom.${VER} \
        --revision=custom.${VER} \
        kernel_image \
        modules-image
        kernel_headers

but replace ${VER} with a version number (eg 1, 2, 3) so that you can
keep track of which build attempt you are testing.

This will create a .deb file that you can install with 'dpkg -i'.

| Sorry to seem stupid here, but it may be an accurate assessment %-)
| 
| Anyhow, this looks like a fairly scary process when I may wreck the
| system and have no idea what I am doing (kid at the wheel of a
| steamroller syndrome... what's this button do?).  

It's intimidating at first, but really isn't all that bad once you get
the hang of it.  Here's the trick to prevent suicide :
    1)  keep your existing kernel intact, don't wipe it (or the
        modules) off your disk

    2)  Keep an option for loading it in your boot loader's config.
        That way you can revert back to it if (when) you make a
        mistake in configuring your new kernel.  Everyone makes
        mistakes from time to time.  The key isn't to not make a
        mistake but rather to know how and be able to recover from it.

The best way to learn how to build a kernel is to do it and discover
how it works through RTFM, experience, and making mistakes.
 
HTH,
-D 

-- 

If your life is a hard drive,
Christ can be your backup.
 
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg

Attachment: pgpZTs96mjlAU.pgp
Description: PGP signature


Reply to: