Click to See Complete Forum and Search --> : How to do a kernel upgrade?


M0E
05-12-2006, 02:08 PM
Hey guys... I know there is a thread here about a kernel upgrade, but it still doesn't answer some of my questions...

I'm currently running 2.6.13 not many customizations or special modules running... I'd like to know this:
If I wanted to upgrade to 2.6.17... Is there any easy way to do this? and can someone explain how patching works, please

I know in Linux you're not suppossed to fix what ain't broken, but personally I like to be on top the new relases
(any help is greatly appreciated by those of us coming from the m!cr0$0ft market (who are used to constant upgrading))

je_fro
05-12-2006, 02:22 PM
Okay, for a fellow H-Town homey here goes....

Forget patching, just download the full sources from kernel.org (the F link) - it'll be about 30MB.

move it to /usr/src
"ls -l" to see where your current "linux" symlink is pointing, for me it shows:lrwxrwxrwx 1 root root 22 May 10 01:33 linux -> linux-2.6.16-gentoo-r7
drwxr-xr-x 20 root root 1400 May 7 19:20 linux-2.6.15-gentoo-r7
drwxr-xr-x 20 root root 1424 May 10 02:42 linux-2.6.16-gentoo-r7

so I have a symlink "linux" pointing to "linux-2.6.16-gentoo-r7".
So, if you have an old symlink, "rm linux" and "ln -s linux-2.6.17 linux" to make the new one.
Your working .config (the kernel configuration file generated by "make menuconfig") is a good place to start configuring your new kernel...I copy my old config to the new linux source dir like: cd linux
cp ../linux-old-version/.config .
make oldconfig

When you do "make oldconfig" it will go through the .config you just added and ask you (y,n,m) what new features you want to include. Most of this is for specialized hardware that I don't have, so I say N to almost all of it. (In the brand new kernels >=2.6.16 iptables is split up, so you have to include a new section)
When that's done, do "make bzImage modules modules_install" to build the kernel and install the modules. (everybody does this differently) Then you cp your new kernel to /boot where grub can find it: cp arch/x86/boot/bzImage /boot/bzImage-2.6.17

Then you edit /boot/grub/grub.conf to include a new paragraph for your new kernel. I'd just copy the old paragraph and paste it above all others, and change the kernel it points to, to be your new kernel, bzImage-2.6.17.
Hope that helps...and see you at the Art Car Parade :D
<edit>If you're using mandrake or redhat or some distro that relies on a patched kernel, this will not work, as the distro expects a distro-specific kernel.</edit>

M0E
05-12-2006, 02:36 PM
mmm... although I have no idea what a symlink is or what ls -l or ln -s means or does the process doesn't sound so hard....
In my case, I use Vector Linux, which is packaged with LILO... would editing /etc/lilo.conf be enough, or do I need to do something in /boot also?
Let me ask you this homeboy, I connect to the net via pppoe (running rppoe 1.8) after installing a new kernel, would I have to reinstall/configure pppoe?

je_fro
05-12-2006, 02:42 PM
you need to understand what a symlink is, and what those commands do. "man ln" or "man ls" or "man anycommandyoudontunderstand" for details...
With lilo, you need to run "lilo" when you're done.
http://www.linuxchix.org/content/courses/kernel_hacking/lesson4
<edit> I don't use lilo, so I'm not 100% on what the current state of affairs is....you'll want to do a google search: http://www.google.com/linux </edit>

M0E
05-12-2006, 02:46 PM
Ok... question about the man pages though... You know when you do for instance man cp ... it shows all the details like you said.. well at the end, when it reaches the end of the man pages, how do I get out of there and back to the CLI? 'cuz that bugs the living crap out of me

je_fro
05-12-2006, 02:54 PM
you hit "q" to exit a manpage

M0E
05-12-2006, 02:56 PM
Ok.. It's good to know.. 'cuz every time I've gone into the manpages I can't exit.. and I have to ctrl+alt+backspace (LOL) Thanks

StarKnight83
05-12-2006, 03:18 PM
adding an entry to your lilo.conf is very easy just follow the format of the current entry (leave that one alone - you might need it if something goes wrong) after which you save and run "lilo" (as root)

happybunny
05-12-2006, 10:27 PM
je_fro missed a step i think

tar -jxfv linux.x.x.x.x.x.tar.bz once you've moved it to /usr/src/

also...there is no F for 2.6.17.....does this mean it's only availible via a patch?

je_fro
05-12-2006, 10:30 PM
yeah, you're right...there's no Full sources link for .17 yet. I'd just use 16....

M0E
05-12-2006, 11:32 PM
I guess I could keep the advice handy for future refence!