Skip to contentSkip to conversation

cannot load *any* modules with 2.4 kernel

DISCUSSION George Nychis 5 participants 11 messages May 20, 2006 – May 22, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I boot two kernels, a 2.6.9 kernel and just recently built a 2.4.32 kernel

In the 2.4.32 kernel I have =y for:
CONFIG_MODULES
CONFIG_MODVERSIONS
CONFIG_KMOD

I then build my kernel, with some modules, install the modules, and boot my 2.4.32 kernel successfully

when i do lsmod, it is completely empty, no modules are loaded. This only happens for my 2.4.32 kernel though, modules load fine in 2.6.9

If i try to manually insert with insmod or modprobe, i get unresolved external symbols for things that I am sure should be resolved... for example, i get unresolved external symbol for printk

I'll give some other common unresolved smybols and maybe someone can point me in the right direction of what else i need to specify to you guys so that you can help me out further.

prinkt
add_timer
dev_mc_add
CardServices
kfree
cpu_raise_softirq
free_irq
kmalloc

Thanks!
George

#1 lore raw

Hi,

Quoted 9 lines · George Nychis

Hi,

I boot two kernels, a 2.6.9 kernel and just recently built a 2.4.32 kernel

In the 2.4.32 kernel I have =y for:
CONFIG_MODULES
CONFIG_MODVERSIONS
CONFIG_KMOD

Quoted 5 lines

I then build my kernel, with some modules, install the modules, and boot my 2.4.32 kernel successfully

when i do lsmod, it is completely empty, no modules are loaded. This only happens for my 2.4.32 kernel though, modules load fine in 2.6.9

What's your modutils version ? -> lsmod -V
You must use modutils and not modules-utils under 2.4, and I suspect that if you jumped back from 2.6 to 2.4, you might not have the right package. Note that modules-utils contains a wrapper to call the right modutils when you are running 2.4, so you should really do lsmod -V when running 2.4.

Quoted 17 lines

If i try to manually insert with insmod or modprobe, i get unresolved external symbols for things that I am sure should be resolved... for example, i get unresolved external symbol for printk

I'll give some other common unresolved smybols and maybe someone can point me in the right direction of what else i need to specify to you guys so that you can help me out further.

prinkt
add_timer
dev_mc_add
CardServices
kfree
cpu_raise_softirq
free_irq
kmalloc

Quoted 2 lines

Thanks!
George

Regards,
Willy

#2 lore raw

Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to /usr/local/modutils

Then in my 2.4.32 kernel's Makefile, I changed the DEPMOD variable to point to /usr/local/modutils/sbin/depmod

Then I build the kernel with:
make dep && make bzImage modules modules_install && make install

So then my initrd gets generated, I reboot to the 2.4.32 kernel, and thats where i'm at now.

So then for instance I goto /lib/modules/2.4.32/net and do:
/usr/local/modutils/sbin/insmod 8390.o

and I see all those unresolved symbols

So maybe now that you have more info, we can figure something out.

Thanks!
George

Quoted 49 lines · Willy Tarreau

Hi,

Quoted 9 lines · George Nychis

Hi,

I boot two kernels, a 2.6.9 kernel and just recently built a 2.4.32 kernel

In the 2.4.32 kernel I have =y for:
CONFIG_MODULES
CONFIG_MODVERSIONS
CONFIG_KMOD

Quoted 5 lines

I then build my kernel, with some modules, install the modules, and boot my 2.4.32 kernel successfully

when i do lsmod, it is completely empty, no modules are loaded. This only happens for my 2.4.32 kernel though, modules load fine in 2.6.9

What's your modutils version ? -> lsmod -V
You must use modutils and not modules-utils under 2.4, and I suspect that if you jumped back from 2.6 to 2.4, you might not have the right package. Note that modules-utils contains a wrapper to call the right modutils when you are running 2.4, so you should really do lsmod -V when running 2.4.

Quoted 17 lines

If i try to manually insert with insmod or modprobe, i get unresolved external symbols for things that I am sure should be resolved... for example, i get unresolved external symbol for printk

I'll give some other common unresolved smybols and maybe someone can point me in the right direction of what else i need to specify to you guys so that you can help me out further.

prinkt
add_timer
dev_mc_add
CardServices
kfree
cpu_raise_softirq
free_irq
kmalloc

Quoted 2 lines

Thanks!
George

Regards,
Willy

#3 lore raw
Quoted 9 lines · George Nychis

Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to /usr/local/modutils

Then in my 2.4.32 kernel's Makefile, I changed the DEPMOD variable to point to /usr/local/modutils/sbin/depmod

Then I build the kernel with:
make dep && make bzImage modules modules_install && make install

Quoted 7 lines

So then my initrd gets generated, I reboot to the 2.4.32 kernel, and thats where i'm at now.

So then for instance I goto /lib/modules/2.4.32/net and do:
/usr/local/modutils/sbin/insmod 8390.o

and I see all those unresolved symbols

