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

Re: Compiling a kernel



On Sunday 22 October 2006 18:02, cothrige wrote:
[...]
> In the past, as a Slackware user, I never installed an OS where I
> didn't immediately compile a new kernel.  Slack uses a 2.4 kernel, and
> I use some peripheral items which seem to require, or at least greatly
> prefer a 2.6 kernel.  The process I used was very simple, and I got
> quite used to it.  I downloaded the sources from www.kernel.org and
> opened them up in /usr/src/.  I then would run 'make menuconfig',
> 'make' and 'make modules_install.'  I copied the bzImage into /boot,
> as well as the System.map and config file.  I edited lilo.conf, ran
> /sbin/lilo and rebooted into the new kernel.  All usually went well
> and I rarely had to look back.
>
[...]
> Or, is there maybe a Debian tool to compile a kernel which is
> intended to be used rather than this "classic" method?  While things
> seem fine with the kernel installed from apt, better than fine
> actually, I figure the day is going to come when I will need to
> compile a new kernel, and I would like to know if possible what to
> expect.  Not to mention just plain how to do it.
[...]

Hi Patrick,

I always compile my own kernels the Debian (testing) way like this:

-Install the latest Debian linux-source package (currently 
linux-source-2.6.17); or you can use vanilla source as you describe
-Make a symlink /usr/src/linux to the resulting 
folder /usr/src/linux-source-2.6.17 (is this step still necessary?)
-Configure the kernel
-In /usr/src/linux, run "make-kpkg buildpackage kernel-image" (there are other 
options, in the man page)
-Install the resulting .deb packages in /usr/src with dpkg -i
- Reboot into your new kernel

This will build a kernel without an initrd, so you must compile in all drivers 
for the the boot disk(s). Or use the --initrd option.

If you are recompiling a kernel with the same version name, you must 
move /lib/modules/[$KERNEL_VERSION] out of the way (you are warned if you 
forget!), or you can use the --revision or --append-to-version options to 
avoid this.

HTH,

John



Reply to: