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

Re: recipe for kernel build...



On Thu, Jan 26, 2006 at 01:32:02PM +0000, Digby Tarvin wrote:
> I have just done my first Debian install, and one of the things I
> want to do before I declare it complete is to make sure I can
> recreate the kernel from source so that I know I have the source
> for what I am running on hand..

It can also help when you decide to optimize the kernel for what is
specifically in your machine...  :)


> I am doing this on a 233MHz 'Mobile Pentium MMX', and so during
> the install selected vmlinuz-2.6.8-2-386 (and vmlinuz-2.4.27-2-586tsc)
> which seem to work ok, though I am not sure if I made the optimal
> choice.
> 
> So far I have done:
> 	apt-get install kernel-tree-2.6.8
> 	cd /usr/src
> 	tar jxf kernel-source-2.6.8.tar.bz2
> 
> Which I assume has given be a source tree corresponding to my
> running 2.6 kernel.
> 
> The problem at this point is working out how the current kernel
> binary was configured. In my previous Linux distributions (SuSE
> and gentoo), I could copy /proc/config.gz which was garanteed
> to be the configuration of the running kernel, but my new Debian
> system doesn't seem to have that. Is there a different mechanism?

Config files are normally found in /boot.  It seems that your other
system kernels were compiled with the option to have the config file
also carried within the kernel, which is a neat trick if you feel you
need it.

> Can I assume that if I don't run menuconfig etc that the default
> kernel configuration installed from the source tarfile will be
> what was used to produce my running kernel? 

It'll certainly use what is there, which likely won't match a chunk of
what you need for your laptop.

> 
> Anything else I should know when building in a Debian system?

Only everything you can piece together about you own system.

Kernel-package is a very nice way to piece together the parts of your
recompilation into a Debian package.  The instructions are quite good,
too.

If all you are tying to do is recompile the image, then use the config
file in /boot.  But I'm curious why you want to do that, since the
package is there already...   ???

Cheers,


Kenward
-- 
In a completely rational society, the best of us would aspire to be 
_teachers_ and the rest of us would have to settle for something less, 
because passing civilization along from one generation to the next 
ought to be the highest honor and the highest responsibility anyone 
could have.     - Lee Iacocca



Reply to: