• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

Having issues with modules in 2.2.x

Hi there...I've been running Linux since the 1.2.x days, so I consider myself to be fairly proficient in it. However, ever since upgrading from 2.0.x to
2.2.6, I've been having a strange problem with modules. I'm sure
it's something stupid I'm doing, as it's clearly not a problem for others.

Every module that I build gives an error when I try to use it with insmod.
I'm using insmod and modprobe versions 2.1.121. My compiler is:
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)

 It doesn't matter if I download a specific .c file and do a module compile on the spot, or do a full 'make modules' -- I get the same error message.
What I get is a list of 'unresolved symbol' error messages for what
appears to be every single symbol. For fat.o the symbol list includes:
inode_setattr, __wake_up,__generic_copy_from_user,load_nls,clear_inode
kmalloc,kdevname,__wait_on_buffer,load_nls_default,__get_free_pages

...And there's a similar list for any other driver I try to load.

If there's someone else who has seen this, I'd appreciate hearing about it.
I'm spending all my points on this, as it's been bugging me for over a year
and I've never found a solution.

--Allan
0
allanc
Asked:
allanc
1 Solution
 
fremsleyCommented:
Do you get error messages at compile time, too?

You haven't just forgotten to do a 'make modules_install' after compiling, have you?
0
 
ReinierCommented:
If using modprobe, did you do a depmod -a after installing the modules?

If using insmod are you loading the modules in the correct order?

vfat, fat, msdos need Native Language Support (nls), did you compile support for that in the kernel?
0
 
allancAuthor Commented:
I didn't do a depmod -a, but I have now.
The depmod does complain about unresolved
symbols.

For example, my network card:
root@carhart.com:ttyp1 (Linux)# depmod /lib/modules/2.2.6/net/tulip.o -e
/lib/modules/2.2.6/net/tulip.o: unresolved symbol(s)
        securebits
        eth_copy_and_sum
        eth_type_trans
        request_region
        pcibios_read_config_byte
        __kfree_skb
        alloc_skb
        init_etherdev
        pcibios_find_class
        bh_active
        kmalloc
        release_region
        pcibios_present
        pcibios_write_config_word
        free_irq
        unregister_netdev
        pcibios_write_config_byte
        del_timer
        kfree
        pcibios_write_config_dword
        pci_find_slot
        request_irq
        netif_rx
        skb_over_panic
        check_region
        jiffies
        pcibios_read_config_word
        printk
        add_timer
        __const_udelay
/lib/modules/2.2.6/net/tulip.o:

There should be no order necessary for this one...
I just downloaded tulip.c, and compiled it
according to the instructions.
No errors at compile time. No, I didn't
forget modules_install.

I've recompiled the kernel, but this problem
doesn't disappear. *perplexed*
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
allancAuthor Commented:
I didn't do a depmod -a, but I have now.
The depmod does complain about unresolved
symbols.

For example, my network card:
root@carhart.com:ttyp1 (Linux)# depmod /lib/modules/2.2.6/net/tulip.o -e
/lib/modules/2.2.6/net/tulip.o: unresolved symbol(s)
        securebits
        eth_copy_and_sum
        eth_type_trans
        request_region
        pcibios_read_config_byte
        __kfree_skb
        alloc_skb
        init_etherdev
        pcibios_find_class
        bh_active
        kmalloc
        release_region
        pcibios_present
        pcibios_write_config_word
        free_irq
        unregister_netdev
        pcibios_write_config_byte
        del_timer
        kfree
        pcibios_write_config_dword
        pci_find_slot
        request_irq
        netif_rx
        skb_over_panic
        check_region
        jiffies
        pcibios_read_config_word
        printk
        add_timer
        __const_udelay
/lib/modules/2.2.6/net/tulip.o:

There should be no order necessary for this one...
I just downloaded tulip.c, and compiled it
according to the instructions.
No errors at compile time. No, I didn't
forget modules_install.

I've recompiled the kernel, but this problem
doesn't disappear. *perplexed*
0
 
ReinierCommented:
Wait a minute, are you telling us that the modules and the kernel don't necesarrily belong to each other? Is that supposed to work? I think you can't leave out support for something in the kernel and then just download and compile a module later on. The kernel must somehow know of the modules, i.e. it must have the necessary hooks to attach it. Try compiling a kernel and the modules from the same source. Or try compiling a kernel with CONFIG_MODVERSIONS enabled, I thought that was necessary if you want to use the kernel with "external" modules.
0
 
allancAuthor Commented:
Yes, I have config_modversions enabled.
However, let's disregard that -- because
I get the *SAME* problem loading
any modules, regardless of whether I compiled it by hand, or used the 'M' option in
'make config'.

Well, I wasn't really expecting someone to
help me troubleshoot this problem -- I was more hoping someone else has SEEN this problem.

I recompiled the kernel, and that didn't fix it.
At this point, I may just reinstall the OS.

--Allan
0
 
allancAuthor Commented:
Adjusted points from 75 to 200
0
 
allancAuthor Commented:
Okay, it appears nobody HAS seen this problem
before, so I may need help troubleshooting
the problem. I've upped the value of the question accordingly.

You may want to see what my compile looks like,
but of course that's way too much information
to post on here.

You can all view it at this URL:
http://carhart.com/~allan/kernel/

Each main target (clean,dep,etc.) has its own
output file.

--Allan
0
 
allancAuthor Commented:
Adjusted points from 200 to 300
0
 
kiffneyCommented:
It looks like the modules are not linking with ANY kernel symbols, not even printk.  There's a couple of possibilities -
You really are running a 2.2.6 kernel, right?  I've recompiled kernels but installed them incorrectly before - failed to run lilo, set up the boot section wrong, didn't copy the System.map file to the /boot directory, etc. I think depmod expects the System.map file to match the running kernel - did you update that?

Just for fun, run 'uname -r', and make sure that the the modules are in /lib/modules/`uname -r`.  check the date of kernel compilation, make sure it's version 2.2.6, and then check the date of the /lib/modules/2.2.6/tulip.o file, for example.  If the tulip file is much older, maybe you really didn't install the modules in the right directory, OR (more likely) you have left old modules in there.  I don't know a way to look in the module file and see what kernel version it expects.  

is modprobe really creating a modules.dep file in /lib/modules/2.2.6/?

What version of bash are you using?  The /usr/src/linux/Doc/changes.txt file mentions pre- 1.14 as causing problems with module compilation.

Your /usr/include/linux is a symlink to /usr/src/linux/include/linux, and /usr/include/asm is symlinked to /usr/src/linux/include/asm?  (this used to make a difference, don't know if it does any more)

Make sure there is nothing weird in /etc/conf.modules, like paths to old modules directories.  Depmod and modules-install are supposed to look at the current kernel version and put the modules in a /lib/modules subdirectory named after that version.  Modules-install won't work with modules lying about any old place, of course.

This is a strange problem.
0
 
tzangerCommented:
In the past I have had to obliterate a /lib/modules/x.x.x directory and reinstall to get the modules to work.

rm -rf /lib/modules/2.2.6
cd /usr/src/linux
make modules_install
depmod -a

see what that does.
0
 
rtoledoCommented:
Well, you came from 2.0.x, OK? The modules are upgraded from one version to above. Have you upgraded yours. Sorry, if the question is too obvious.

See the page
http://www-stu.calvin.edu/~clug/users/jnieho38/goto22.html

[]sRonaldo
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Tackle projects and never again get stuck behind a technical roadblock.
Join Now