# modules.autoload problem with new kernel 2.6.11-r4 [SOLVED]

## zion1459

after upgrading from kernel 2.6.10-r6 to 2.6.11-r4 the modules daemon no longer works... I've installed the new kernel with all modules and everything looks just great.. but when all modules fail to load at boot! and the really weird part is that I can easily modprobe all drivers manually after boot. It's like /etc/init.d/modules is broken... 

has anyone else experienced this? Never seen this problem before.. first time today, after installing the new kernel.

----------

## Gherald

are you using /etc/modules.autoload.d/kernel-2.6 ..?

----------

## zion1459

yes I am  :Smile: 

----------

## Gherald

And I asume /usr/src/linux was linked to /usr/src/linux-2.6.11-gentoo-r4 when you recompiled the modules.

Strange problem you've got... try putting the manual modprobe commands that work in /etc/conf.d/local.start ?

----------

## MickKi

Since I have been using the same box for the last 5+ years I have been mostly building all the bits & bobs in the kernel.  I decided to buy a new box and being a bit uncertain of the new hardware I thought of going back to compiling modules so that I can switch them on/off depending on the response I get from the machine.

Anyway, after the kernel compiled and they were installed I've added them in /etc/modules.autoload.d/kernel-2.6, run modules-update and after I rebooted I tried modprobing them.  Every single one returned e.g.:

```
# modprobe ieee1394.ko

FATAL:  Module ieee1394.ko not found
```

Rebooting the machine gives me:

```
* Calculating module dependencies . . .

* Using /etc/modules.autoload.d/kernel-2.6 as config:

*     Loading module crc-ccitt.ko

*     Failed to load crc-ccitt.ko

*     Loading module ipt_NOTRACK.ko

*     Failed to load ipt_NOTRACK.ko

. . .

```

. . . . you get the drift.

Have I missed something?

----------

## kebabkarli

As described in https://forums.gentoo.org/viewtopic-t-315246-highlight-.html it seems that you've got exactly the same problem. (or aren't you able to modprobe your modules manually?)

I think putting the commands into /etc/conf.d/local.start must work, but have you found any "clean" way to solve the problem?

----------

## MickKi

Hmm, yes I can see them when I run modprobe -l, but I cannot modprobe them to install them.  :Sad:    I get the error shown in my previous message.

Without wanting to confuse matters more in the old machine modprobe -l gives me an empty list . . .   :Shocked: 

Just as I was thinking that modules is good for you. :Laughing: 

EDIT:  Both boxen are running the same kernel 2.6.11-gentoo-r4.

----------

## kebabkarli

As you are marked as Guru and I am just noob it maybe you feel fooled by me, but 

```
find /lib/modules/2.6.[enter your kernel name] -type f -iname '*.o' -or -iname '*.ko'
```

shows all your modules?

btw: how can i copy/paste that calculating modules etc stuff that is shown on boot. dmesg doesn't give me that messages...

----------

## zion1459

kebabkarli... yup exactly the same problem...

freeix: it works great if I load them from locale.start ...

it's just to weird that it doesn't work with the modules daemon... hmm

----------

## zion1459

SOLVED...

ok, dmesg showed me the problem (and yes I am an idiot for not reading dmesg before)... I had comments after my module names in modules.autoload.. like this:

8139too # bla bla some comment

and of course this is what messed it up!  :Smile:  so I moved all my comments up above the name of the module to load and now it works  :Smile: 

dmesg is now my best friend for the rest of the night  :Razz: 

thx for the help peeps  :Very Happy: 

----------

## MickKi

 *kebabkarli wrote:*   

> As you are marked as Guru and I am just noob
> 
> 

  I could be marked as MickeyMouse, if that makes you feel better, I count myself as a noob and will probably be so for quite a few years to come.   :Laughing: 

 *kebabkarli wrote:*   

>  it maybe you feel fooled by me, but 
> 
> ```
> find /lib/modules/2.6.[enter your kernel name] -type f -iname '*.o' -or -iname '*.ko'
> ```
> ...

 

Yes, it does.  That's what I used to add them to my  /etc/modules.autoload.d/kernel-2.6

 *kebabkarli wrote:*   

> 
> 
> btw: how can i copy/paste that calculating modules etc stuff that is shown on boot. dmesg doesn't give me that messages...

 

I've cheated!  :Very Happy:   You can redirect (>>) to a file the output of a command on the console 

```
# /etc/init.d/modules restart >> a_file.txt
```

 will concatenate to this file what's happening on the console.  If you want to capture both the standard error and, or, separately to the standard output then you need to do something different with the ">&" redirection operator and the appropriate file numbers; e.g.: 

```
 $ some_command 1>some_file.txt 2>&1
```

This is using file numbers (or file descriptors) 1 and 2 for standard output and standard error respectively.  The redirection operator is read from right to left; i.e. redirect stderr 2 to stdout 1 and then pipe stdout to some_file.txt.

This link (from google) shows in nice simple diagrams what stdin, stderr and stdout is all about.  It also mentions tee, a useful tool to redirect stuff from one pipe to another, or a file.

This is a rather crude way of doing it, tee can be used for a more elegant solution and if you want to know what's happening during shutdown and bootup then you need a process which will not hangup . . . "nohup"  :Exclamation: 

It's used like this:

```
# nohup command &
```

 and it saves all the proceedings to nohup.out in your home directory.

Anyway, these are the somewhat basic tools I use, but I'm sure that there is a screen capture facility I've read somewhere but never bothered setting it up.

I think I've gone off topic here, so if anyone else has some ideas or can confirm or even has reported this is a bug?

 *zion1459 wrote:*   

> SOLVED...
> 
> ok, dmesg showed me the problem (and yes I am an idiot for not reading dmesg before)... I had comments after my module names in modules.autoload.. like this:
> 
> 8139too # bla bla some comment
> ...

  Unfortunately, I haven't any comments in my autoload.d.  On either of the two machines.  This is doing my head in! :Evil or Very Mad: 

----------

## Gherald

 *zion1459 wrote:*   

> dmesg is now my best friend for the rest of the night

 

Better make it longer then that.

```
dmesg | grep -i "something to do with your problem"
```

Drill yourself until the typing becomes reflexive  :Razz: 

(also it might have helped if you'd included your modules.autoload in your first post...)

----------

## kebabkarli

@ zion1459: Thank you for posting; same problem, same solution, I also had commented in that way. 

@ MickKi: 

Instead of writing

```
modprobe ieee1394.ko
```

you should write

```
modprobe ieee1394
```

worked fine for me...

ab big THX for your description and that link. That't the thing I like about this forums. You don't get only the solution, you get the solution + a bit of knowledge...

----------

## MickKi

Doh!  :Rolling Eyes:   It shows that it's been years since I've had to load a module . . .  :Laughing: 

Anyway, before I modprobed them they're clearly not there:

```
# lsmod

Module                  Size  Used by
```

Then on with the job:

```
# modprobe -l

/lib/modules/2.6.11-gentoo-r4/kernel/crypto/crc32c.ko

/lib/modules/2.6.11-gentoo-r4/kernel/net/ipv4/netfilter/iptable_raw.ko

/lib/modules/2.6.11-gentoo-r4/kernel/net/ipv4/netfilter/ipt_NOTRACK.ko

/lib/modules/2.6.11-gentoo-r4/kernel/lib/libcrc32c.ko
```

and 

```

# modprobe -v crc32c

insmod /lib/modules/2.6.11-gentoo-r4/kernel/lib/libcrc32c.ko 

insmod /lib/modules/2.6.11-gentoo-r4/kernel/crypto/crc32c.ko 

# modprobe -v iptable_raw

insmod /lib/modules/2.6.11-gentoo-r4/kernel/net/ipv4/netfilter/iptable_raw.ko 

# modprobe -v ipt_NOTRACK

insmod /lib/modules/2.6.11-gentoo-r4/kernel/net/ipv4/netfilter/ipt_NOTRACK.ko 

# modprobe -v libcrc32c
```

Thereafter 

```
# lsmod

Module                  Size  Used by

ipt_NOTRACK             2080  0 

iptable_raw             2016  0 

crc32c                  1824  0 

libcrc32c               2592  1 crc32c

```

 Good.  So I thought that job's done.  I've also re-run modules-update for good measure.  But when I reboot up they're not being loaded . . .  :Sad: 

I'm going away tomorrow so unless I sort this out tonight it may have to wait until I come back.  Thanks for your help and please post any suggestions in case I am missing something blindingly obvious.

----------

## kebabkarli

As written in 

```
man modules-update
```

modules-update is just a tool to ease module configuration. 

To automatically load modules at boot you just have to write the module-names in /etc/modules.autoload.d/kernel-2.6

For me, the file looks that way:

```
# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $

#

# Note that this file is for 2.6 kernels.

#

# Add the names of modules that you'd like to load when the system

# starts into this file, one per line.  Comments begin with # and

# are ignored.  Read man modules.autoload for additional details.

# For example:

# 3c59x

# SCSI Support (needet for usb-storage)

sd_mod

# USB Core Module

usbcore

# USB 1.1 Host Controller

uhci-hcd

# USB 2 Host Controller

ehci-hcd

# USB LinuxPrinting

usblp

# USB to Serial for Palm

usbserial

# USB Mass Device

usb-storage

# USB Human IF Device

# usbhid

# Handspring Module for Paml

visor

# Aureon Module

# snd-ice1724

# Via onboard Sound Module

snd-via82xx

# Samba FileSystem

smbfs

```

If you can modprobe them manually this should surely work...

----------

## MickKi

Fixed!  For some reason I entered all modules names including the .ko extension in my /etc/modules.autoload.d/kernel-2.6 and of course the names were not recognised by the autoloading script.  :Rolling Eyes:   My reasoning must have been that the module driver names have the .ko extension and therefore did not think of removing it despite the commented out example given in the file.

Your quoting of the /etc/modules.autoload.d/kernel-2.6 prompted me to remove the .ko from each module name in mine and the modules started being loaded at boot up.  :Cool: 

Thank you very much.  :Very Happy: 

----------

