Re: Please help me figure this kernel stuff out!!


Subject: Re: Please help me figure this kernel stuff out!!
From: Timothy A. Seufert (tas@mindspring.com)
Date: Sat Sep 29 2001 - 04:29:53 MDT


At 9:14 PM -0500 9/28/01, Kitt Thompson wrote:
>You guys are great! Thanks for the help to date. (Poetry unawares)
>
>>> Thirdly, in searching for kernel souce, I have noticed kernel headers and
>>> kernal doc tar balls in with the source tar balls. Would I need the
>>> headers and docs for a kernel build?
>>
>> No. The headers are for people who don't want to have kernel source
>> lying around but do want to build software that expects to include
>> headers from the kernel. The headers are just a subset of the full
>> kernel source and are usually put under /usr/src/linux (or a similar
>> directory with /usr/src/linux being a symlink pointing at the actual
>> directory).
>Hmmm... ok. Why wouldn't someone want the kernel source lying around?

It takes up a lot of space. 133 MB for a version of 2.4.9 I have on
one computer here, and that's prior to actually building the kernel.

>And,
>where would this kernel source be lying if it were around? Is this what's
>placed in /usr/src before the build takes place, and remains after the build
>is complete?

Yes, except as per below, you don't actually need to put the kernel
source tree under /usr/src, though many of the information sources on
kernel building out there are written as if the only possible
location is /usr/src/linux. You can unpack it into a subdirectory of
your home dir and build it there.

>> Another thing: despite what many guides will tell you, you do not have to
>> build kernels while logged in as root with the kernel source tree in
>> /usr/src/linux. You can unpack the kernel source in a regular user's
>> home directory and build it as that user with no problems. You only have
>> to be root to install the modules and the kernel after they've been
>> built. The advantage of this technique is that you can leave
>> package-controlled files under /usr/src alone. (If /usr/src/linux
>> absolutely needs to be your current kernel, just symlink it to wherever
>> your build directory is.)
>What is a package-controlled file and why would you want to leave it alone?

Most Linux distributions use package managers to control the
installation and uninstallation of all the software included with the
distribution. A package is simply a bundle of files before
installation. But as a package is unpacked and installed, the
package manager adds information about the package and all the files
that were installed to a systemwide package database. Later, when
you wish to upgrade or remove that package, the package manager uses
that database to ensure that it can remove or upgrade all the files
that were originally installed.

There are several package managers out there. Yellow Dog Linux uses
RPM, a package manager invented by Red Hat.

If a particular file was installed by a package, manually modifying
or removing or replacing it may cause problems later when the package
which owns it is upgraded or uninstalled.

-- 
Tim Seufert



This archive was generated by hypermail 2a24 : Sat Sep 29 2001 - 03:39:45 MDT