Howto: create missing kernel modules

Discussion in 'Linux' started by ammoQ, Jul 31, 2008.

Thread Status:
Not open for further replies.
  1. ammoQ

    ammoQ

    Joined:
    Jul 30, 2008
    Messages:
    24
    Likes Received:
    0
    As you may have noticed, the original kernel source for the 2.6.23.9lw kernel is hard to get, and some usefull kernel modules are missing. In my case, I needed the modules tun.ko and ppp_mppe.ko to connect to remote servers through VPN.
    Here is how I solved it (most steps done on a faster Linux PC with all necessary tools installed). Some familarity with Linux is required to follow those steps, though.

    a) (other PC) get the vanila kernel source from http://www.kernel.org/pub/linux/kernel/ ... .9.tar.bz2
    b) (other PC) extract the source:
    Code:
    tar xjvf linux-2.6.23.9.tar.bz2 -C /usr/src
    c) (other PC) rename the source tree to match the kernel's name on the Aspire (otherwise the modules wont load):
    Code:
    cd /usr/src
    mv mv linux-2.6.23.9 linux-2.6.23.9lw
    d) (other PC) copy the config file from the Aspire One, found in /boot, to this machine, and rename it
    Code:
    cp config_080627 /usr/src/linux-2.6.23.9lw/.config
    e) (other PC) edit the config file to include the modules you need (or use make menuconfig)
    f) (other PC) make the kernel and the modules
    Code:
    cd /usr/src/linux-2.6.23.9lw
    make
    make modules
    g) (other PC/AspireOne) locate the new modules, copy them (and only them, not the whole kernel!) to the Aspire one and into the modules directory
    Code:
    cp tun.ko /lib/modules/2.6.23.9lw/kernel/drivers/net/
    h) (AspireOne) run depmod
     
    ammoQ, Jul 31, 2008
    #1
  2. ammoQ

    callmeishmael

    Joined:
    Jul 18, 2008
    Messages:
    16
    Likes Received:
    0
    Hi,
    would you please so kind to post the vpn modules? Did you also manage to connect to a windows based network (pptp)?
    I tried to do this but did not want to screw the default installation.

    Thanks
    Ishmael
     
    callmeishmael, Jul 31, 2008
    #2
  3. ammoQ

    ammoQ

    Joined:
    Jul 30, 2008
    Messages:
    24
    Likes Received:
    0
    Yes, connection over pptp works with that. You have to install the neccessary packages for pptp, though, install pptp-1.7.1-3.fc8 from the fedora core 8 repository.

    Warning: installing kernel modules from an untrustworthy source (like me) is not the most sensible thing to do. Do it at your own risk
    Anyway, if you want to take the risk, here we go:
    http://members.chello.at/erich.kitzmuel ... pp_mppe.ko
    http://members.chello.at/erich.kitzmuel ... own/tun.ko

    tun.ko is not necessary for pptp connections; I need that so phionvpn works.
     
    ammoQ, Jul 31, 2008
    #3
  4. ammoQ

    callmeishmael

    Joined:
    Jul 18, 2008
    Messages:
    16
    Likes Received:
    0
    Thanks, I already did that, but I realized that the tun module was missing

    Yes, I know, and I'll take the risk :D , however your consideration is definely true.
    Actually, re-reading your post I realized that I can use a different PC to compile the kernel, so maybe I'll do it. I asked the module just because I did not want to install all dev stuff and wait ages for the kernel to compile in the AcerOne.

    Thanks once again
     
    callmeishmael, Jul 31, 2008
    #4
  5. ammoQ

    ammoQ

    Joined:
    Jul 30, 2008
    Messages:
    24
    Likes Received:
    0
    I don't think you need tun.ko. More likely, you need ppp_mppe.ko. It depends on the server configuration.
     
    ammoQ, Jul 31, 2008
    #5
  6. ammoQ

    egesia

    Joined:
    Jul 18, 2008
    Messages:
    11
    Likes Received:
    0
    Is tun module required for installing hamachi vpn, am i right ?
    And what about bluetooth dongles and full samba sharing functionality, are some modules required ?

    Thank you
    egesia
     
    egesia, Jul 31, 2008
    #6
  7. ammoQ

    ammoQ

    Joined:
    Jul 30, 2008
    Messages:
    24
    Likes Received:
    0
    Probably, but I don't know hamachi. If it complains about the TUN or TAP device (missing, inaccessible etc.), you need tun.ko.
    I don't know if the required modules are missing in the Aspire One default installation. When I connect my bluetooth dongle, it loads the uhci_hcd kernel module, so at least this one is already there. If you have another PC with Linux where USB-Bluetooth works, check which kernel modules it loads when you connect the dongle.
     
    ammoQ, Jul 31, 2008
    #7
  8. ammoQ

    thx1138

    Joined:
    Jul 30, 2008
    Messages:
    4
    Likes Received:
    0
    Thanks for posting the tun module. That saves a lot of compiling time, and fixed my vpnc install beautifully.
     
    thx1138, Jul 31, 2008
    #8
  9. ammoQ

    callmeishmael

    Joined:
    Jul 18, 2008
    Messages:
    16
    Likes Received:
    0
    Hi ammoQ,
    I don't want to abuse of your help but i wonder if you can post the exacts steps you followed to setup and start a vpn connection to a windows lan.
    I installed pptpconfig package using from fedora core 8 repos, but once i start it i get the windows but all the text in it is replaced by small squares, i.e. i can't read anything so I can't use it.
    In my Ubuntu install on a different pc, I used the network manager vpn plugin, but in linpus it's not available.
    So, I followed the steps in this tutorial, but being Debian based I can't use the pon/poff scripts which are required to start the connection.
    I'm stuck :)
     
    callmeishmael, Jul 31, 2008
    #9
  10. ammoQ

    ammoQ

    Joined:
    Jul 30, 2008
    Messages:
    24
    Likes Received:
    0
    Hi callmeishal, I simply used the config files from another computer.
    /etc/ppp/options.pptp looks like that:
    Code:
    user "ammoQ"
    lock
    noauth
    refuse-eap
    refuse-chap
    refuse-mschap
    nobsdcomp
    nodeflate
    #mppe required,stateless
    require-mppe-128
    
    /etc/ppp/chap-secrets looks like that:
    Code:
    # Secrets for authentication using CHAP
    # client        server  secret                  IP addresses
    ammoQ        myserver         "obviouslyFake"       *
    
    to start the connection, i run
    Code:
    pptp myserver.mydomain.com file /etc/ppp/options.pptp
    sleep 10
    route add -net 10.1.2.0 netmask 255.255.255.0 gw 10.1.2.10
    
     
    ammoQ, Jul 31, 2008
    #10
  11. ammoQ

    callmeishmael

    Joined:
    Jul 18, 2008
    Messages:
    16
    Likes Received:
    0
    Thank you so much, AmmoQ, worked like a charm :)
     
    callmeishmael, Aug 4, 2008
    #11
  12. ammoQ

    anz

    Joined:
    Aug 4, 2008
    Messages:
    18
    Likes Received:
    0
    Thanks alot, Dear ammoQ for that HowTo! vpnc runs without /dev/net/tun-not-found-error!
    G R E A T !
     
    anz, Aug 4, 2008
    #12
  13. ammoQ

    Chicksaw

    Joined:
    Aug 1, 2008
    Messages:
    10
    Likes Received:
    0
    whats "depmod"? because i can't find that command.
     
    Chicksaw, Aug 4, 2008
    #13
  14. ammoQ

    callmeishmael

    Joined:
    Jul 18, 2008
    Messages:
    16
    Likes Received:
    0
    when you load a module,using modprobe it may happen to have another module to be loaded before,in order to have your module to work. It's called module dependence. The depmod command rebuilds the dependency database, and basically tells the kernel which modules have to be loaded before the newly added modules.
    It has to be run as root, and that's the reason you don't find that command as a normal user: the default paths are different.
    You have to become root with the "su" command, and typing your password. Then run the depmod command.
     
    callmeishmael, Aug 4, 2008
    #14
  15. ammoQ

    Chicksaw

    Joined:
    Aug 1, 2008
    Messages:
    10
    Likes Received:
    0
    Oke thx i got it working :) at last!
    Can u use vpnc with a .conf file or a link or something because vpnc-connect doesn't work.
     
    Chicksaw, Aug 4, 2008
    #15
  16. ammoQ

    janss

    Joined:
    Jul 23, 2008
    Messages:
    220
    Likes Received:
    0
    Topic moved to the "How to Guides" section
     
    janss, Aug 5, 2008
    #16
  17. ammoQ

    dazoe

    Joined:
    Aug 4, 2008
    Messages:
    2
    Likes Received:
    0
    What about compiling modules that must be downloaded? how do you compile agenst a kernel that is not running on a machine?
     
    dazoe, Aug 9, 2008
    #17
  18. ammoQ

    Wicked

    Joined:
    Jul 31, 2008
    Messages:
    32
    Likes Received:
    0
    Location:
    French in Finland
    Sorry to interfere in your very serious work related issues, but could anyone build the modules for USB gamepads ?

    I plan to use my one as a portable classic gaming device (when I'm not working...) and I was sad to see gamepads weren't supported out of the box.

    Tried to follow that howto to do it myself but failed...
     
    Wicked, Aug 17, 2008
    #18
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Thread Status:
Not open for further replies.