[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#573007: NIC r8169 doesn t start at restart on kernel linux-image-2.6.32-trunk-686 (workaround)



Another possible workaround (didn't try Ben's one, I just discovered
this thread today):

Save the attached script in /root/bin/flo-check-network-connections
(using bash because of $RANDOM). Change the line:

  interfaces="eth0 eth1"

to list the interfaces that have the problem (and that you want to be
up; if you have unused interfaces that are managed by the buggy driver,
you can omit them from the list)

In /etc/init.d/networking, replace the line:

	if ifup -a; then

with

	if ifup -a; /root/bin/flo-check-network-connections; then

The script, when called, does the following:

  - if all listed interfaces are up and have a proper "inet addr"
    setting according to ifconfig, do nothing;

  - otherwise, try to fix the problem by doing several
    "modprobe -r r8169; modprobe r8169" in a row, followed by an
    "ifdown -a / ifup -a" sequence (you may pass arguments to the script
    here, that are passed along to ifup and ifdown).

    Yes, this clunky procedure does work for me, contrary to the
    "cold boot / wait 30 s" workaround I found in another bug report;
    you might want to modify $max_attempts, which I have set to 15 by
    default; it has always worked for me in about 1-3 attempts.

The script returns exit status 0 if success (i.e., the listed interfaces
are properly initialized [maybe were already so before the script was
called]), 1 otherwise.

Of course, this is just a workaround for an annoying problem. A proper
fix in the kernel would be most welcome. :-)

HTH.

-- 
Florent



Reply to: