LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-06-2003, 09:21 AM   #1
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Rep: Reputation: 30
kernel compile


hey guys,

I compiled a custom kernel to enable usb and parallel printing support on my laptop. I ran into the same problem I have always run into when compiling a custom kernel. When booting it can't find any modules, and rightly so. I took a look at "/lib/modules/2.4.20/kernel/drivers" and I only see two dirs "input" and "net", while the 2.4.18 (original kernel) drivers dir contains a ton of files/dirs. Should I just copy over the modules from the old kernel's dir to the new one? What did I do wrong? I did do the "make modules" and "make modules_install", and they appeared to have no errors. Oh, and I'm running Slackware 8.1 on a Thinkpad X23

edit: I also tried "depmod -a" and rebooted, but that didn't change anything.

Last edited by ixion; 01-06-2003 at 09:26 AM.
 
Old 01-06-2003, 09:50 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
If you can provide your exact steps when compiling your kernel it would probably help us determine what the problem could be, you could be as simple as missing a step.
 
Old 01-06-2003, 09:59 AM   #3
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
ok, sorry I didn't include that first. Here goes:

I login as root and do the following:

"cd /root"
"wget http://www.kernel.org/pub/linux/kern...2.4.20.tar.bz2"
"cp linux-2.4.20.tar.bz2 /usr/src"
"cd /usr/src"
"rm linux" <-- removed the symlink
"tar -jxvf linux-2.4.20.tar.bz2"
"ln -s linux-2.4.20 linux"
"cd linux"
"make menuconfig"
"make dep && make clean bzImage modules modules_install"
"cp /usr/src/linux/arch/i386/boot/bzImage /boot"
"cd /etc"
"pico lilo.conf" <-- I added an entry in LILO for the new kernel
"lilo"
"Ctrl+Alt+Del"

the lilo.conf entry looks like this:

# Linux bootable partition config begins
image = /boot/bzImage
root = /dev/hda5
label = Slack20
read-only
# Linux bootable partition config ends
 
Old 01-06-2003, 10:53 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Here are the steps I do when compiling my kernel in Slack after unpacking the source:

Edit lilo.conf to make a backup up my previous kernel like this by adding:

image = /vmlinuz.old
root = /dev/hdX
label = Linux-old
read-only


make menuconfig
(save)
make dep
make clean
make bzImage
make install
make modules
make modules_install


Try that and see what it doesn't come up with.
 
Old 01-06-2003, 11:30 AM   #5
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
I tried your suggestion, once with 'make install' at the time you suggested and once with running it last, but get the same problem.

One thing that I've noticed is when I do the 'make modules' and 'make modules_install' I see ALOT of 'Nothing to do'. In fact it seems EVERY entry says that. Could that be the root of my problem?

I have hardly anything enabled as modules. Almost everything is loaded through the kernel.
 
Old 01-06-2003, 11:43 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
What modules are you needing ? If your not providing any or very little modules, then there most likely won't be any in those directories then you mentioned.
Just compile what you need and you should be good to go.
 
Old 01-06-2003, 11:56 AM   #7
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
I've only enabled (in make menuconfig) what I need (usb printing support, ati radeon, etc.). Things that I didn't understand I left alone without messing with them.

the only problem I can see is that 'modprobe' can't find any modules I need to load. The '/lib/modules/2.4.20/kernel/drivers' directory doesn't contain much of anything. I must be doing something wrong to not get the modules needed over there. Should I try enabling as much as possible as modules instead of loading them through the kernel? Could the kernel be too big? There must be a step I'm missing to not have the modules copied over correctly. Are there some essential things that make menuconfig should have enabled?
 
Old 01-06-2003, 12:25 PM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Try compiling then as modules instead of built-in and see what happens.

What are you typing when your trying modprobe ? Have you tried the full path, /sbin/modprobe [module name] ?
 
Old 01-06-2003, 12:42 PM   #9
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
I tried loading more things as modules instead of kernel-loading, and I unfortunately have the same result. I tried '/sbin/modprobe [module]', but it also comes up with 'Can't locate module'. I am at my wit's end. Is there anywhere that I can get pre-configured kernel config files? I must not be configuring something correctly. Any ideas on what's going on? It has to be something simple.
 
Old 01-06-2003, 12:47 PM   #10
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
When your exiting out of make menuconfig, it does prompt to save correct ? Have you tried to save it and load it that way maybe ? Its got to be something in the make menuconfig, have you tried maybe make xconfig to bring it up graphically to configure ?
 
Old 01-07-2003, 04:44 PM   #11
ixion
Member
 
Registered: Dec 2002
Location: USA
Distribution: SuSE, CentOS, Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
well, guess what my problem was... I had no problem! The reason I kept seeing 'unable to load module' was because it was still booting with the old 'rc.modules' file where I had uncommented alot of lines to load modules. The new kernel had these things loaded into it, so the 'make modules/modules_install' didn't copy the modules over, resulting in modprobe not being able to find the modules in '/lib/modules/...'

I feel like such an idiot. Thank you so much for all your help, and I have learned a great deal. I am terribly sorry for the confusion and my oversight.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
upgraded kernel, won't let me compile kernel once Suspend2 patches are applied microsoft/linux Linux - Laptop and Netbook 3 10-02-2005 02:37 PM
I want to compile 2.6 kernel and keep everything from 2.4 intact (dual kernel system) sina_kish Linux - Software 7 02-02-2005 09:01 AM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration