Guide to 2.6 kernel upgrade/recompile
I successfully upgraded to the 2.6.7 kernel and then patched it to include the Debian Logo at boot up and Win4Lin support. I ran into some issues that took some time to figure out, so I thought I'd post my upgrade path here in the event it may help anyone else. I was using kernel 2.4.26 initially with the nvidia display driver. Here are the steps to take:
1. Install a 2.6 kernel using apt-get: Code:
apt-get -t unstable install kernel-image-2.6.7-1-386 3. Make sure that the kernel is listed in either /boot/grub/menu.lst or /etc/lilo.conf depending on which bootloader you use. Note that Debian uses initrd, so you have to include the kernel's initrd or it won't boot. I use grub, and the entry looks something like: Quote:
Quote:
Code:
mkdir /sys 5. For re-compiling, it is important to use Debian kernel sources, because they have cramfs patches that allow the initrd to work. Install kernel-source and the debian boot logo: Code:
apt-get -t unstable install kernel-source-2.6.7 kernel-patch-debianlogo 6. Unpack kernel-source and create symbolic link to /usr/src/linux: Code:
cd /usr/src Code:
cd /usr/src/kernel-patches/diffs/debianlogo Code:
cd /usr/src/linux Code:
cd /usr/src/linux Quote:
Quote:
10. Compile and install the kernel: Code:
make-kpkg clean 11. Finally, make an entry for the new kernel in your boot loader. Dpkg should do this automatically, but you should check everything to be sure. The entry for Grub in menu.lst would be something like: Code:
title Linux, 2.6.7 NOTE: You may need to add "acpi=off" to the kernel line if you experience system freezes or shutdowns. 12. Reboot with the new kernel. You should see the Debian logo at the top of the screen and nice small fonts during boot up. You should also now be able to install Win4Lin from Netraverse to run legacy windows applications. You will have to re-install the nvidia display driver. Go to www.nvidia.com, download the latest driver and follow the directions. After it installs, change the driver listed in /etc/X11/XF86Config-4 from "nv" back to "nvidia". I hope this helps others. I spent a lot of time over the weekend figuring this out. Please let me know if there are mistakes above. -Matt |
yep!
|
Well, I don't know if that is yep! it helped you, or yep! it is full of mistakes. If the former, I'm glad to hear it :cool: If the latter, I'm very sorry :cry:
|
Nice one. Thanks.
|
it was quite helpful. thanks!
|
I just succesfully upgraded my kernel following your instructions to the letter.
Perfect! thanks bud! |
You may want to edit and include fakeroot in front of the lines.
Code:
fakeroot make-kpkg clean |
Please help me. I'll give you my first born...ok I won't but I'll give you respect
I'm trying to upgrade my kernel from 2.4.25 to 2.6.6 (so very close to the same upgrade). I installed the debian kernel image, source, and headers, and it boots up alright but when I get to my bootloader my USB keyboard won't respond, and my USB mouse won't respond. If I plug in a PS/2 keyboard that works, but a PS/2 mouse still won't work. Its very frustrating and I don't know how to fix it. I tried adding the two lines you said in your guide above to /etc/modules, but that didn't help. What do I need to do to get it working? I've been (slowly) trying to upgrade my kernel for almost two weeks and I'm getting rather frustrated with it right now. Please give me divine guidance ;)
PS: When I last tried to boot it up a couple hours ago, I think I saw it display something about a couple mouse modules (like /dev/mouse maybe?) not being found. I didn't get a clear shot at it though because the boot screen goes by so fast. But why the heck wouldn't mouse modules be compiled into the debian packaged kernel in the first place? :confused: |
r00ts, I stumbled upon this post:http://lists.debian.org/debian-power.../msg00480.html It seems you need modules ohci-hcd and usbhid for the usbmouse to work. I just checked the kernel configuration from debian and usbhid and ohci-hcd are built as modules. Try adding them to /etc/modules and see if that works. I can't test it myself because I don't have usb input devices.
I'm glad to hear from others that my post has helped with some things. To happytux: I couldn't get fakeroot to work properly. Granted, I didn't try very hard, but I added myself to the "src" group, and then tried running "fakeroot make-kpkg clean" as a user and it told me I didn't have permission. I think the problem was that my /usr/src/linux directory has the group "root" not "src". In any event, I just became root and continued without fakeroot. The documentation here: http://newbiedoc.sourceforge.net/system/kernel-pkg.html suggests using fakeroot too, but I didn't take the time to figure out why it wasn't working for me. |
I tried adding those two modules (as well as usbmouse and usbkbd) but it still didn't work. :cry: I also found another post that said to try adding in a couple other modules, but those failed as well. I'm about to just uninstall this kernel and do a re-compile from scratch because I'm getting nowhere fast. Thanks for trying to help though.
|
Ok, so I scratched my 2.6.6 kernel installation and followed your instructions for the 2.6.7 kernel. I got as far as step #4 before something went wrong (new record :)). It's really weird, because it looks like everything is working ok. The kernel boots ok, startx works and I get a graphical login prompt. My USB mouse and keyboard actually work. But after I login and my session finishes initialization, I'll have about 10 seconds before something very very bad happens. I've tried booting it twice and here's what happened each time:
1) Machine froze completely. My monitor displayed a "no signal found" and I couldn't do a damn thing except turn off the computer and turn it back on. 2) Machine automatically restarts without warning. Does anyone have any clue as to what could be causing this? The only thing I have edited myself is my /etc/modules file below. Code:
# /etc/modules: kernel modules to load at boot time. |
I would suggest commenting out the USB modules and seeing if it does it again. If your keyboard and mouse don't work, try just uncommenting "usbhid" and see if that works. I think the mouse and keyboard only need the usb-human input device (usbhid) to work. The usbmouse and usbkbd drivers are probably not needed. It is possible that some of the other drivers are conflicting, but I'm not sure about that.
|
I tried commenting out things so my /etc/modules file looks like this:
Code:
ide-cd On another note I have a question about kernel modules. Do both my 2.4.25 kernel and my 2.6.7 kernel look to /etc/modules to find out what modules to load when booting the kernel? I thought that they would have different files since each kernel may need different modules (or maybe modules is something new to 2.6.x kernels?). Also is there a way to find out what modules I have installed and other detailed information for a specific kernel? Thanks for your help. |
Well, glad that the mouse still works. It may be an acpi problem. The 2.6 kernel uses acpi for power management features and the 2.4 kernel used apm (although you could compile acpi into it).
Try adding "acpi=off" on your kernel line in grub. That boot option should prevent acpi from being loaded. |
Hah! It works it works! Thank you so much m_yates!!! I'm so pumped WOOHOOOO!!!! I am in your debt :D
|
All times are GMT -5. The time now is 07:18 AM. |