?
Solved

Having issues with modules in 2.2.x

Posted on 2000-04-10
12
Medium Priority
?
249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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
 

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 900 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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses
Course of the Month7 days, 23 hours left to enroll

765 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