VectorLinux

The nuts and bolts => Kernel => Topic started by: Neopablo on October 03, 2008, 07:43:47 am

Title: Recompiling Standard Kernel
Post by: Neopablo on October 03, 2008, 07:43:47 am
Hi! First of all, i´m not English speaker, so, sorry for the posible great mistakes made during my post.
Second, i consider myself a newbie trying to get out of the label :-).
Third, i´m a Gentoo user, giving it a try to Vector: it´s awesome, it´s  a great job, congs to the developers!!
Fourth: In gento, when i changed something in the kernel configuration, i just need to do:
make menuconfig
make && make modules_install
cp arch/i386/boot/bzImage /(wherever kernel image was ready to boot)
I did the same in Vector, yes, i know it has all you need to keep an old system like mine (Pentium III 1Ghz, 288 mb ram, Riva TNT2 model 64 32 mb, Mb Soyo 6vba-133) working on the fly, but i was intended to do some "fine tunes" to the system, for example, changing the processor type (it was detected wrong) to my pentium III. I did so, did what i used to do to boot the new kernel, but there are things that don´t work anymore. I get some "invalid module format" errors, and fuse refused (kinda redundance!) to load. I think that recompiling a kernel in Vector has some more things to do than just booting the new image. I´m not changing my kernel, not upgrading, just want to know what are the commands to enter my kernel, change what i need to change, recompile, and boot the new one without "invalid module format" errors, making imposible even install the NVIDIA drivers.
P.D.: when copying the new kernel image, i just name it "kernel", and point lilo to kernel, instead of vmlinuz. But after the wrong boot, obviously trying to boot the old vmlinuz, doesn´t work. If i try to boot the old kernel, what should i do?
   Sorry for bothering you, thanks in advance for your attention!!
Title: Re: Recompiling Standard Kernel
Post by: bigpaws on October 03, 2008, 09:09:15 am
First there is a copy of the kernel config in /boot

Start with that and then modify as needed. Then
make && make modules && make modules_install
&& cp arch/i386/boot/bzImage /boot && cp
System.Map /Boot/System.map-<kernel name>

Then edit /etc/lilo add the kernel, use lilo -v to
add the entry and reboot.

I am sure others go about this in another way. This
is the process that has always worked for me.

If you are using the current kernel make sure you
have the kernel sources (It appears you know that).

Bigpaws
Title: Re: Recompiling Standard Kernel
Post by: Neopablo on October 03, 2008, 09:25:36 am
Thanks for the fast answer! Giving a try and posting back, thank you once again!

Title: Re: Recompiling Standard Kernel
Post by: Neopablo on October 04, 2008, 05:53:15 am
Ok, got it working!! Thank you very much for the help. I just have one more trouble after recompiling, that didn´t happen before. I got a wireless usb card (encore). Ndiswrapper detects it, says driver loades, hard detected, then, i do ndiswrapper -m, and it creates the module in /etc/modprobe.d/ndiswrapper, and adds the "alias wlan0 ndiswrapper", but after doing "modprobe ndiswrapper", i get: fatal: ndiswrapper module not found. Before modifying kernel, all was good, so i think its something related to kernel, or modules. Anyway, i solved my first problem, and got all modules loades, but in the rc.S script, the line related to hardware initialization, says FAILED. Would it have something to do with my ndiswrapper problem? Still, i´ll try to do some more research in my pc, to see if i realize what´s going on. Thank you very much!!
Title: Re: Recompiling Standard Kernel
Post by: caitlyn on October 04, 2008, 07:26:50 am
ndiswrapper is kernel-specific.  You do have to recompile it for a new kernel.  That's normal.
Title: Re: Recompiling Standard Kernel
Post by: bigpaws on October 04, 2008, 07:34:54 am
Ndswrapper is kernel specific. You will need to uninstall
ndiswrapper and then install from scratch.

Make sure that you have a copy of /etc/ndiswrapper
that directory has the card inf in it.

Here is the site for ndiswrapper:

http://sourceforge.net/projects/ndiswrapper/ (http://sourceforge.net/projects/ndiswrapper/)

Since ndiswrapper site has moved so has the excellent
documentation.

After you download it there is an INSTALL doc, follow that
then make sure all the card information is in /etc/ndiswrapper
from the previous install, then follow the ndiswrapper -l and
ndiswrapper -m.

Post back if you have any more problems in a new thread. This
will help with searching the forum.

Bigpaws

Bigpaws
Title: Re: Recompiling Standard Kernel
Post by: Neopablo on October 04, 2008, 05:10:19 pm
Ok, about the kernel-specific issue, i want to remember you i wasn´t installing  new one, just recompiling the one i have, and it was working ok, the problem came when i modified some options and recompiled. Anyway, i´ll download the latest version of ndiswrapper from sourceforge and give it a try, thanks for the replys!!!
Title: Re: Recompiling Standard Kernel
Post by: The Headacher on October 05, 2008, 06:32:45 am
The kernel is the compiled code. It has changed. Just because it was built from the same sourcecode doesn't mean it's the same kernel. That was the point of recompiling it in the first place wasn't it?
Title: Re: Recompiling Standard Kernel (solved)
Post by: Neopablo on October 21, 2008, 06:05:19 am
Sorry for late!! It worked perfectly. Thank you very much for your help. I have now a diferent trouble, but it goes in other section, thanks again!!