Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Konstantinos Agouros
In <20090620195455.7bb3f...@krikkit.digimed.co.uk> n...@digimed.co.uk (Neil 
Bothwick) writes:

>--Sig_/.KFxtR6gb4d9wtxUesjzg7P
>Content-Type: text/plain; charset=US-ASCII
>Content-Transfer-Encoding: quoted-printable

>On Sat, 20 Jun 2009 16:10:20 + (UTC), Konstantinos Agouros wrote:

>> In this case it is eth1 which doesn't work if tulip is loaded before
>> de4x5.=20

>As previously requested,please try to be a bit more specific than
>"doesn't work".
If Tulip is loaded first no packets get in and out of the card that
needs de4x5.

>> I also do not think that building the modules in the kernel
>> gives me any control over the order in which they are discovered.

>It does if you build one into the kernel. But this is a kludge, depending
>on the meaning of "doesn't work", either a udev rule or module options
>should handle this cleanly.
You can now hear me slapping my hand on my forehead. That's it! Why didn't
I think of it? Thanks!

Konstantin
-- 
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elw...@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185

"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres



Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Konstantinos Agouros
In <200906201954.32979.dirk.heinri...@online.de> dirk.heinri...@online.de (Dirk 
Heinrichs) writes:

>--nextPart1582325.iDhiksPzNm
>Content-Type: text/plain;
>  charset="utf-8"
>Content-Transfer-Encoding: quoted-printable
>Content-Disposition: inline

>Am Samstag 20 Juni 2009 18:10:20 schrieb Konstantinos Agouros:
>> >Naming makes the order irrelevant.
>>
>> How so?

>Because you no longer have eth0 and eth1 which may be one or the other NIC=
>=20
>depending on module load order or in which order the kernel discovers the=20
>NICs.

>Look at my example rules again: Each interface is identified by its MAC add=
>ress=20
>and given a unique name. Since the MAC addresses never change, the names wi=
>ll=20
>also stay the same, regardless of module loading order or interface discove=
>ry=20
>order.
Well I do not get to that since the modules are loaded in the wrong order. 
My problem is before these rules apply.

Konstantin

>HTH...

>   Dirk

>--nextPart1582325.iDhiksPzNm
>Content-Type: application/pgp-signature; name=signature.asc 
>Content-Description: This is a digitally signed message part.

>-BEGIN PGP SIGNATURE-
>Version: GnuPG v2.0.11 (GNU/Linux)

>iD8DBQBKPSJY8NVtnsLkZ7sRAg7/AJ9NCyaKEu6/1WAr2G9F3uI/i5iuIgCghgbU
>DuumeUViwvCvhsvNV52l/sE=
>=rG32
>-END PGP SIGNATURE-

>--nextPart1582325.iDhiksPzNm--

-- 
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elw...@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185

"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres



Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Neil Bothwick
On Sat, 20 Jun 2009 16:10:20 + (UTC), Konstantinos Agouros wrote:

> In this case it is eth1 which doesn't work if tulip is loaded before
> de4x5. 

As previously requested,please try to be a bit more specific than
"doesn't work".

> I also do not think that building the modules in the kernel
> gives me any control over the order in which they are discovered.

It does if you build one into the kernel. But this is a kludge, depending
on the meaning of "doesn't work", either a udev rule or module options
should handle this cleanly.


-- 
Neil Bothwick

How do a fool and his money GET together?


signature.asc
Description: PGP signature


Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Dirk Heinrichs
Am Samstag 20 Juni 2009 18:10:20 schrieb Konstantinos Agouros:
> >Naming makes the order irrelevant.
>
> How so?

Because you no longer have eth0 and eth1 which may be one or the other NIC 
depending on module load order or in which order the kernel discovers the 
NICs.

Look at my example rules again: Each interface is identified by its MAC address 
and given a unique name. Since the MAC addresses never change, the names will 
also stay the same, regardless of module loading order or interface discovery 
order.

HTH...

Dirk


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Konstantinos Agouros
In <200906201106.19482.dirk.heinri...@online.de> dirk.heinri...@online.de (Dirk 
Heinrichs) writes:

>--nextPart7888557.vBO4LPOhks
>Content-Type: text/plain;
>  charset="utf-8"
>Content-Transfer-Encoding: 7bit
>Content-Disposition: inline

>Am Samstag 20 Juni 2009 10:06:37 schrieb Neil Bothwick:

>> I thought that,but reading the question again, I don't think the problem
>> is naming, but the wrong driver claiming the card.

>Naming makes the order irrelevant.
How so?

In this case it is eth1 which doesn't work if tulip is loaded before de4x5.
I also do not think that building the modules in the kernel gives me any
control over the order in which they are discovered.

Regads,

Konstantin
-- 
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elw...@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185

"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres



Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Dirk Heinrichs
Am Samstag 20 Juni 2009 12:48:03 schrieb Neil Bothwick:

> True, but, depending on how you interpret the original question, it cold
> also mean that the wrong driver claiming the card means the interface
> doesn't come up. It all depends on how you interpret "this doesn't work",
> which isn't the most useful of descriptions.

Hmm, a driver usually only claims hardware it's written for.

> Perhaps the OP could clarify what is going wrong.

Yes, indeed.

Bye...

Dirk


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Neil Bothwick
On Sat, 20 Jun 2009 11:06:19 +0200, Dirk Heinrichs wrote:

> > I thought that,but reading the question again, I don't think the
> > problem is naming, but the wrong driver claiming the card.  
> 
> Naming makes the order irrelevant.

True, but, depending on how you interpret the original question, it cold
also mean that the wrong driver claiming the card means the interface
doesn't come up. It all depends on how you interpret "this doesn't work",
which isn't the most useful of descriptions.

If it is simply a naming problem, then udev persistent names are the
best solution, but I'm not sure that's the problem.

Perhaps the OP could clarify what is going wrong.


-- 
Neil Bothwick

After a few years in space, even Worf started to look good...


signature.asc
Description: PGP signature


Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Dirk Heinrichs
Am Samstag 20 Juni 2009 11:06:19 schrieb Dirk Heinrichs:
> Am Samstag 20 Juni 2009 10:06:37 schrieb Neil Bothwick:
> > I thought that,but reading the question again, I don't think the problem
> > is naming, but the wrong driver claiming the card.
>
> Naming makes the order irrelevant.

And, again, we're talking about a firewall. Giving meaningfull names to the 
NICs (for example: intranet, extranet) could also make the fw rules more 
readable.

Bye...

Dirk


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Dirk Heinrichs
Am Samstag 20 Juni 2009 10:06:37 schrieb Neil Bothwick:

> I thought that,but reading the question again, I don't think the problem
> is naming, but the wrong driver claiming the card.

Naming makes the order irrelevant.

Bye...

Dirk


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Dirk Heinrichs
Am Samstag 20 Juni 2009 09:42:43 schrieb Dale:
> Could he not just build the modules into the kernel and then not have to
> worry about the loading at all?  Heck, the only module I use is nvidia
> but it is not a "in kernel" option.

That doesn't prevent the order from changing with a different kernel version.

> Just a though.  He may have a reason for using modules.

Which one? Usually a firewall usually needs the NICs right after booting, so 
using modules doesn't make sense.

Bye...

Dirk


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Neil Bothwick
On Sat, 20 Jun 2009 09:25:49 +0200, Dirk Heinrichs wrote:

> > One of the NICs needs the de4x5 driver another the tulip one. Udev
> > loads tulip first, which then tries to claim the card the needs de4x5
> > but this does not work. So I have to manually set things straight
> > after- wards. Is there a way to force it to first load de4x5 and then
> > tulip? /etc/modules.autoload.d seems to be used too late.  
> 
> You can let udev assign persistant names to your network interfaces.

I thought that,but reading the question again, I don't think the problem
is naming, but the wrong driver claiming the card. I think the
solution may be to set rc_hotplug="!net.*" in /etc/conf.d/rc then the
modules will load in the order given in autoload.

Or check the modules' documentation for options that will control which
cards they attach themselves to, which would be a cleaner solution.


-- 
Neil Bothwick

File not found. Should I fake it? (Y/N)


signature.asc
Description: PGP signature


Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Dale
Dirk Heinrichs wrote:
> Am Samstag 20 Juni 2009 09:06:51 schrieb Konstantinos Agouros:
>   
>> Hi,
>>
>> I have a box that serves as a firewall and thus has different NICs.
>> However when booting I run into a problem:
>>
>> One of the NICs needs the de4x5 driver another the tulip one. Udev
>> loads tulip first, which then tries to claim the card the needs de4x5
>> but this does not work. So I have to manually set things straight after-
>> wards. Is there a way to force it to first load de4x5 and then tulip?
>> /etc/modules.autoload.d seems to be used too late.
>> 
>
> You can let udev assign persistant names to your network interfaces.
>
> # cat /etc/udev/rules.d/10-local.rules
> KERNEL=="eth*", ATTRS{address}=="00:1c:25:1a:ee:0c", NAME="lan0"
> KERNEL=="wlan*", ATTRS{address}=="00:1e:4c:37:39:41", NAME="wlan0"
>
> Then create the appropriate symlinks for them in /etc/init.d.
>
> HTH...
>
>   Dirk
>   

Could he not just build the modules into the kernel and then not have to
worry about the loading at all?  Heck, the only module I use is nvidia
but it is not a "in kernel" option.

Just a though.  He may have a reason for using modules.

Dale

:-)  :-) 



Re: [gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Dirk Heinrichs
Am Samstag 20 Juni 2009 09:06:51 schrieb Konstantinos Agouros:
> Hi,
>
> I have a box that serves as a firewall and thus has different NICs.
> However when booting I run into a problem:
>
> One of the NICs needs the de4x5 driver another the tulip one. Udev
> loads tulip first, which then tries to claim the card the needs de4x5
> but this does not work. So I have to manually set things straight after-
> wards. Is there a way to force it to first load de4x5 and then tulip?
> /etc/modules.autoload.d seems to be used too late.

You can let udev assign persistant names to your network interfaces.

# cat /etc/udev/rules.d/10-local.rules
KERNEL=="eth*", ATTRS{address}=="00:1c:25:1a:ee:0c", NAME="lan0"
KERNEL=="wlan*", ATTRS{address}=="00:1e:4c:37:39:41", NAME="wlan0"

Then create the appropriate symlinks for them in /etc/init.d.

HTH...

Dirk


signature.asc
Description: This is a digitally signed message part.


[gentoo-user] How to nail the order of modules loaded

2009-06-20 Thread Konstantinos Agouros
Hi,

I have a box that serves as a firewall and thus has different NICs.
However when booting I run into a problem:

One of the NICs needs the de4x5 driver another the tulip one. Udev
loads tulip first, which then tries to claim the card the needs de4x5
but this does not work. So I have to manually set things straight after-
wards. Is there a way to force it to first load de4x5 and then tulip?
/etc/modules.autoload.d seems to be used too late.

Regards,

Konstantin
-- 
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elw...@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185

"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres