Why does mkinitrd report missing modules when they're already compiled into kernel?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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!
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.
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:
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.