LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-16-2005, 03:47 AM   #1
sina_kish
LQ Newbie
 
Registered: Jan 2005
Location: Sweden
Distribution: SuSE
Posts: 15

Rep: Reputation: 0
Smile 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 :-)

Last edited by sina_kish; 01-16-2005 at 03:49 AM.
 
Old 01-16-2005, 03:49 AM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
you can have both
 
Old 01-16-2005, 03:56 AM   #3
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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.

Cool
 
Old 01-17-2005, 01:52 AM   #4
sina_kish
LQ Newbie
 
Registered: Jan 2005
Location: Sweden
Distribution: SuSE
Posts: 15

Original Poster
Rep: Reputation: 0
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
 
Old 01-17-2005, 01:59 AM   #5
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
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.

Cool
 
Old 01-24-2005, 03:35 AM   #6
sina_kish
LQ Newbie
 
Registered: Jan 2005
Location: Sweden
Distribution: SuSE
Posts: 15

Original Poster
Rep: Reputation: 0
Wink 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
 
Old 01-24-2005, 05:19 AM   #7
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
mkinitrd was obsolete or so I thought
I jsut compile them with:
make mrproper
make gconfig
make
make modules
make modules-install
make install
 
Old 02-02-2005, 09:01 AM   #8
sina_kish
LQ Newbie
 
Registered: Jan 2005
Location: Sweden
Distribution: SuSE
Posts: 15

Original Poster
Rep: Reputation: 0
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

Last edited by sina_kish; 02-02-2005 at 09:07 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile kernel: System.map? iaMMai Linux - Newbie 9 05-19-2005 08:05 AM
Need to compile a Linux kernel so that it can use the FATX file system... Nebetsu Linux - Software 9 04-18-2005 11:10 AM
Slow System After 2.6 Kernel Compile/Install isoFlux Slackware 3 04-12-2005 03:41 PM
Help! I messed up my system with a kernel compile chris26 Slackware 6 11-28-2003 04:47 PM
Dual Booting Slack with a new kernel compile? biledaemon Slackware 4 11-16-2003 11:23 AM


All times are GMT -5. The time now is 07:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration