FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

LinkBack Thread Tools
Old 03-28-2010, 04:33 PM
Florent Rougon
Default 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


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. :-)



To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87d3yo9ziv.fsf@zita.maison">http://lists.debian.org/87d3yo9ziv.fsf@zita.maison
Old 03-28-2010, 04:40 PM
Florent Rougon
Default Bug#573007: NIC r8169 doesn t start at restart on kernel linux-image-2.6.32-trunk-686 (workaround)

Would be even better with the script actually attached...

#! /bin/bash

interfaces="eth0 eth1"

for attempt in $(seq 1 $max_attempts); do
for intf in $interfaces; do
ifconfig $intf | grep >/dev/null "^[[:space:]]*inet addr:"
|| { all_intf_ok=0; break; }

[ $all_intf_ok -eq 1 ] && { exit_status=0; break; }

echo "Ethernet interfaces not properly initialized."
"Trying to fix that (attempt $attempt)..."
n=$(echo "($RANDOM % 3) + 2" | bc)
for i in $(seq 1 $n); do
modprobe -r r8169; modprobe r8169

ifdown -a "$@"
ifup -a "$@"

exit $exit_status

Thread Tools

All times are GMT. The time now is 09:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org