[SGVLUG] ubuntu and on board realtek NIC issues
matti
mathew_2000 at yahoo.com
Sun Jun 5 15:18:57 PDT 2011
Hi,
dmesg
shows:
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
..
r8169 0000:02:00.0: eth0: link down
lsmod
shows:
r8169 48022 0
attempted to
ifconfig eth0 up
didn't work.
further investigate reveals issues with default drivers,
and looks like I will have to download the vendors
drivers and compile to get it to work..
references below
also, discovered various users reported issues with
dual boot systems with this NIC series where windows
will disable the wake-on LAN and linux then boots
up without a working NIC. ( due to a recent Windows OS
patch. )
[ people either removed the windows patch, or are
playing with various power cycle/remove ethernet cable
procedures to reset the setting. ]
hopefully swapping out the module will solve the
issues. ( lol, hard to do apt-get without network
connectivity.. )
thanks
matti
====
http://wiki.hetzner.de/index.php/Installation_of_r8168_network_driver
Debian/Ubuntu
On Ubuntu the name of the header package depends on the selected kernel. It can
be for example 'linux-headers-generic' or 'linux-headers-server'. Both will
install headers only for the newest kernel. The following package will install
everything required for compilation (as root):
aptitude install build-essential linux-headers-`uname -r`
Getting the sources
cd /tmp
wget http://download.hetzner.de/drivers/r8168-8.019.00.tar.bz2
tar xjf r8168-8.019.00.tar.bz2
Compiling the driver
cd r8168-8.019.00
make al
Debian Lenny / Ubuntu 9.04
After installing the driver, update the module dependencies.
depmod -a
First the r8169 network driver needs to be blacklisted in order to prevent the
kernel from loading it. Note If additional NICs are installed in the server,
the module must not be blacklisted.
Ubuntu:
echo "blacklist r8169" >> /etc/modprobe.d/blacklist.conf
Debian:
echo "blacklist r8169" >> /etc/modprobe.d/blacklist
Then we force the kernel to include the driver in the initrd. This also
ensures, that the new r8168 module is loaded before the r8169 module.
echo "r8168" >> /etc/initramfs-tools/modules
And rebuild the initrd
update-initramfs -v -u -k `uname -r`
Now you can reboot to activate the driver.
After a kernel update the driver might need to be recompiled.]]
===
http://djlab.com/2010/10/fixing-rtl8111-8168b-driver-debian-ubuntu/
cd /usr/src
wget http://djlab.com/stuff/r8168-8.019.00.tar.bz2
tar jxvf r8168-8.019.00.tar.bz2
cd r8168-8.019.00
make clean modules
make install
depmod -a
echo "blacklist r8169" >> /etc/modprobe.d/blacklist-network
update-initramfs -u
Then, reboot the box and check which driver you’re using with ‘ethtool -i eth0′.
It should now be r8168 instead of r8169:
driver: r8168
version: 8.019.00-NAPI
firmware-version:
bus-info: 0000:01:00.0
Update – 2/22/2011
I’m re-posting Daniel’s awesome how-to for automation with DKMS using cut-and-
paste-ready code-blocks.
Make sure dkms and gcc are installed:
apt-get install dkms gcc
Create the dkms.conf:
echo 'PACKAGE_NAME=r8168
PACKAGE_VERSION=8.019.00
MAKE[0]="make"
BUILT_MODULE_NAME[0]=r8168
BUILT_MODULE_LOCATION[0]="src/"
DEST_MODULE_LOCATION[0]="/kernel/updates/dkms"
AUTOINSTALL="YES"' > /usr/src/r8168-8.019.00/dkms.conf
Then run:
dkms add -m r8168 -v 8.019.00
dkms build -m r8168 -v 8.019.00
dkms install -m r8168 -v 8.019.00
More information about the SGVLUG
mailing list