title: insmod failing to insert a really simple module
body: <p>I'm trying to compile and insert a module into my kernel, but I keep getting this error:</p>
  
  <pre><code>insmod: error inserting 'hello.ko': -1 Invalid module format
  </code></pre>
  
  <p>I followed the steps described in this tutorial over here:<a href="http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html" rel="noreferrer">http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html</a>. And everything seemed to make sense and worked. I got my sample module compiled BUT there was a warning that might be an important lead to why this thing is failing. The warning was this one:</p>
  
  <blockquote>
    <p>WARNING: Symbol version dump /usr/src/linux-3.0.0/Module.symvers
               is missing; modules will have no dependencies and modversions.</p>
  </blockquote>
  
  <p>I frankly don't know why the Module.symvers file is not there. The <strong>/usr/src/linux-3.0.0</strong> directory and all its contents were created by me after I dowloaded the sources using this command:</p>
  
  <blockquote>
    <p>apt-get source linux-image-$(uname -r)</p>
  </blockquote>
  
  <p>That was in fact the only step of that tutorial that I didn't follow, because I could not find the exact sources for my kernel (3.0.0-32-generic) and thought the aptitude tool would sort that out to me.</p>
  
  <p>And I'm running Ubuntu on a 64 bits machine by the way, here's the uname -a output:</p>
  
  <blockquote>
    <p>Linux vega 3.0.0-32-generic #51-Ubuntu SMP Thu Mar 21 15:50:59 UTC
    2013 x86_64 x86_64 x86_64 GNU/Linux</p>
  </blockquote>
  
  <p>Any suggestions as to what to try next? any recommended reading?</p>
  
  <p>PS1.
  After some more research I confirmed I'm running the 3.0.0-32-generic. update-grub returned:</p>
  
  <pre><code>Found linux image: /boot/vmlinuz-3.0.0-32-generic
  </code></pre>
  
  <p>But after issuing a sudo make oldconfig and checking the resulting .config file I get this interesting line:</p>
  
  <pre><code>CONFIG_VERSION_SIGNATURE="Ubuntu 3.0.0-32.51-generic 3.0.69"
  </code></pre>
  
  <p>Does that qualify as a missmatch?</p>
  
  <p>PS2. dmesg outputs this:</p>
  
  <pre><code>[    5.869900] ADDRCONF(NETDEV_UP): eth1: link is not ready
  [    6.144304] EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro
  [    6.368936] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
  [    6.433919] vesafb: mode is 640x480x32, linelength=2560, pages=0
  [    6.433921] vesafb: scrolling: redraw
  [    6.433923] vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0
  [    6.435424] vesafb: framebuffer at 0xb0000000, mapped to 0xffffc90012800000, using 1216k, total 1216k
  [    6.435516] Console: switching to colour frame buffer device 80x30
  [    6.443104] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)
  [    6.450198] fb0: VESA VGA frame buffer device
  [    8.884523] e1000e: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
  [    8.885845] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
  [   12.611236] init: ssh main process (762) terminated with status 255
  [   12.624381] init: failsafe main process (752) killed by TERM signal
  [   12.634739] type=1400 audit(1373412287.107:8): apparmor="STATUS" operation="profile_load" name="/usr/sbin/tcpdump" pid=852 comm="apparmor_parser"
  [   12.634873] type=1400 audit(1373412287.107:9): apparmor="STATUS" operation="profile_replace" name="/sbin/dhclient" pid=851 comm="apparmor_parser"
  [   12.635180] type=1400 audit(1373412287.107:10): apparmor="STATUS" operation="profile_replace" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=851 comm="apparmor_parser"
  [   12.635403] type=1400 audit(1373412287.107:11): apparmor="STATUS" operation="profile_replace" name="/usr/lib/connman/scripts/dhclient-script" pid=851 comm="apparmor_parser"
  [   19.390991] eth1: no IPv6 routers present
  [  576.758697] hello: no symbol version for module_layout
  </code></pre>