Solved

Having issues with modules in 2.2.x

Posted on 2000-04-10
12
240 Views
Last Modified: 2013-12-16
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
Comment
Question by:allanc
12 Comments
 
LVL 2

Expert Comment

by:fremsley
ID: 2708339
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
 
LVL 2

Expert Comment

by:Reinier
ID: 2708696
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
 

Author Comment

by:allanc
ID: 2709950
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
 

Author Comment

by:allanc
ID: 2709996
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
 
LVL 2

Expert Comment

by:Reinier
ID: 2711067
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
 

Author Comment

by:allanc
ID: 2714063
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:allanc
ID: 2714070
Adjusted points from 75 to 200
0
 

Author Comment

by:allanc
ID: 2714095
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
 

Author Comment

by:allanc
ID: 2714107
Adjusted points from 200 to 300
0
 
LVL 4

Expert Comment

by:kiffney
ID: 2714706
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
 
LVL 2

Expert Comment

by:tzanger
ID: 2798516
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
 
LVL 1

Accepted Solution

by:
rtoledo earned 300 total points
ID: 2895254
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now