modprobe: FATAL: Could not load /lib/modules.../modules.dep

Hi,

I successfully recompile my kernel in order to have less modules to load. I can boot normally without any issue. But during the boot, in the very early display I got this kind of error message :
modprobe: FATAL: Could not load /lib/modules…/modules.dep

I could not log it because it seems to appear very early during the kernel loading process (nothing in dmesg, /var/log/boot.msg, /var/log/messages)
After I compiled and install my kernel (make; make modules_install; make install), I did force a “mkinitrd”

Searching in the internet, it seems like my initrd image don’t have the “/lib/modules…/modules.dep” file. I verified it but running :


mkdir /tmp/init
cd /tmp/init/
gunzip -c /boot/initrd-2.6.37.6-0.7-hpmini | cpio -i -d -H newc --no-absolute-filenames
ls /lib

But It have the /lib/modules tree in the Opensuse /boot/initrd-2.6.37.6-0.7-desktop

So why my initrd missing it ? Is it because I miss configure something with my kernel ? Can it be related with the INITRD_MODULES in the /etc/sysconfig/kernel ?

Thanks in advance.

Edit : my environment : up-to-date OpenSuse 11.4, kernel 2.6.37.6-0.7-hpmini i686

On 2011-10-25 14:26, mhtrinh wrote:
> I successfully recompile my kernel in order to have less modules to
> load.

Huh? The number of modules to load does not vary.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 10/25/2011 08:58 AM, Carlos E. R. wrote:
> On 2011-10-25 14:26, mhtrinh wrote:
>> I successfully recompile my kernel in order to have less modules to
>> load.
>
> Huh? The number of modules to load does not vary.

As Carlos said, the number of modules to load will not vary as the module is
loaded ONLY if the hardware exists.

I need to build my own kernels as I am a kernel developer. I generate my own
config so that I build only the modules I need to make the compilation process
go faster. Quite a different issue.

The file modules.dep is created by the command ‘sudo /sbin/depmod -a’, which is
normally part of the ‘make modules_install’. Why it fails on your system is a
question. Does the ‘make modules_install’ end with “DEPMOD <kernel_version>”?

Hi,

Sorry, I used the wrong terminology : I mean that I recompiled the kernel so that all my drivers are directly integrated in the kernel and not as modules hopping that it boot faster. Because in bootchart, modprobe take a lot of time. My opensuse boot in 50s while my WinXP SP3 boot in 30s so … The result : nothing change :frowning: but I know how to compile a kernel :slight_smile:

And yes, I have “DEPMOD 2.6.37.6-0.7-hpmini” at the end of “make modules_install”. The file “/lib/modules/2.6.37.6-0.7-hpmini/modules.dep” do exist.
But it is not found during the early boot process. As I understand : the error is because the file is not integrated in the inird …

Use

lsinitrd  /boot/initrd

or

lsinitrd -l /boot/initrd

to see what’s in there.

On 10/25/2011 02:16 PM, mhtrinh wrote:
>
> Hi,
>
> Sorry, I used the wrong terminology : I mean that I recompiled the
> kernel so that all my drivers are directly integrated in the kernel and
> not as modules hopping that it boot faster. Because in bootchart,
> modprobe take a lot of time. My opensuse boot in 50s while my WinXP SP3
> boot in 30s so … The result : nothing change :frowning: but I know how to
> compile a kernel :slight_smile:

OK, you save 20 s in booting XP, but you have to boot 6-8 times per day. When
I’m not testing new kernels or openSUSE releases, I usually boot about 1x per
week. My two non-development systems have been up for 18 and 28 days, respectively.

When you run 12.1, your openSUSE system will boot a lot faster due to the use of
systemd, not systemv.

I didn’t know such command exists !! Here what I have :


$ lsinitrd /boot/initrd-2.6.37.6-0.7-desktop | grep modules
lib/modules
lib/modules/2.6.37.6-0.7-desktop
lib/modules/2.6.37.6-0.7-desktop/modules.devname
lib/modules/2.6.37.6-0.7-desktop/modules.builtin.bin
lib/modules/2.6.37.6-0.7-desktop/modules.symbols.bin
lib/modules/2.6.37.6-0.7-desktop/modules.symbols
lib/modules/2.6.37.6-0.7-desktop/modules.softdep
lib/modules/2.6.37.6-0.7-desktop/modules.alias.bin
lib/modules/2.6.37.6-0.7-desktop/modules.alias
lib/modules/2.6.37.6-0.7-desktop/modules.dep.bin
lib/modules/2.6.37.6-0.7-desktop/modules.dep
lib/modules/2.6.37.6-0.7-desktop/modules.builtin
lib/modules/2.6.37.6-0.7-desktop/kernel
lib/modules/2.6.37.6-0.7-desktop/kernel/fs
lib/modules/2.6.37.6-0.7-desktop/kernel/fs/ext4
lib/modules/2.6.37.6-0.7-desktop/kernel/fs/ext4/ext4.ko
lib/modules/2.6.37.6-0.7-desktop/kernel/fs/jbd2
lib/modules/2.6.37.6-0.7-desktop/kernel/fs/jbd2/jbd2.ko
lib/modules/2.6.37.6-0.7-desktop/kernel/lib
lib/modules/2.6.37.6-0.7-desktop/kernel/lib/crc16.ko
lib/modules/2.6.37.6-0.7-desktop/kernel/drivers
lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/acpi
lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/acpi/fan.ko
lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/acpi/thermal.ko
lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/acpi/processor.ko
lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/thermal
lib/modules/2.6.37.6-0.7-desktop/kernel/drivers/thermal/thermal_sys.ko
etc/modprobe.d/10-unsupported-modules.conf
38984 blocks

