dell optiplex 3010 安裝 redhat linux 5.4 解決方案

xfhuangfu發表於2015-07-04
dell optiplex 3010 單網路卡,硬碟500G ,在該主機上安裝 redhat linux 5.4(64位) ,
安裝完之後用 chkconfig --list iptables  檢查防火牆已經關閉,
但只能 ping 通 eth0 的ip地址,無法 ping 通 閘道器地址
下面是 /var/log/messages 的一些資訊
[root@spgztest log]# pwd
/var/log
[root@spgztest log]# tail -f messages
Sep 12 10:32:06 spgztest dhcpd:
Sep 12 10:32:06 spgztest dhcpd: Please do not under any circumstances send requests for
Sep 12 10:32:06 spgztest dhcpd: help directly to the authors of this software - please
Sep 12 10:32:06 spgztest dhcpd: send them to the appropriate mailing list as described in
Sep 12 10:32:06 spgztest dhcpd: the README file.
Sep 12 10:32:06 spgztest dhcpd:
Sep 12 10:32:06 spgztest dhcpd: exiting.
Sep 12 10:34:38 spgztest kernel: r8169: eth0: unknown chipset (mac_version = 1).
Sep 12 10:34:38 spgztest kernel: r8169: eth0: link down
Sep 12 10:34:38 spgztest kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready

在網上搜尋 “kernel: r8169: eth0: unknown chipset (mac_version = 1)” 之後,顯示 centos5.4 也出現了這種情況,
centos5.4 自帶的網路卡驅動會有點問題,需要安裝官方驅動
解決方案如下:
 
1:檢視乙太網卡的物理資訊是 RTL8111/8168B
[root@spgztest ~]# lspci |grep Ethernet
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
但是在裝置資訊中顯示的 eth0 卻是 r8169  ,因此初步判斷是 網路卡和驅動不一致 的問題
[root@spgztest ~]#
[root@spgztest ~]# cat /etc/modprobe.conf
alias eth0 r8169
alias scsi_hostadapter ahci
alias scsi_hostadapter1 usb-storage

[root@spgztest ~]# lsmod |grep 8169
r8169                  70853  0
mii                    38849  1 r8169
[root@spgztest ~]#
[root@spgztest ~]# rmmod r8169
[root@spgztest ~]# lsmod |grep 8169
[root@spgztest ~]#
[root@spgztest ~]# make clean modules
make: *** No rule to make target `clean'.  Stop.
[root@spgztest ~]#
在如下頁面下載linux網路卡驅動

下載 驅動包 r8168-8.036.00.tar.bz2 到 U 盤中,將 U 盤插入 linux伺服器,會直接彈出視窗,然後右鍵點選“copy”
[root@spgztest ~]# pwd
/root
[root@spgztest ~]# cp /media/GRMCULFRER_/r8168-8.036.00.tar.bz2 /root
[root@spgztest ~]#
[root@spgztest ~]#
[root@spgztest ~]# cd /root
[root@spgztest ~]# ls -lt r8168-8.036.00.tar.bz2
-rwxr-xr-x 1 root root 71053 Sep 12 11:18 r8168-8.036.00.tar.bz2
[root@spgztest ~]#
[root@spgztest ~]# chmod 777 r8168-8.036.00.tar.bz2
[root@spgztest ~]#
然後解壓安裝
[root@spgztest ~]# tar -xf r8168-8.036.00.tar.bz2
[root@spgztest ~]# ls
anaconda-ks.cfg  Desktop  install.log  install.log.syslog  r8168-8.036.00  r8168-8.036.00.tar.bz2
[root@spgztest ~]# cd r8168-8.036.00
[root@spgztest r8168-8.036.00]# ls
autorun.sh  Makefile  README  src
[root@spgztest r8168-8.036.00]# ./autorun.sh
Check old driver and unload it.
Build the module and install
In file included from /root/r8168-8.036.00/src/r8168_n.c:70:
/root/r8168-8.036.00/src/r8168.h:299:1: warning: "DMA_BIT_MASK" redefined
In file included from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:135,
                 from include/linux/pci.h:804,
                 from /root/r8168-8.036.00/src/r8168_n.c:40:
include/linux/dma-mapping.h:16:1: warning: this is the location of the previous definition
/root/r8168-8.036.00/src/r8168_n.c: In function 鈥榬tl8168_init_board鈥?
/root/r8168-8.036.00/src/r8168_n.c:15865: warning: left shift count >= width of type
/root/r8168-8.036.00/src/r8168_n.c: In function 鈥榬tl8168_init_one鈥?
/root/r8168-8.036.00/src/r8168_n.c:16186: warning: assignment discards qualifiers from pointer target type
/root/r8168-8.036.00/src/r8168_n.c: In function 鈥榬tl8168_poll鈥?
/root/r8168-8.036.00/src/r8168_n.c:18614: warning: cast from pointer to integer of different size
In file included from /root/r8168-8.036.00/src/r8168_asf.c:53:
/root/r8168-8.036.00/src/r8168.h:299:1: warning: "DMA_BIT_MASK" redefined
In file included from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:135,
                 from include/linux/pci.h:804,
                 from /root/r8168-8.036.00/src/r8168_asf.c:37:
include/linux/dma-mapping.h:16:1: warning: this is the location of the previous definition
In file included from /root/r8168-8.036.00/src/rtl_eeprom.c:43:
/root/r8168-8.036.00/src/r8168.h:299:1: warning: "DMA_BIT_MASK" redefined
In file included from include/linux/dmaengine.h:32,
                 from include/linux/skbuff.h:31,
                 from include/linux/if_ether.h:112,
                 from include/linux/netdevice.h:29,
                 from /root/r8168-8.036.00/src/rtl_eeprom.c:38:
include/linux/dma-mapping.h:16:1: warning: this is the location of the previous definition
In file included from /root/r8168-8.036.00/src/rtltool.c:8:
/root/r8168-8.036.00/src/r8168.h:299:1: warning: "DMA_BIT_MASK" redefined
In file included from include/asm-generic/pci-dma-compat.h:7,
                 from include/asm/pci.h:135,
                 from include/linux/pci.h:804,
                 from /root/r8168-8.036.00/src/rtltool.c:3:
include/linux/dma-mapping.h:16:1: warning: this is the location of the previous definition
Backup r8169.ko
rename r8169.ko to r8169.bak
DEPMOD 2.6.18-164.el5
load module r8168
Completed.
 
[root@spgztest r8168-8.036.00]# lsmod |grep r8168
r8168                 288608  0
[root@spgztest r8168-8.036.00]#
[root@spgztest r8168-8.036.00]# ifconfig
eth0      Link encap:Ethernet  HWaddr A4:1F:72:8A:4A:1C 
          inet addr:10.10.40.136  Bcast:10.10.40.255  Mask:255.255.255.0
          inet6 addr: fe80::a61f:72ff:fe8a:4a1c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:143 errors:0 dropped:0 overruns:0 frame.:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:14352 (14.0 KiB)  TX bytes:11458 (11.1 KiB)
          Interrupt:233 Base address:0x8000
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1778 errors:0 dropped:0 overruns:0 frame.:0
          TX packets:1778 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2446635 (2.3 MiB)  TX bytes:2446635 (2.3 MiB)
[root@spgztest r8168-8.036.00]#
[root@spgztest r8168-8.036.00]# ifconfig eth0 up

最後測試網路卡驅動是否安裝成功
[root@spgztest ~]#
[root@spgztest ~]#  ethtool -s eth0 speed 100 duplex full autoneg on
[root@spgztest ~]# ping 10.10.36.134
PING 10.10.36.134 (10.10.36.134) 56(84) bytes of data.
64 bytes from 10.10.36.134: icmp_seq=1 ttl=127 time=2.63 ms
64 bytes from 10.10.36.134: icmp_seq=2 ttl=127 time=0.312 ms
64 bytes from 10.10.36.134: icmp_seq=3 ttl=127 time=0.647 ms
64 bytes from 10.10.36.134: icmp_seq=4 ttl=127 time=0.499 ms

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28373936/viewspace-1722297/,如需轉載,請註明出處,否則將追究法律責任。

相關文章