allanc
asked on
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_f rom_user,l oad_nls,cl ear_inode
kmalloc,kdevname,__wait_on _buffer,lo ad_nls_def ault,__get _free_page s
...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
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_f
kmalloc,kdevname,__wait_on
...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
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?
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?
ASKER
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/tul ip.o -e
/lib/modules/2.2.6/net/tul ip.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/tul ip.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*
The depmod does complain about unresolved
symbols.
For example, my network card:
root@carhart.com:ttyp1 (Linux)# depmod /lib/modules/2.2.6/net/tul
/lib/modules/2.2.6/net/tul
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/tul
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*
ASKER
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/tul ip.o -e
/lib/modules/2.2.6/net/tul ip.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/tul ip.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*
The depmod does complain about unresolved
symbols.
For example, my network card:
root@carhart.com:ttyp1 (Linux)# depmod /lib/modules/2.2.6/net/tul
/lib/modules/2.2.6/net/tul
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/tul
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*
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.
ASKER
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
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
ASKER
Adjusted points from 75 to 200
ASKER
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
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
ASKER
Adjusted points from 200 to 300
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/lin ux, 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.
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
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
Your /usr/include/linux is a symlink to /usr/src/linux/include/lin
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.
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.
rm -rf /lib/modules/2.2.6
cd /usr/src/linux
make modules_install
depmod -a
see what that does.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You haven't just forgotten to do a 'make modules_install' after compiling, have you?