Hmmm 8390.o needs crc32.o (or maybe you built it into your kernel). Could you please :
- grep 8390.o /lib/modules/2.4.32/modules.dep
- post the exact list of unresolved symbols that insmod outputs
- grep 2 or 3 of them in /proc/ksyms (eg: printk)
- post your .config so that we can find a way to reproduce your problem.

Quoted 1 line

So maybe now that you have more info, we can figure something out.

By the time you do this, it would also be interesting to retry without CONFIG_MODVERSIONS. Oh, and please report your gcc and binutils versions so that we can be as close as possible to your conditions when trying to reproduce.

Quoted 2 lines

Thanks!
George

Regards,
willy

#4 lore raw

Thanks for all the help Willy,

Nothing from the grep:
[root@emu-5 net]# grep 8390.o /lib/modules/2.4.32/modules.dep [root@emu-5 net]#

Exact list:
enable_irq
eth_type_trans
__kfree_skb
alloc_skb
ether_setup
crc32_le
kmalloc
cpu_raise_softirq
alloc_netdev
__out_of_line_bug
disable_irq_nosync
netif_rx
skb_over_panic
bitreverse
jiffies
softnet_data
prink
__const_udelay

Grepping 2 or 3:
[root@emu-5 net]# grep enable_irq /proc/ksyms c010a5e0 enable_irq_R__ver_enable_irq
c0343610 matroxfb_enable_irq_R__ver_matroxfb_enable_irq [root@emu-5 net]# grep printk /proc/ksyms c011aee0 printk_R__ver_printk
[root@emu-5 net]# grep kmalloc /proc/ksyms c0132c60 kmalloc_R__ver_kmalloc
c03c07e0 sock_kmalloc_R__ver_sock_kmalloc

binutils version: 2.15.92.0.2 20040927
gcc: 3.4.2 20041017

My .config can be found here:
http://www.andrew.cmu.edu/user/gnychis/.config

And I will try taking out CONFIG_MODVERSIONS support and let you know how it goes!

By the way, i'm not keen on inserting 8390.o into the kernel, it was simply the first thing i saw in my /lib/modules/2.4.32 directory, my goal is to get any module at all to insert, because it seems none will insert.

Thanks again!
George

Quoted 39 lines · Willy Tarreau
Quoted 9 lines · George Nychis

Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to /usr/local/modutils

Then in my 2.4.32 kernel's Makefile, I changed the DEPMOD variable to point to /usr/local/modutils/sbin/depmod

Then I build the kernel with:
make dep && make bzImage modules modules_install && make install

Quoted 7 lines

So then my initrd gets generated, I reboot to the 2.4.32 kernel, and thats where i'm at now.

So then for instance I goto /lib/modules/2.4.32/net and do:
/usr/local/modutils/sbin/insmod 8390.o

and I see all those unresolved symbols

Hmmm 8390.o needs crc32.o (or maybe you built it into your kernel). Could you please :
- grep 8390.o /lib/modules/2.4.32/modules.dep
- post the exact list of unresolved symbols that insmod outputs
- grep 2 or 3 of them in /proc/ksyms (eg: printk)
- post your .config so that we can find a way to reproduce your problem.

Quoted 1 line

So maybe now that you have more info, we can figure something out.

By the time you do this, it would also be interesting to retry without CONFIG_MODVERSIONS. Oh, and please report your gcc and binutils versions so that we can be as close as possible to your conditions when trying to reproduce.

Quoted 2 lines

Thanks!
George

Regards,
willy

#5 lore raw
Quoted 16 lines · George Nychis

Thanks for all the help Willy,

Nothing from the grep:
[root@emu-5 net]# grep 8390.o /lib/modules/2.4.32/modules.dep [root@emu-5 net]#

Exact list:
enable_irq
eth_type_trans
__kfree_skb
alloc_skb
ether_setup
crc32_le
kmalloc
cpu_raise_softirq
alloc_netdev

Quoted 8 lines

__out_of_line_bug
disable_irq_nosync
netif_rx
skb_over_panic
bitreverse
jiffies
softnet_data
prink

^^^^^^^

You copied the list by hand, didn't you ?
Are you sure there were not revision after the symbol names, such as "printk_R1b7d4074" ?

Quoted 11 lines

__const_udelay

Grepping 2 or 3:
[root@emu-5 net]# grep enable_irq /proc/ksyms c010a5e0 enable_irq_R__ver_enable_irq
c0343610 matroxfb_enable_irq_R__ver_matroxfb_enable_irq [root@emu-5 net]# grep printk /proc/ksyms c011aee0 printk_R__ver_printk
[root@emu-5 net]# grep kmalloc /proc/ksyms c0132c60 kmalloc_R__ver_kmalloc
c03c07e0 sock_kmalloc_R__ver_sock_kmalloc

                        ^^^^^^^^^^^^^^^^^^^

There should be and 'R' followed by 8 hex digits here. I remember I already came across this once, but unfortunately I don't remember how nor how I fixed it.

When I build from your .config, I have "printk_R1b7d4074" for example. It is defined in include/linux/modules/printk.ver which is dynamically generated during make dep :

#define __ver_printk 1b7d4074
#define printk _set_ver(printk)
#define __ver_acquire_console_sem f174ed48
#define acquire_console_sem _set_ver(acquire_console_sem)
#define __ver_console_print b714a981
#define console_print _set_ver(console_print)
#define __ver_console_unblank b857dfed
#define console_unblank _set_ver(console_unblank)
#define __ver_register_console 80c5241f
#define register_console _set_ver(register_console)
#define __ver_unregister_console d83dc0dd
#define unregister_console _set_ver(unregister_console)

So I suspect that this file was not included at all during build. Stupid question : are you really sure that the bzImage you boot from has been rebuilt and that you're not running an old one ? Have you performed a "make distclean" before you have built the kernel for the first time (save your .config before doing this).

Hmmm while I'm thinking about it, please also ensure that you have 'genksyms' somewhere in your path.

Quoted 2 lines

binutils version: 2.15.92.0.2 20040927
gcc: 3.4.2 20041017

Should be OK.

Quoted 5 lines

My .config can be found here:
http://www.andrew.cmu.edu/user/gnychis/.config

And I will try taking out CONFIG_MODVERSIONS support and let you know how it goes!

I'm sure it will work.

Quoted 4 lines

By the way, i'm not keen on inserting 8390.o into the kernel, it was simply the first thing i saw in my /lib/modules/2.4.32 directory, my goal is to get any module at all to insert, because it seems none will insert.

I understand, what I meant is that 8390 relies on crc32.o which might or might not be included in the kernel. I wanted to identify the possibility that some modules might have been missing.

Quoted 2 lines

Thanks again!
George

Regards,
Willy

#6 lore raw
Quoted 10 lines · Willy Tarreau (on Sun, 21 May 2006 10:40:55 +0200) wrote:
Quoted 9 lines · George Nychis

Grepping 2 or 3:
[root@emu-5 net]# grep enable_irq /proc/ksyms c010a5e0 enable_irq_R__ver_enable_irq
c0343610 matroxfb_enable_irq_R__ver_matroxfb_enable_irq [root@emu-5 net]# grep printk /proc/ksyms c011aee0 printk_R__ver_printk
[root@emu-5 net]# grep kmalloc /proc/ksyms c0132c60 kmalloc_R__ver_kmalloc
c03c07e0 sock_kmalloc_R__ver_sock_kmalloc

Quoted 5 lines
                       ^^^^^^^^^^^^^^^^^^^

There should be and 'R' followed by 8 hex digits here. I remember I already came across this once, but unfortunately I don't remember how nor how I fixed it.

Broken kernel build system in 2.4. It does not always build the module version data correctly. Save your 2.4 .config, make mrproper (critical), restore your .config then
make oldconfig
make dep
make bzImage modules
make modules_install
install

#8 lore raw
In reply to George Nychis
Quoted 6 lines · George Nychis

Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to /usr/local/modutils

Then in my 2.4.32 kernel's Makefile, I changed the DEPMOD variable to point to /usr/local/modutils/sbin/depmod

Well thats a half-arsed way to do it. The kernel makefile could be using the new /usr/local/sbin/depmod and the system the old /sbin/depmod /sbin/insmod /sbin/modprobe etc.

Just install the new modutils to /usr/local/ and then add /usr/local/sbin to your $PATH _before_ /sbin etc. so it is read first.

Nick

#9 lore raw

Before I build i do:
PATH=/usr/local/modutils/sbin:$PATH

Therefore it must be reading it first, sorry I should have mentioned this... just have done so much to try and get it to work I can't remember it all :)

In response to Willy's post, yeah it was by hand, i can't get that comp on the network yet :(

I will answer all your detailed questions and rebuild the kernel, but it didn't have any revisions after names, I'll rebuild with that exact .config i posted after a make clean mrproper to ensure its installing the new kernel. Then I'll also try disabling modversion.

Thanks!
George

Quoted 18 lines · Nick Warne
Quoted 6 lines · George Nychis

Okay, so heres what I did. I downloaded modutils version 2.4.27 and extracted it to /usr/local/modutils

Then in my 2.4.32 kernel's Makefile, I changed the DEPMOD variable to point to /usr/local/modutils/sbin/depmod

Well thats a half-arsed way to do it. The kernel makefile could be using the new /usr/local/sbin/depmod and the system the old /sbin/depmod /sbin/insmod /sbin/modprobe etc.

Just install the new modutils to /usr/local/ and then add /usr/local/sbin to your $PATH _before_ /sbin etc. so it is read first.

Nick

#10 lore raw
Quoted 6 lines · George Nychis

Before I build i do:
PATH=/usr/local/modutils/sbin:$PATH

Therefore it must be reading it first, sorry I should have mentioned this... just have done so much to try and get it to work I can't remember it all :)

Well, yes, but as soon as you reboot and login that $PATH will be lost - you need to add that in your .bashrc, or profile.d/ or whatever to make it permanent.

I don't know what the issue is with the modules, but building against one version of modutils and then running system with another version will surely cause problems?

Nick

Signature · 2 lines
"Person who say it cannot be done should not interrupt person doing it."
-Chinese Proverb