$ lsinitrd /boot/initrd-2.6.37.6-0.7-hpmini | grep modules
37542 blocks
etc/modprobe.d/10-unsupported-modules.conf


So yeah, I don’t know why there is no /lib/modules in my initrd.

OK, you save 20 s in booting XP, but you have to boot 6-8 times per day. When
I’m not testing new kernels or openSUSE releases, I usually boot about 1x per
week. My two non-development systems have been up for 18 and 28 days, respectively.

When you run 12.1, your openSUSE system will boot a lot faster due to the use of
systemd, not systemv.

Yeah I know that it don’t worth at all but … I wanted to compile a kernel and optimize my notebook. Finally, I didn’t gain anything.

On 10/25/2011 04:46 PM, mhtrinh wrote:
> $ lsinitrd /boot/initrd-2.6.37.6-0.7-hpmini | grep modules
> 37542 blocks
> etc/modprobe.d/10-unsupported-modules.conf
>
>
> --------------------
>
>
> So yeah, I don’t know why there is no /lib/modules in my initrd.

Do you have any modules at all? That may be the reason that initrd has no
lib/modules.

I do have modules :


$ find /lib/modules/2.6.37.6-0.7-hpmini/
/lib/modules/2.6.37.6-0.7-hpmini/
/lib/modules/2.6.37.6-0.7-hpmini/modules.order
/lib/modules/2.6.37.6-0.7-hpmini/modules.alias
/lib/modules/2.6.37.6-0.7-hpmini/modules.alias.bin
/lib/modules/2.6.37.6-0.7-hpmini/modules.symbols.bin
/lib/modules/2.6.37.6-0.7-hpmini/modules.devname
/lib/modules/2.6.37.6-0.7-hpmini/source
/lib/modules/2.6.37.6-0.7-hpmini/modules.builtin.bin
/lib/modules/2.6.37.6-0.7-hpmini/kernel
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/fuse
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/fuse/fuse.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/ntfs
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/ntfs/ntfs.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/jbd
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/jbd/jbd.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/nls
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/nls/nls_utf8.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/ext3
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/ext3/ext3.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/autofs4
/lib/modules/2.6.37.6-0.7-hpmini/kernel/fs/autofs4/autofs4.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/Documentation
/lib/modules/2.6.37.6-0.7-hpmini/kernel/Documentation/filesystems
/lib/modules/2.6.37.6-0.7-hpmini/kernel/Documentation/filesystems/configfs
/lib/modules/2.6.37.6-0.7-hpmini/kernel/Documentation/filesystems/configfs/configfs_example_macros.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/Documentation/filesystems/configfs/configfs_example_explicit.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/Documentation/connector
/lib/modules/2.6.37.6-0.7-hpmini/kernel/Documentation/connector/cn_test.ko
/lib/modules/2.6.37.6-0.7-hpmini/kernel/drivers
/lib/modules/2.6.37.6-0.7-hpmini/kernel/drivers/scsi
/lib/modules/2.6.37.6-0.7-hpmini/kernel/drivers/scsi/scsi_wait_scan.ko
...]
/lib/modules/2.6.37.6-0.7-hpmini/build
/lib/modules/2.6.37.6-0.7-hpmini/modules.softdep
/lib/modules/2.6.37.6-0.7-hpmini/modules.symbols
/lib/modules/2.6.37.6-0.7-hpmini/updates
/lib/modules/2.6.37.6-0.7-hpmini/updates/wl.ko
/lib/modules/2.6.37.6-0.7-hpmini/modules.builtin
/lib/modules/2.6.37.6-0.7-hpmini/modules.dep.bin
/lib/modules/2.6.37.6-0.7-hpmini/modules.dep

But I don’t have any modules loaded except the proprietary :


$ lsmod 
Module                  Size  Used by
nvidia              10589974  32 
wl                   2642842  0

How do you force a file to be in initrd ?

YaST -> /etc/sysconfig Editor -> Kernel -> INITRD_MODULES
But you should set NO_KMS_IN_INITRD to “yes” or it will put the nvidia driver in initrd and that’s probably not what you want (I’m not sure - maybe you’ll tell us - but it does that with the ATI fglrx driver).

YaST -> /etc/sysconfig Editor -> Kernel -> INITRD_MODULES

That will put a module but not a file, like modules.dep

The nvidia/ati driver, I un-check it during kernel configuration

man 5 mkinitrd

Resolution : I compile a driver as module (fan) and put it in INITRD_MODULES in /etc/sysconfig/kernel in order to have it integrated in the initrd image thus, the modules.dep file.

@please_try_again : I read the man page several time before even posting here. But I didn’t find what I want. Or maybe I don’t have enought knowledge about boot linux process to fully understand it.