Hi Bas:
On Wed, Sep 24, 2008 at 1:02 PM, Bas van der Vlies <[EMAIL PROTECTED]> wrote:
> We have the same problem at our clusters (DELL 1950) with broadcom
> network interfaces. We now use udev rules in combination with
> biosdevname utility and give our network cards logical names instead
> of eth0/eth1:
>
> The problem is that for the BIOS eth0 is different then for the linux
> kernel. That is why we use biosdevname.
>
> We have Debian installed on our hosts.
>
> This how we solve it in a post-install script:
> {{{
> create_persistent_ethernet_devices()
> {
> #BIOSDEVNAME=/usr/sbin/biosdevname
> BIOSDEVNAME=`which biosdevname`
> if [ ! -x $BIOSDEVNAME ]
> then
> echo "NOT configuring ethernet devices, missing
> program: $BIOSDEVNAME"
> exit 1
> fi
>
> PERSISTENT_NET_RULES=/etc/udev/rules.d/z25_persistent-net.rules
>
> ADMIN_NETWORK=`$BIOSDEVNAME -i eth0`
> USER_NETWORK=`$BIOSDEVNAME -i eth1`
> IFCONFIG=ifconfig
>
> ADMIN_MAC=`$IFCONFIG $ADMIN_NETWORK | grep HWaddr | awk
> '{ print tolower($NF) }'`
> USER_MAC=`$IFCONFIG $USER_NETWORK | grep HWaddr | awk
> '{ print tolower($NF) }'`
>
> # Write persistent network names
> #
> cat > $PERSISTENT_NET_RULES << EOF
> # This file was automatically generated by the SYSTEMIMAGER (BvdV)
> #
> # program, probably run by the persistent-net-generator.rules rules
> file.
> #
> # You can modify it, as long as you keep each rule on a single line.
> # MAC addresses must be written in lowercase.
>
> # PCI device 0x14e4:0x164c (bnx2)
> SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="$ADMIN_MAC",
> NAME="admin"
>
> # PCI device 0x14e4:0x164c (bnx2)
> SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="$USER_MAC", NAME="gb2"
>
> EOF
> }}}
>
> systemimager network config:
> {{{
> two_interfaces()
> {
>
> systemconfigurator --confighw --confignet --stdin <<EOL || shellout
>
> [NETWORK]
> HOSTNAME = <name>
>
> [INTERFACE0]
> DEVICE = admin
> TYPE = dhcp
>
> [INTERFACE1]
> DEVICE = gb2
> TYPE = static
> IPADDR = 10.0.0.1
> NETMASK = 255.255.255.0
>
> EOL
> }
> }}}
>
> It is just an example!
Thanks for this!
It would be great if you can put this in our Wiki such that it can
benefit users in the future:
http://wiki.systemimager.org
Cheers,
Bernard
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users