# Modules are not autoloading on start up

## vitoriung

I have following problem -

installed modular support for particular HW, included them in /etc/modules.autoload/kernel2.6

But when system starts most of the modules has !! output error, (I have lots of modules and it's too quick to recognize which yes and which not load)

than I need to run - modprobe "modulename" and HW works fine..

I have problem with 2 particular HW - network card (sis900) and DVB-T card (b2c2)

After system has started- lsmod - 

```

Module                  Size  Used by

snd_pcm_oss            43808  0

snd_mixer_oss          17152  1 snd_pcm_oss

snd_seq_dummy           6660  0

snd_seq_oss            30208  0

snd_seq_midi_event      9600  1 snd_seq_oss

snd_seq                47568  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device         10124  3 snd_seq_dummy,snd_seq_oss,snd_seq

snd_intel8x0           30748  2

snd_ac97_codec         92320  1 snd_intel8x0

ac97_bus                6016  1 snd_ac97_codec

snd_pcm                69252  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec

snd_timer              20996  2 snd_seq,snd_pcm

snd                    45668  13 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

soundcore               9568  1 snd

snd_page_alloc         11272  2 snd_intel8x0,snd_pcm

```

grep sis900 or b2c2 from /var/log/...  messages or dmesg gives no output...

after modprobe sis900 and b2c2_flexcop_pci  -

```
Module                  Size  Used by

mt352                   9348  1

stv0299                12680  0

b2c2_flexcop_pci        9752  0

b2c2_flexcop           25100  1 b2c2_flexcop_pci

dvb_core               69416  2 stv0299,b2c2_flexcop

dvb_pll                15492  1 b2c2_flexcop

i2c_core               22144  4 mt352,stv0299,b2c2_flexcop,dvb_pll

sis900                 21760  0

snd_pcm_oss            43808  0

snd_mixer_oss          17152  1 snd_pcm_oss

snd_seq_dummy           6660  0

snd_seq_oss            30208  0

snd_seq_midi_event      9600  1 snd_seq_oss

snd_seq                47568  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device         10124  3 snd_seq_dummy,snd_seq_oss,snd_seq

snd_intel8x0           30748  3

snd_ac97_codec         92320  1 snd_intel8x0

ac97_bus                6016  1 snd_ac97_codec

snd_pcm                69252  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec

snd_timer              20996  2 snd_seq,snd_pcm

snd                    45668  15 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

soundcore               9568  1 snd

snd_page_alloc         11272  2 snd_intel8x0,snd_pcm

```

How to make all modules properly loading at start and how to find log with all startup process?

ThanksLast edited by vitoriung on Mon Feb 25, 2008 11:38 pm; edited 1 time in total

----------

## NeddySeagoon

vitoriung

```
/etc/modules.autoload/kernel2.6 
```

are you sure?

/etc/modules.autoload.d/kernel-2.6 (note extra .d and the extra hyphen) exists and contains only comments until you add things.

Did your editor start a new file?

----------

## vitoriung

sorry mate, my mistake above,

of course I followed 

vi /etc/modules.autoload.d/kernel-2.6

proper autoload file, modules load on start with !! output

----------

## vitoriung

bump..

any advices? I still cannot get trough - maybe answers on these questions can help -

1. where can I look up for load modules error log? Guess dmesg, but if it's not there?

2. where is System startup log? I would expect that system logs from it's very start...

Thanks

----------

## NeddySeagoon

vitoriung,

By default, the on screen messages shown during boot are not logged. You need another package and option setting for that. I think its mentioned in /etc/conf.d/rc.

dmesg will show you module loading errors. The best way is to do a manual modprobe, then the error will be at the end of dmesg.

----------

## vitoriung

thanks for reply,

trouble is, that modprobe works fine, so HW is inicialized properly after that, that's why I am confused, because there are no errors in dmesg,

and I can't see any other modules errors in logs after boot.

I tried to enable bootlog in RC, as you advised me, emerged showconsole but cannot find any bootlog after restart...what should I do next?

Thanks

----------

## NeddySeagoon

vitoriung,

Does it go wrong before or after the "Press I for Interactive Startup" ?

Try pressing I. That will pause the boot process and allow you to decide if a startup script should run or not.

Also the Pause|Break key should stop messages scrolling during bootup. Press it again to resume the boot.

I don't think your problem is module loading related, if it were, it would be manually reproduceable with modprobe and dmesg would contain all the errors, unless the dmesg RAM buffer is so small that early entries are lost before root is mounted read/write.

----------

## vitoriung

problem is that I can press the I just after all error messages, than I can choose the startup options.

I've made up temporary solution, swapped modular support for kernel drivers and it works fine...

But I'd like to found out where is the problem there anyway...Last edited by vitoriung on Mon Feb 25, 2008 11:30 pm; edited 1 time in total

----------

## vitoriung

I am back after longer time,

because I've started using wifi card, have another module with the same problem...

I took some screenshots with my camera and seen this... (including only what I think is important)

When system starts up-

```

...

...

0000:00:03.0: Realtek RTL8201 PHY transceiver found at address 1.

0000:00:03.0:Using tranciever found at address 1 as default

...

...

INIT: version 2.86 booting

...

Press I to enter interactive boot mode

*Mounting ...

...

Starting udevd                 [OK]

...

...Loading module RTL8187

* Failed to load RTL8187   [!!]

...

...Loading module xxx (about 30 modules)

* Failed to load xxx          [!!]

...

* Loading module pcbc...  [OK]

*Autoloaded 1 module(s)

...

...

 * Starting wlan0

 *   Bringing up wlan0

 *     dhcp

 *       network interface wlan0 does not exist

 *       Please verify hardware or kernel module (driver)                      [ !! ]

```

no info about realtek module in log

```
 grep rtl /var/log/messages 
```

but after 

```
 modprobe rtl8187

/etc/init.d/net.wlan0 start (but not necessary, because it starts automatically)

* Starting wlan0

*   Starting wpa_supplicant on wlan0 ...

*   Starting wpa_cli on wlan0 ...                                             [ ok ]

grep rtl /var/log/messages

Feb 22 17:44:10 localhost phy0: hwaddr 00:14:6c:b1:17:8b, rtl8187 V1 + rtl8225z2

Feb 22 17:44:10 localhost usbcore: registered new interface driver rtl8187

```

So it obviously starts just one module, but why it refuses to start those other ones?

Thanks

----------

## vitoriung

I've tried modules-update and depmod,

and after restart no simple module is loading :/

But modules regarding to HW like Alsa modules, Nvidia...etc. are loading automatically just after HW is recognized by udev, even when they are in modules.autoload file, where they are refusing to load...

strange, maybe problem is somewhere inside module configuration files....

Anyone could give some hint?  :Wink: 

----------

## pappy_mcfae

 *vitoriung wrote:*   

> I've tried modules-update and depmod,
> 
> and after restart no simple module is loading :/
> 
> But modules regarding to HW like Alsa modules, Nvidia...etc. are loading automatically just after HW is recognized by udev, even when they are in modules.autoload file, where they are refusing to load...
> ...

 

It might be a kernel configuration problem. You could post your .config file and let someone else look it over for errors. many pairs of eyes find problems better than just one.

Blessed be!

Pappy

----------

## vitoriung

thanks for reply,

config is a bit huge so a pasted it here -

http://rafb.net/p/OXx49m21.html

Note: I upgraded the kernel about 4 times, issue persist with every kernel I used...

----------

## NeddySeagoon

vitoriung,

Please post your dmesg after the modules have failed to autoload and you have modprobed them.

There should be some modprobe error messages there.

Also post your 

```
fdisk -l
```

output and your /etc/fstab.

I expect these module load failures have a common cause.

Oh.  Post your /etc/modules.autoload.d/kernel-2.6  It could be as simple as a typo there.  

Certainly 

```
Starting udevd                 [OK]

...

...Loading module RTL8187

* Failed to load RTL8187   [!!] 
```

suggests that as the module is almost certainly named with lower case letters.

Notice your 

```
modprobe rtl8187
```

that worked.

Linux is case sensitive almost everywhere so rtl8187 <> RTL8187

```
modprobe -l | less
```

will show you all the modules you have made for your current kernel.

Notice the letter case used in the names.

----------

## pappy_mcfae

The first thing I noted is that you are using kernel version 2.6.23-gentoo-r7. My first suggestion is to go backwards in your kernel to 2.6.22.19 (the latest vanilla) or 2.6.22-gentoo-r10. Both are currently in the portage tree (as of 2-26-2008 at 14:53 CST).

Many people, up to and including myself cannot get wireless functional (especially using ndiswrapper) under .23 or .24 version kernels. Since you say you have tried everything else to force your wireless to work, I heartily suggest backing up in kernel versions, and trying that.

It's really not backing up per se. The newest .22 version is newer than the .23 version and as new as the 24 version. True, you won't get a lot of the neat stuff in the newer kernel families, but your wireless will work as it should. Personally, I think that is more important than having the ability to make your computer hibernate.

Hope that helps!

Blessed be!

Pappy

----------

## NeddySeagoon

pappy_mcfae,

Kernels between 2.6.17 and 2.6.23-gentoo-r8 have the vmsplice local root exploit vuneralbility.

That makes it trivial for any non root user to become root.

You may think is doesn't matter as you need to be a local user to use it.

If someone breaks into your system as a normal user, they are a local user.

You really need a fixed kernel.

----------

## vitoriung

I have been on holidays for a while, 

now I am back, and thank you to be in touch with me..

So here is something for you Neddy -

/etc/modules.autoload.d/kernel-2.6

```
nvidia

p8022

psnap

llc

8021q

bridge

snd-ac97-codec

snd-intel8x0

snd-mixer-oss

snd-pcm-oss

snd-seq-oss

snd-seq-midi-event

snd-seq-dummy

snd-seq

snd-seq-device

snd-page-alloc

snd-timer

snd-rtctimer

snd

snd-pcm

ac97_bus

i2c-dev

i2c-algo-pcf

rtl8187

intel-rng

eeprom_93cx6

scsi_wait_scan

b2c2-flexcop-pci

b2c2-flexcop

mt312

mt352

dvb-pll

lgdt330x

bcm3510

stv0297

stv0299

nxt200x

compat_ioctl32

videodev

v4l2-common

v4l1-compat

output

geode-aes

padlock-aes

padlock-sha

sha1

cbc

sha256

pcbc

```

lsmod 

```
localhost vito # lsmod

Module                  Size  Used by

snd_pcm_oss            38176  0

snd_mixer_oss          16640  1 snd_pcm_oss

snd_seq_dummy           6660  0

snd_seq_oss            29824  0

snd_seq_midi_event      9600  1 snd_seq_oss

snd_seq                44752  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device          9996  3 snd_seq_dummy,snd_seq_oss,snd_seq

snd_intel8x0           30364  5

snd_ac97_codec         90912  1 snd_intel8x0

ac97_bus                6016  1 snd_ac97_codec

snd_pcm                64516  4 snd_pcm_oss,snd_intel8x0,snd_ac97_codec

snd_timer              20228  3 snd_seq,snd_pcm

snd                    42596  17 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

nvidia               4708976  16

snd_page_alloc         11272  2 snd_intel8x0,snd_pcm

```

modprobe videodev

/var/log/messages

```
 

Mar  8 17:28:56 localhost Linux video capture interface: v2.00

```

nothing else

lsmod

```
localhost vito # lsmod

Module                  Size  Used by

videodev               28032  0

v4l2_common            18560  1 videodev

v4l1_compat            16388  1 videodev

snd_pcm_oss            38176  0

snd_mixer_oss          16640  1 snd_pcm_oss

snd_seq_dummy           6660  0

snd_seq_oss            29824  0

snd_seq_midi_event      9600  1 snd_seq_oss

snd_seq                44752  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device          9996  3 snd_seq_dummy,snd_seq_oss,snd_seq

snd_intel8x0           30364  5

snd_ac97_codec         90912  1 snd_intel8x0

ac97_bus                6016  1 snd_ac97_codec

snd_pcm                64516  4 snd_pcm_oss,snd_intel8x0,snd_ac97_codec

snd_timer              20228  3 snd_seq,snd_pcm

snd                    42596  17 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

nvidia               4708976  16

snd_page_alloc         11272  2 snd_intel8x0,snd_pcm

```

rtl8187 module was modprobed properly (not RTL8187 = mistake here  :Smile: , and I swapped it to kernel driver on the end.

fdisk - l

```
localhost etc # fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes

240 heads, 63 sectors/track, 5169 cylinders

Units = cylinders of 15120 * 512 = 7741440 bytes

Disk identifier: 0x21d05568

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1   *           1           5       37799+  83  Linux

/dev/hda2               6         138     1005480   82  Linux swap / Solaris

/dev/hda3             139        1431     9775080   83  Linux

/dev/hda4            2724        5169    18491760   83  Linux

```

/etc/fstab

```

/dev/hda1               /boot           ext2            noauto,noatime  1 2

/dev/hda3               /               reiserfs        noatime         0 0

/dev/hda2               none            swap            sw              0 0

/dev/hda4               /               reiserfs        noatime         0 1

/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0

/dev/fd0                /mnt/floppy     auto            noauto          0 0

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0

proc                    /proc           proc            nodev,nosuid,noexec     0 0

```

Anything suspicious?   :Confused: 

----------

## NeddySeagoon

vitoriung,

You have a lot of junk in /etc/modules.autoload.d/kernel-2.6. udev, the kernel module autoloader and /etc/modules.d/* will load most of that.

However, its not a problem as modprobing a previously loaded module does not produce error messages.

----------

