Skip navigation.
Home
Now Shipping Version 8.0

How to compile and install 2.6.7 kernel

How to compile and install the 2.6.7 linux kernel if you are already running on a 2.6.4, 2.6.5 kernel in Mepis.

Make sure you have binutils, coreutils, libncurses5, libncurses5-dev, fakeroot and module-init-tools packages installed before using my guide below and the one I have posted at the end of my guide. (You can find out by doing an apt-get install binutils coreutils libncurses5 libncurses5-dev fakeroot module-init-tools and seeing if they come up already installed, if any are missing you will be able to install them automatically this way.)

Download the kernel source ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.7.tar.bz2 to your /home/yourusername directory. Click on your home icon and then browse to where you downloaded the file if you downloaded to a subdirectory.

Right click on that file and choose Actions > Extract here

You will see a new folder now called linux-2.6.7 so open a terminal and type cp linux-2.6.7 /usr/src as a user, if you get an error saying that you don't have permission to do this, then type adduser yourusername src

Then try the cp linux-2.6.7 /usr/src again. Now type cd /usr/src in your terminal.

Now you have to make a symbolic link for your linux-2.6.7 folder to point to a linux folder so type ln -s linux-2.6.7 linux and then cd linux. (If you already have a linux folder pointing to an earlier kernel, remove it before attempting to create another. Use rm linux and that will delete the old linux folder.)

Now type make oldconfig and this will copy your configurations from your other 2.6x kernel into the new one you will make. There are some new options available with the 2.6.7 kernel so you will get prompts on them and you should answer with default answers. They will be a capital Y, N or M. Choose whichever is captitalized because unless you know what these things do, and most are experimental, you don't want to configure them into your new kernel or you may mess it up.

After you've finished with the make oldconfig part, you will then have to create a kernel image with it. So, now you type fakeroot make-kpkg buildpackage -rev Custom.1 kernel_image, exactly as I have written it here. You have to be root to make the kernel image but using the fakeroot command is best. I always compile and install my kernels as a user and only use fakeroot command for when root has to be used.

This process of making the kernel image takes quite a bit of time so just go off and do other things while you wait so you won't get bored. :mrgreen:

After the kernel image has been created, you will see it if you look in the /usr/src folder. You install this newly compiled and created kernel image by typing cd /usr/src then dpkg -i kernel-image-2.6.7_Custom.1_i386.deb and it will be installed for you. You can su and type root password if you get errors trying to use dpkg -i as user at this stage.

After you have installed your new kernel image, you will need to edit grub. So in your terminal if you're not already root then su to become it. Then type kwrite /boot/grub/menu.lst and kwrite will come up (wait for it) with that file loaded in it. Now it is easy to set up your kernel to boot in grub. Just copy the whole paragraph that has your other 2.6x kernel boot info, skip a line under it and then paste old kernel info as new one below it. Then you have to change the number from 2.6.x(4 or 5) to 2.6.7 in two places. You will see where if you look. Do not delete your other kernel boot options yet so that if you have problems booting into the new 2.6.7 kernel, you can always reboot and go back to your other 2.6x kernel instead. Save the file and then reboot. Now you can try out the new kernel by choosing it from your boot menu.

I used the following guide to help me do all this but I changed a few things in my guide above because some steps are not covered in the guide I used here -> http://www.desktop-linux.net/debkernel.htm

Just a note - The reason you should use 2.6.7 kernel over any other 2.6 series kernel is not only because it fixes some hardware issues but also because there is a security bug in the older 2.6 ones and 2.6.7 doesn't have that bug. The bug was reported on Linux news sites and on linux forums.

Just to add for newbies

Using the make oldconfig option saves your configurations from your most recent 2.6 series kernel and it saves all your Mepis related configurations too. Adding this so that you will not panic and wonder which config is being used when you use the make oldconfig option.

hi cblue, cheers for instruc

hi cblue,
cheers for instructions.
don't suppose new kernel works with mouse scroll wheel for you?
2.6.5 won't play whatever i do in xf86config-4..
cheers

I use a USB mouse

the logitech optical usb mouse and my wheel has always worked. If you have a ps/2 wheel mouse you have to use usb and ps/2 settings for it in Mepis System Center. Or edit your xf86config-4 file and set the protocol for your ps/2 mouse from auto to imps/2.

Two more programs you will need!

Nevermind about this post it was incorrect info. Smiling

hi cblue, i'm on an optical

hi cblue,
i'm on an optical logitech ps/2, but going through a kvm.
usb and ps2 are both set to imps/2 in xconf.
if i cat /dev/input/mice or cat /dev/input/mouse0 i get the same thing.
loads of output on mouse move, new line on scroll wheel click, nothing on scroll wheel scroll.
any chance of pasting your relevant xf86conf sections...

would really like to get wheel going,
cheers
pod

Okay

First can you try taking off your ps/2 from your system center mouse settings and only using the usb?

Here is my mouse stuff in xf86config-4 file:

Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
#InputDevice "PS/2 Mouse" "CorePointer"
InputDevice "USB Mouse" "CorePointer"
#InputDevice "Serial Mouse" "CorePointer"
EndSection

Section "InputDevice"
Identifier "PS/2 Mouse"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "false"
Option "Emulate3Timeout" "70"
Option "ZAxisMapping" "4 5"
Option "Buttons" "5"
EndSection

Section "InputDevice"
Identifier "USB Mouse"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Buttons" "5"
EndSection

Now I'm using the usb mouse one above but you can try your ps/2 with what I have above for mine but change auto to "ExplorerPS/2" and use just the ps/2 in your system center for your mouse. imps/2 seems to be replaced now with the "ExplorerPS/2". You could also try in the ps/2 settings above to change Emulate3Buttons to true instead of false. Trying out different settings may find your solution for getting the wheel to work.

been thru every combination i

been thru every combination i can think of now, still no joy Sad
weird thing is it worked on 2.4.x kernel.

You're welcome landene!

One other package you need to make sure you have before making your kernel image deb is called kernel-package. Sorry I missed this one earlier and just realized I forgot while doing an apt-get upgrade today.

You know what kernel you are running if you're using a boot manager and you have to choose which kernel to boot into. Also, you can find out in kde by clicking on the control panel icon and the first thing you will see in the window on the right side is your kernel and other information about your computer.

Hi, I just decided to give Me

Hi, I just decided to give Mepis a go again and so far so good. However I have found that it appears to be impossible to compile a kernel. On a raw non updated, non adjusted, non messed with in any way whatsoever install if I go to /usr/src and run the use-gcc-version script for either 2.4x or 2.6x kernels and if I then go to the respective kernel directory to try to build my kernel, when I run make menuconfig 9or makexconfig (as per the kernel compile instructions on this site) I just get hit by a load of garbage symbols. Please find a sample of these symbols printed below:

make oldconfig HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c:97:23: sys/types.h: No such file or directory scripts/basic/fixdep.c:98:22: sys/stat.h: No such file or directory scripts/basic/fixdep.c:99:22: sys/mman.h: No such file or directory scripts/basic/fixdep.c:100:20: unistd.h: No such file or directory scripts/basic/fixdep.c:101:19: fcntl.h: No such file or directory scripts/basic/fixdep.c:102:20: string.h: No such file or directory scripts/basic/fixdep.c:103:20: stdlib.h: No such file or directory scripts/basic/fixdep.c:104:19: stdio.h: No such file or directory In file included from /usr/lib/gcc-lib/i486-linux/3.3.4/include/syslimits.h:7, from /usr/lib/gcc-lib/i486-linux/3.3.4/include/limits.h:11, from scripts/basic/fixdep.c:105: /usr/lib/gcc-lib/i486-linux/3.3.4/include/limits.h:122:75: limits.h: No such file or directory scripts/basic/fixdep.c:106:19: ctype.h: No such file or directory scripts/basic/fixdep.c:107:24: netinet/in.h: No such file or directory scripts/basic/fixdep.c: In function `usage': scripts/basic/fixdep.c:121: warning: implicit declaration of function `fprintf' scripts/basic/fixdep.c:121: error: `stderr' undeclared (first use in this function) scripts/basic/fixdep.c:121: error: (Each undeclared identifier is reported only once scripts/basic/fixdep.c:121: error: for each function it appears in.) scripts/basic/fixdep.c:122: warning: implicit declaration of function `exit' scripts/basic/fixdep.c: In function `print_cmdline':

This is just a sample. Has anyone got any idea why i can't even start menuconfig, or xconfig, or even make makeconfig?

I have all of the latest tools installed: binutils, coreutils, libncurses5, libncurses5-dev, fakeroot and module-init-tools. What else could I possibly need? Bare in mind as I said, that this is a new install of the latest RC4 of Mephis 2004.

What gives?

GJ

Did you install

Did you install kernel-package?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.