FAI - Debian Lenny and Hardware with Multiple Ethernets

Carsten Aulbert carsten.aulbert at aei.mpg.de
Thu Jun 4 09:14:30 CEST 2009


Hi Stephan,

Stephan Hermann wrote:
> Debian Lenny has a problem when booting via PXE with hardware
> which have multiple ethernet devices.
> 
> E.g. a HP DL365 with 4 NICS, 2 On Board Broadcoms and a Dual NIC Intel
> Addon Card.
> 

Yes, as was discussed on this list some month ago already.
> 
> And the bugger line is "ipconfig -d ${DEVICE} | tee /netboot.config"
> 

yes, right now we are using this patch (nicked and modified from the
initramfs people):

diff -udwbr scripts.orig/functions scripts/functions

--- scripts.orig/functions      2009-06-02 10:25:03.000000000 +0200

+++ scripts/functions   2009-06-02 10:26:45.630145405 +0200

@@ -269,10 +269,26 @@

                ;;

        ""|on|any)

                # Bring up device

+               if [ -n "${DEVICE}" ]

+               then

                ipconfig -t 180 ${DEVICE}

+               else

+                    # In some cases, the first run doesn't work but the
second does immediately.
+                    ipconfig -t 60 all

+                    ipconfig -t 60 all

+                    ipconfig -t 60 all

+               fi
                ;;
        dhcp|bootp|rarp|both)
+               if [ -n "${DEVICE}" ]
+               then
                ipconfig -t 180 -c ${IPOPTS} -d ${DEVICE}
+               else
+                    # In some cases, the first run doesn't work but the
second does immediately.
+                    ipconfig -t 60 -c ${IPOPTS} -d all
+                    ipconfig -t 60 -c ${IPOPTS} -d all
+                    ipconfig -t 60 -c ${IPOPTS} -d all
+               fi
                ;;
        *)
                ipconfig -t 180 -d $IPOPTS
diff -udwbr scripts.orig/live scripts/live
--- scripts.orig/live   2009-06-02 10:26:59.000000000 +0200
+++ scripts/live        2009-06-02 10:27:56.044145437 +0200
@@ -699,11 +699,13 @@
                udevsettle
        fi

-       ipconfig ${DEVICE} | tee /netboot.config
+        # We don't necessarily know which NIC we should be using
+       DEVICE=''
+
+        # make /scripts/live use configure_networking just like
/scripts/nfs
+        # does; this sources /tmp/net-*.conf as well
+       configure_networking

-       # source relevant ipconfig output
-       OLDHOSTNAME=${HOSTNAME}
-       . /tmp/net-${DEVICE}.conf
        [ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
        export HOSTNAME


> In later versions of initramfs this functionality is removed completly
> (the live* scripts are not existing anymore). The new functionality
> (/usr/share/initramfs-tools/scripts/functions -> func:
> configure_networking) works as documented, so replacing the, above
> mentiond, line in the "live" script with the "case" switch from the
> "configure_networking" func (adding "| tee /netboot.config" ) from later
> versions of initramfs gives the wished result. 
> You can set now in the pxelinux.cfg/<IP/GGUID> files now the kernel
> append line to something like this: ip=:::::<your boot eth device with
> the right enumeration>:dhcp and the kernel will do the ipconfiguration
> without any problems after kernel boot.
> 
with the patch it seems that ip=dhpc is sufficient

> 
> If there is a possibilty to ship a fixed initramfs for lenny inside
> FAIs .deb repository I'm happy to fix this issue especially for FAI on
> lenny.

I would love to see that!
> 
> What should we do?

I don't know, I guess Thomas has to comment on this.

Cheers

Carsten


More information about the linux-fai mailing list