LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why does mkinitrd report missing modules when they're already compiled into kernel? (http://www.linuxquestions.org/questions/linux-newbie-8/why-does-mkinitrd-report-missing-modules-when-theyre-already-compiled-into-kernel-741270/)

Rick B. 07-19-2009 09:20 PM

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?

fpmurphy 07-20-2009 01:58 PM

What version of Linux are you on?

Rick B. 07-20-2009 06:30 PM

Quote:

Originally Posted by fpmurphy (Post 3614178)
What version of Linux are you on?

openSUSE 11.1 -- the kernel source is 2.6.30.1.

Is this a common problem?

syg00 07-20-2009 06:36 PM

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.

Rick B. 07-20-2009 07:58 PM

Quote:

Originally Posted by syg00 (Post 3614427)
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!

syg00 07-20-2009 08:16 PM

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.

Rick B. 07-20-2009 08:24 PM

Quote:

Originally Posted by syg00 (Post 3614493)
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?

syg00 07-20-2009 09:38 PM

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.

Rick B. 07-20-2009 11:44 PM

Quote:

Originally Posted by syg00 (Post 3614559)
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?


All times are GMT -5. The time now is 08:19 PM.