-   Linux - Software (
-   -   I want to compile 2.6 kernel and keep everything from 2.4 intact (dual kernel system) (

sina_kish 01-16-2005 03:47 AM

I want to compile 2.6 kernel and keep everything from 2.4 intact (dual kernel system)
Hi there !
I'm relatively new to kernel compile issue . For the time being, my only question is that wether it is possible to have the 2.4 and 2.6 kernels toghether in a system and make it dual kernel or not. I'm just worried about the 2.4 libraries and I know that 2.4 kernel itself is an image file located in /boot ( eg vmlinuz or bzImage ) .
Will 2.6 libraries overwrite 2.4's ?

Thank you :-)

__J 01-16-2005 03:49 AM

you can have both

MasterC 01-16-2005 03:56 AM

To expand a bit:

Your modules/drivers go into a sub directory in /lib/modules/<kernel version>

As long as <kernel version> is not a duplicate (2.4.22 and 2.4.22, whereas 2.4.22 and 2.4.23 are different) you can have as many as you'd like. And with kernel custom subversioning (2.6 feature? or a patch?) you can even have kernels of the same version exist, with the tweakings you prefer.


sina_kish 01-17-2005 01:52 AM

kernel 2.6 modules compile error
Thank you for your info.
That's right, I was able to figure it out But encountered a new problem in my compilation process.

When I tried to compile the modules ( eg : $> make modules ) I received an error somthing like this : no rules defined to compile /net/ipv4/netfilters/ipt_make.c required for ipt_make.o .

you know, something is wrong with my .config or an interior make file. But I haven't tampered with anything. I have even cleared the option to compile netfilters ( or net packets ; don't remember ) totally, but it tries to compile it and the error occures , so make stops.

I'm know downloading 2.6.10 , maybe it would work for me :-)

Any Idea or suggestions ??

Thank you

MasterC 01-17-2005 01:59 AM

A make mrproper, and a make clean, and a "save configuration options" should certainly clear out anything. Could be a bug in the kernel you are using, a vanilla 2.6.10 would be the way I'd turn as well.


sina_kish 01-24-2005 03:35 AM

Compilation Successfull ! but ...
Hi again
I downloaded 2.6.10 and compiled it and all the modules successfully.
after copying the Image to /boot and making initrd, ( mkinitrd initrd-2.6.10 2.6.10 )
and editing the grub config file ( /boot/grub/menu.lst ) I restarted the system and booted. But recieved a
kernel panic error something like : error syncing, INIT not found . try passing init= to the kernel.
I googled it and someone somewhere suggeted that ignore the line "init = ..." in menu.lst so that the system boots without initrd image file. I did so and the kernel loaded and my system was up and running, but without support for EXT3 , and many other things that I compiled as LKM. seems that module loading is also disabled.

I recompiled the kernel with support for EXT3 inside the kernel, hoping that the problem would be solved and the system will be able to read /boot and load initrd ( my /boot partition is EXT3 ) .
After rebooting with new kernel, the problem still persisted. I mean, if I keep the line for "init=..." kernel will panic
and if I comment it out, kernel will load still saying EXT3 is not supported. Still unable to load and use modules

BTW, I downloaded and installed latest modutils package.

Your help and advise is most welcome in advance

scuzzman 01-24-2005 05:19 AM

mkinitrd was obsolete or so I thought
I jsut compile them with:
make mrproper
make gconfig
make modules
make modules-install
make install

sina_kish 02-02-2005 09:01 AM

Module Autoloading problem
Hi every body!

I was finally able to successfully compile the kernel and modules. :)
As I wrote before, soon after kernel loads in my system it panics and
says "initrd not found". scuzzman said maybe mkinitrd is obsolete or
that the "initrd" image file itself has a problem. I commented out the line
"initrd /initrd-2.6.10.img" in /boot/grub/menu.lst and system booted.

I have figured out the problem! as the documentaion file for initrd, "inird.txt"
in Linux Source code says:

"... kernel has to be compiled with RAM disk support and with
support for the initial RAM disk enabled."

To my much surprise, in the default .config file, support for RAM disk is
not set! So newbies like me have to get confused enough before they pull
it off.

Now my new kernel is working fine, but I have a problem.
I have compiled the kernel with module autoloadig support
( eg with the line CONFIG_MODULES=y in .config file ) .
I have also installed module-init-tools-3.0. but my kernel is unable
to load the required modules when necessary and I have to manually
load a module with "modprobe". To give you some useful info, the file
/proc/sys/kernel/modprobe contains : "/bin/true". but according to
"Linux Loadable Kernel Module HOWTO" it should contain /sbin/modprobe .
(This file is used by kernel to find and run the program to load the modules)
When I replace the contents of modprobe with "/sbin/modprobe" , autoloading
starts to work till the system is rebooted.

Does anybody have an idea why?
I would appreciate any comment or suggestion.

BTW, It seems that the LKMs in 2.6 series have the prefix ".ko" instead
of the old ".o" one. Am I correct ?

Thank you

All times are GMT -5. The time now is 04:00 PM.