Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running Ubuntu:

#lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.4 LTS
Release:    12.04
Codename:   precise## Heading ##

And:

Kernel info:

3.8.0-38-generic #56~precise1-Ubuntu SMP Thu Mar 13 16:23:47 UTC 2014 i686 i686 i386 GNU/Linux

I would like to know that whether this running kernel was build using CONFIG_MODVERSIONS or not. Any command for that?

Update

#/usr/src/ubuntu-precise# make oldconfig | grep CONFIG_MODVERSIONS
/boot/config-3.8.0-38-generic:3420:warning: symbol value 'm' invalid for SPI_PXA2XX_PCI
/boot/config-3.8.0-38-generic:4222:warning: symbol value 'm' invalid for VIDEO_EM28XX_RC
/boot/config-3.8.0-38-generic:6694:warning: symbol value 'm' invalid for NFS_V3
/boot/config-3.8.0-38-generic:6696:warning: symbol value 'm' invalid for NFS_V4

no progress after this . hanging here for more than 30 minutes

share|improve this question
    
Only suggestion: download kernel sources and type make oldconfig | grep CONFIG_MODVERSIONS. –  Danatela Apr 21 at 9:27
    
@Danatela What exactly this command would do? –  user2799508 Apr 21 at 10:01
    
It will generate kernel config based on your existing config and echo it to the console. Then it will grep line containing CONFIG_MODVERSIONS. Probably, if you have this option enabled, you will have CONFIG_MODVERSIONS=y output. –  Danatela Apr 21 at 10:04
    
@Danatela on an i3 processor it is taking more than 20 minutes, and still continuing, is it normal? –  user2799508 Apr 21 at 10:16
    
What is the stage? Downloading or configuring? –  Danatela Apr 21 at 10:26

3 Answers 3

Try this:

  1. Install the dpkg-dev package. This is needed for step 2.

    sudo apt-get install dpkg-dev
    
  2. Download the source of the kernel you are currently using:

    apt-get source linux-image-$(uname -r)
    

    That will create a directory in your current directory that contains the kernel source. For example, on 13.10 running kernel version 3.11.0-12-generic, it created:

    /home/terdon/linux-3.11.0
    
  3. Check if the option is set in the ~/linux-3.11.0/.config file:

    $ grep CONFIG_MODVERSIONS  ~/linux-3.11.0/debian.master/config/config.common.ubuntu
    CONFIG_MODVERSIONS=y
    

As you can see above, the option is set to y (on) by default so presumably, unless you have compiled your own kernel, the option is set in the kernel you are using.

share|improve this answer
    
using apt-get , I got "linux-lts-raring-3.8.0" what is raring ? is there anything wrong in having this? –  user2799508 Apr 22 at 6:18
    
I got y (on), but I do not know whether it was 'on' during compilation or not. In fact I dont know who installed linux on this system. So is there any other way without any presumption to this value in a running kernel ? –  user2799508 Apr 22 at 6:24

try grep MODVERSIONS /boot/config-$(uname -r)

if you get CONFIG_MODVERSIONS=y

then its on.

share|improve this answer

In the case of 2.4 kernel, the CONFIG_MODVERSIONS can be found in the Makefile in folder /usr/src/linux-2.4.x-xx/.

Another symptom is an error message such as unresolved symbol reference for which one of the possible reason can be - CONFIG_MODVERSIONS is enabled, but the LKM is not compiled likewise.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.