標籤:
安裝了ubuntu11.10之後,感覺上網啥的很不穩定,ssh串連內網機器也是一條命令卡半天,檢查了各方面的原因,網路沒有什麼問題,最後才發現是網卡驅動的問題,網上搜了一下是由於linux(ubuntu11.10)與r8168網卡不相容導致網路時斷時續的問題,那就直接更新網卡驅動吧,下面是網上搜到的解決辦法,貼出來,給同樣問題的同志門,搞定之後那個心情是一個爽啊,哈哈……
first:make user to root.(切換到root使用者)
$su -root
1) Check to see if the r8169 module is loaded(檢查r8169模組是否載入)
-> lsmod | grep r816
r8168 41104 0
-> lspci -v
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Subsystem: ASRock Incorporation Device 8168
Kernel driver in use: r8169
Kernel modules: r8169
2) Download the official Realtek driver (下載驅動包)
網卡驅動下載網址:http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=3&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8111B/RTL8168B/RTL8111/RTL8168
Realtek RTL8111/RTL8168
3) Remove the r8169 module(刪除r8169模組)
-> rmmod r8169
-> mv /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko ~/r8169.ko.backup
( the ` is a backtick, it is not an apostrophe or single quote )
4) Build the new r8168 module for the kernel(重建r8168模組到核心)
-> bzip2 -d r8168-8.009.00.tar.bz2 (這兒的包名稱有點兒變化,需要改動)
-> tar -xf r8168-8.009.00.tar
-> cd r8168-8.009.00
-> make clean modules
-> make install
5) Rebuild the kernel module dependencies (重建核心模組依賴項)
-> depmod -a
-> insmod ./src/r8168.ko
6) Remove the r8169 module from initrd (從initrd中去除r8169模組)
-> mv /initrd.img ~/initrd.img.backup
-> mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
7) Add r8168 module to /etc/modules
-> echo "r8168" >> /etc/modules
Reboot, You are done!
9) Examine that ONLY the r8168 module is loaded for the interface
-> lspci -v
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Subsystem: ASRock Incorporation Device 8168
Kernel driver in use: r8168
Kernel modules: r8168
Ubuntu11.10與r8168網卡不相容導致網路時斷時續的問題