Click to See Complete Forum and Search --> : er...ive GOT the kernel...now what?


NathanTwist
01-25-2002, 12:09 PM
i just downloaded the 2.4.17 kernel source, but compilation aside...what do i do with it? the documentatn says to try to keep it away from /usr/src, but linux.com says that would be the best place. so am i correct in saying:
download tar : extract to its own directory in /usr/src : config : make dep : make clean : make bzImage : make mod : make mod_install : replace vmlinux, lilo, etc : THEN can i delete all of my 2.2.16 - 22 stuff? or is some of that going to be used by the new kernel or anything else? i was kind of hoping i could jsut get rid of that entire directory so the only thing in tehre would be the new 2.4.17 directory.
TIA

kuber
01-25-2002, 12:28 PM
You probably want to keep your 2.2 kernel for a bit in case something fscks up w/ the new one.
Don't just replace the old kernel- have them like:
linux-2.2.**
linux-2.4.**
and have both in lilo.
Use the 2.4 for a bit to be sure it will work, and boot ;)

If you simply replace your old one and the new one doesn't boot due to something, you will have to get a boot disk and do a bunch of crap = hassle.

[ 25 January 2002: Message edited by: kuber ]

NathanTwist
01-25-2002, 12:40 PM
thats cool. but just out of curiosity, would there be any command needed to replace one with the other, or once 2.4 is installed could i simply go in and manually remove all of the contents of 2.2, then get rid of the directory ?

danrees
01-25-2002, 02:53 PM
You most likely have a directory /usr/src/linux-2.2.x or something, with a symlink /usr/src/linux -> /usr/src/linux-2.2.x. You can check this by typing:

cd /usr/src
ls -l

If /usr/src/linux is a symlink, you can simply "rm /usr/src/linux", and untar the new 2.4 kernel source to /usr/src/linux (it should do this automagically if you untar in the /usr/src directory).

Then compile the new kernel, install modules etc.

Depending on your distro, your old kernel is probably /boot/vmlinuz or something. Keep this here, and:

cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.17

Then edit lilo, making a copy of the old kernel config section, but changing the title to something like Linux-2.4 and obviously the kernel image location.

Rerun /sbin/lilo and test it out!

Strogian
01-25-2002, 06:26 PM
What about the libraries in /usr/src/linux?

danrees
01-25-2002, 08:06 PM
Well, assuming his new kernel works fine he won't be compiling any software with the old kernel - so what's the problem?

teeitup
01-25-2002, 10:20 PM
You should leave your source tree in place as long as you use the kernel.

Many programs require the compiled source tree to compile properly.

the point is you can unpack/store your kernel source anywhere you have space. /usr/src/linux should always be a symlink.
the kernel sources now unpack to a directory called linux. It makes sense to rename this directory to something more discriptive ie.
kernel-source-2.4.17 then link it to /usr/src/linux

This along with the LILO advice above will enable you the have multiple working kernels. This is useful as you tweak a kernel to fit your box.

Good Luck,