Loading the tun module - Slackware

This is a discussion on Loading the tun module - Slackware ; I am running Slackware 12 under a 2.6.22.6 kernel, and I would like to have the tun module automatically loaded when trying to start a VPN connection. Is there a udev incantation that can get this done? I know how ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Loading the tun module

  1. Loading the tun module

    I am running Slackware 12 under a 2.6.22.6 kernel, and I would
    like to have the tun module automatically loaded when trying to start a
    VPN connection. Is there a udev incantation that can get this done? I
    know how to get the tun module loaded at boot time, by adding a relevant
    entry to /etc/rc.modules; but again, I wonder if udev could do it for me
    instead?

    Incidentally, a similar question applies to the loop module: I
    would like for it to autoload when attempt to mount an ISO image.


  2. Re: Loading the tun module

    H.K. Kingston-Smith wrote:
    > I am running Slackware 12 under a 2.6.22.6 kernel, and I would
    > like to have the tun module automatically loaded when trying to start a
    > VPN connection. Is there a udev incantation that can get this done? I
    > know how to get the tun module loaded at boot time, by adding a relevant
    > entry to /etc/rc.modules; but again, I wonder if udev could do it for me
    > instead?
    >
    > Incidentally, a similar question applies to the loop module: I
    > would like for it to autoload when attempt to mount an ISO image.
    >


    If you've got "automatic kernel module loading" set in your kernel it
    should load the module(s) by itself.

    For tun make sure you've got the line:

    alias char-major-10-200 tun

    in /etc/modules.conf

    and it can't hurt to try running 'depmod -a'

  3. Re: Loading the tun module

    On Tue, 25 Sep 2007 22:23:45 -0500, Chris Sorenson wrote:

    > H.K. Kingston-Smith wrote:
    >> I am running Slackware 12 under a 2.6.22.6 kernel, and I would
    >> like to have the tun module automatically loaded when trying to start a
    >> VPN connection. Is there a udev incantation that can get this done? I
    >> know how to get the tun module loaded at boot time, by adding a
    >> relevant entry to /etc/rc.modules; but again, I wonder if udev could do
    >> it for me instead?
    >>
    >> Incidentally, a similar question applies to the loop module: I
    >> would like for it to autoload when attempt to mount an ISO image.
    >>
    >>

    > If you've got "automatic kernel module loading" set in your kernel it
    > should load the module(s) by itself.


    I have that, and it does load quite a few other modules when some
    applications make use of it. But, it just does not load tun.

    > For tun make sure you've got the line:
    >
    > alias char-major-10-200 tun
    >
    > in /etc/modules.conf
    >
    > and it can't hurt to try running 'depmod -a'


    Well, there is no /etc/modules.conf in Slackware 12. I used /etc/
    modprobe.conf instead, and it made no difference: tun is still not
    getting automatically loaded.




  4. Re: Loading the tun module

    "H.K. Kingston-Smith" (HKK-S@yahoo.com) writes:
    > On Tue, 25 Sep 2007 22:23:45 -0500, Chris Sorenson wrote:
    >
    >> H.K. Kingston-Smith wrote:
    >>> I am running Slackware 12 under a 2.6.22.6 kernel, and I would
    >>> like to have the tun module automatically loaded when trying to start a
    >>> VPN connection. Is there a udev incantation that can get this done? I
    >>> know how to get the tun module loaded at boot time, by adding a
    >>> relevant entry to /etc/rc.modules; but again, I wonder if udev could do
    >>> it for me instead?
    >>>
    >>> Incidentally, a similar question applies to the loop module: I
    >>> would like for it to autoload when attempt to mount an ISO image.
    >>>
    >>>

    >> If you've got "automatic kernel module loading" set in your kernel it
    >> should load the module(s) by itself.

    >
    > I have that, and it does load quite a few other modules when some
    > applications make use of it. But, it just does not load tun.
    >
    >> For tun make sure you've got the line:
    >>
    >> alias char-major-10-200 tun
    >>
    >> in /etc/modules.conf
    >>
    >> and it can't hurt to try running 'depmod -a'

    >
    > Well, there is no /etc/modules.conf in Slackware 12. I used /etc/
    > modprobe.conf instead, and it made no difference: tun is still not
    > getting automatically loaded.
    >

    I don't know the difference offhand, but I note that /etc/modules.conf
    was empty in Slack 10, which I'm using, and so is modprobe.conf.

    Create a modules.conf and use that. That it didn't exist may not
    matter since there was nothing in there by default.

    Michael


  5. Re: Loading the tun module

    On 2007-09-27, Michael Black wrote:
    >
    > I don't know the difference offhand, but I note that /etc/modules.conf
    > was empty in Slack 10, which I'm using, and so is modprobe.conf.
    >
    > Create a modules.conf and use that. That it didn't exist may not
    > matter since there was nothing in there by default.



    The old modutils is no longer part of the module-init-tools
    package in Slackware, as modutils is/was for 2.4.x kernels,
    and /etc/modules.conf was read by it. Using a 2.6.x kernel in
    Slackware, that file will be just as useful as /etc/RPM-REPOLIST
    (does that actually exist? ;-))), as module-init-tools looks at
    the individual files in /etc/modprobe.d/ first, and then at the
    content of /etc/modprobe.conf. The usage of /etc/modprobe.conf
    is supposedly deprecated, which is why /etc/modprobe.d/* is looked
    at first (and why /etc/modprobe.d/modules.conf is a symlink to
    /etc/modules.conf - at some point, the upstream module-init-tools
    is likely to no longer even look outside the /etc/modprobe.d/
    directory).

    RW

+ Reply to Thread