LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-19-2009, 08:20 PM   #1
Rick B.
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Rep: Reputation: 0
Why does mkinitrd report missing modules when they're already compiled into kernel?


I am trying to compile all of my drivers into the kernel. I have a few that I think only run as modules (maybe there's a way to compile them in?) but mkinitrd keeps giving me errors like this:

WARNING: no dependencies for kernel module 'ahci' found.
FATAL: Module sd_mod not found.

That's to be expected, of course, because it's already compiled into the kernel! Futhermore, I modified the following line in /etc/sysconfig/kernel:

INITRD_MODULES=""

There was some stuff there like "processor" "thermal" "fan" etc. but those drives are compiled in as well. Thankfully I didn't get any errors about those once I removed them from this line.

Where else would mkinitrd be getting this list of stuff that it thinks are supposed to be modules? If I modified the above line, why doesn't it know that it's not supposed to be expecting these modules?
 
Old 07-20-2009, 12:58 PM   #2
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
What version of Linux are you on?
 
Old 07-20-2009, 05:30 PM   #3
Rick B.
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fpmurphy View Post
What version of Linux are you on?
openSUSE 11.1 -- the kernel source is 2.6.30.1.

Is this a common problem?
 
Old 07-20-2009, 05:36 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Why are you using an initrd at all if you are compiling your own kernel ?. It's only required to enable the mount of the root filesystem. If you have all that compiled in, the rest of the module loading (if any) should be managed by the initscripts.
 
Old 07-20-2009, 06:58 PM   #5
Rick B.
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Why are you using an initrd at all if you are compiling your own kernel ?. It's only required to enable the mount of the root filesystem. If you have all that compiled in, the rest of the module loading (if any) should be managed by the initscripts.
"make install" is doing it automatically. So you're saying I don't even need an initrd? What about mapping devices and all that? I seem to recall there was an issue with udev if you didn't use the ramdisk.

Sorry if this doesn't make sense, but I'm still learning! Thanks in advance!
 
Old 07-20-2009, 07:16 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
udev has been in the mainline for ages. The only time you should need an initrd for a custom kernel is if you had (really) esoteric disk/controller hardware, or chose to use UUID or LABEL on the root parameter on the kernel line of your loader. I choose to avoid the latter for my own sanity.
I have never used "make install" - I manage that task myself given I use several different distros.
 
Old 07-20-2009, 07:24 PM   #7
Rick B.
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
udev has been in the mainline for ages. The only time you should need an initrd for a custom kernel is if you had (really) esoteric disk/controller hardware, or chose to use UUID or LABEL on the root parameter on the kernel line of your loader. I choose to avoid the latter for my own sanity.
I have never used "make install" - I manage that task myself given I use several different distros.
I typically use the device path, i.e. /dev/sda1. It's actually much easier for me to look at it that way, since I refer to the disk this way with pretty much any other task (partitioning, formatting etc).

I use "make install" because it updates the boot loader automatically for me. I haven't really experimented with that. However I guess I can just remove the reference to the initrd in the bootloader, right? I am using GRUB:

in /boot/grub/menu.lst:

root (hd0,1)
kernel /boot/vmlinuz-2.6.30.1-9-default root=/dev/sda2
#initrd /boot/initrd-2.6.30.1-9-default

Just comment out the initrd line, yeah? Or are there other things I need to do?
 
Old 07-20-2009, 08:38 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Good start - test it first from the boot menu itself using command mode. That way if it all goes to hell, you haven't compromised your ability to boot.
 
Old 07-20-2009, 10:44 PM   #9
Rick B.
LQ Newbie
 
Registered: Jul 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Good start - test it first from the boot menu itself using command mode. That way if it all goes to hell, you haven't compromised your ability to boot.
Ok, now we're getting somewhere. I commented out the initrd line in menu.lst, and everything booted OK. Module loading still works -- I have driver modules for some of the hardware and it's still detected. However, I get these lines in /var/log/boot.msg:

Inspecting /boot/System.map-2.6.30.1-9-default
Cannot find map file.
No module symbols loaded - kernel modules not enabled.

Cannot build symbol table - disabling symbol lookups

Do I need the System.map* file?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to see all the stuff that is compiled into the kernel or modules? khaos83 Red Hat 1 01-17-2008 12:43 AM
custom compiled kernel 2.6.21.1 and rc.modules matters Slackware 14 05-18-2007 08:56 AM
mkinitrd problem: missing modules cold Linux - Kernel 1 03-21-2007 04:17 PM
kernel compiled, but modules not found? mikedeatworld Slackware 2 11-29-2006 06:54 PM
kernel compiled. starts up. no modules, and etc. RHLinuxGUY Slackware 5 04-14-2005 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:52 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