LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1914|回复: 6

跪求真正高高手解决这个e1000网卡的问题

[复制链接]
发表于 2009-1-5 15:30:17 | 显示全部楼层 |阅读模式
Linux 版本:  
RH-AS4
Linux核心:2.6.9-34.ELsmp/2.6.9-34.EL

硬件平台:
泰安(TAYAN)5396主板
主板集成2块intel e1000 网卡

安装完Linux后,发现在/lib/modules/2.6.9-34.ELsmp/kernel/drivers/net/e1000下有默认的e1000驱动e1000.ko
但用"kudzu"检测不到网卡,"lsmod"没有发现网卡驱动模块,于是动态加载"modprobe e1000",之后用"lsmod"可以发现网卡驱动
***************************************************************
[root@host ~]# lsmod |grep e1000
e1000                 166400  0
***************************************************************
但用"kudzu"仍然检测不到网卡.于是从intel下载e1000驱动,重新编译,也是同样的结果.

上google找解决方法,根据"Hacking initrd.img - 添加网卡驱动,网络安装 Linux"的指导,修改了/lib/modules/2.6.9-34.ELsmp下的modules.alias,modules.pcimap,把vendor code和device code加入之后重启动系统,可以探测到新硬件,但是提示
***************************************************************
弹出环回接口:                                             [  确定  ]
弹出界面 eth0: e1000 设备 eth0 似乎不在。将要推迟它的初始化。
                                                           [失败]
弹出界面 eth1: e1000 设备 eth1 似乎不在。将要推迟它的初始化。
                                                           [失败]
***************************************************************
也就是目前我这里的情况.发现在/etc/sysconfig/hwconf里有network的相关内容,但是没有mac地址的表述,hwconf内容如下:
***************************************************************
class: NETWORK
bus: PCI
detached: 0
device: eth1
driver: e1000
desc: "Intel Corporation Enterprise Southbridge DPT LAN Copper"
vendorId: 8086
deviceId: 1096
subVendorId: 8086
subDeviceId: 0000
pciType: 1
pcidom:    0
pcibus:  f
pcidev:  0
pcifn:  1
-
class: NETWORK
bus: PCI
detached: 0
device: eth0
driver: e1000
desc: "Intel Corporation Enterprise Southbridge DPT LAN Copper"
vendorId: 8086
deviceId: 1096
subVendorId: 8086
subDeviceId: 0000
pciType: 1
pcidom:    0
pcibus:  f
pcidev:  0
pcifn:  0
-
***************************************************************
我手动在hwconf添加了"network.hwaddr:***(mac)***",发现一执行"kudzu"命令后,手动添加的mac地址就被删除掉了."service network restart"结果如下:
***************************************************************
[root@host ~]# service network restart
关闭环回接口:                                             [  确定  ]
设置网络参数:                                             [  确定  ]
弹出环回接口:                                             [  确定  ]
弹出界面 eth0: e1000 设备 eth0 似乎不在。将要推迟它的初始化。
                                                           [失败]
弹出界面 eth1: e1000 设备 eth1 似乎不在。将要推迟它的初始化。
                                                           [失败]
***************************************************************
下面贴出dmesg,lspci,ifconfig,lsmod的内容和/etc/sysconfig/hwconf,/etc/sysconfig/network-scripts/ifcfg-eth0,/etc/sysconfig/network-scripts/ifcfg-eth1,/etc/modprobe.conf的内容:

***************************************************************
[root@host ~]# dmesg |grep eth
divert: not allocating divert_blk for non-ethernet device lo
divert: not allocating divert_blk for non-ethernet device sit0
***没有eth0\eth1的相关内容***
***************************************************************

***************************************************************
[root@host ~]# lspci |grep LAN
0f:00.0 Ethernet controller: Intel Corporation Enterprise Southbridge DPT LAN Copper (rev 01)
0f:00.1 Ethernet controller: Intel Corporation Enterprise Southbridge DPT LAN Copper (rev 01)
***可以找到2块网卡***
***************************************************************

***************************************************************
[root@host ~]# ifconfig -a
lo        Link encapocal 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:2493 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2493 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4048636 (3.8 MiB)  TX bytes:4048636 (3.8 MiB)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
***没有eth0\eth1的相关内容***
***************************************************************

***************************************************************
[root@host ~]# lsmod |grep e1000
e1000                 166400  0
***驱动已加载***
***************************************************************

***************************************************************
***modprobe.conf***
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptscsih
alias scsi_hostadapter2 ata_piix
alias snd-card-0 snd-azx
options snd-card-0 index=0  
install snd-azx /sbin/modprobe --ignore-install snd-azx && /usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-azx { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-azx
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
alias eth0 e1000
alias eth1 e1000
***************************************************************

***************************************************************
***hwconf***
class: NETWORK
bus: PCI
detached: 0
device: eth1
driver: e1000
desc: "Intel Corporation Enterprise Southbridge DPT LAN Copper"
vendorId: 8086
deviceId: 1096
subVendorId: 8086
subDeviceId: 0000
pciType: 1
pcidom:    0
pcibus:  f
pcidev:  0
pcifn:  1
-
class: NETWORK
bus: PCI
detached: 0
device: eth0
driver: e1000
desc: "Intel Corporation Enterprise Southbridge DPT LAN Copper"
vendorId: 8086
deviceId: 1096
subVendorId: 8086
subDeviceId: 0000
pciType: 1
pcidom:    0
pcibus:  f
pcidev:  0
pcifn:  0
-
***ifcfg-eth0***
# Intel Corporation Enterprise Southbridge DPT LAN Copper
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.7.142
NETMASK=255.255.255.0
GATEWAY=192.168.7.254
***ifcfg-eth1***
# Intel Corporation Enterprise Southbridge DPT LAN Copper
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.7.141
NETMASK=255.255.255.0
GATEWAY=192.168.7.254
***************************************************************
 楼主| 发表于 2009-1-5 15:33:46 | 显示全部楼层
请大家看看是哪里出了问题,lspci是可以找到网卡,但dmesg是没有eth0、eth1的信息。
回复 支持 反对

使用道具 举报

发表于 2009-1-5 17:16:56 | 显示全部楼层
给一个比较弱智的回答,重启下linux试试看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-5 18:16:04 | 显示全部楼层
重启自然就会有“kudzu”的过程,此时hwconf的会自己更新,虽然界面并不提示,之前设置的mac地址被删除了。我感觉hwconf里没有mac地址只是一个表面现象的反应,根本原因是在"dmesg"里没有发现“eth0”的相关内容。

另外,补充1点内容:
我也修改了/usr/share/hwdata/pcitable里的内容,把vendor code和device code的内容加入了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-6 12:19:47 | 显示全部楼层
帖出lspci -v的内容:拜托了!

0f:00.0 Ethernet controller: Intel Corporation Enterprise Southbridge DPT LAN Copper (rev 01)
        Subsystem: Intel Corporation: Unknown device 0000
        Flags: bus master, fast devsel, latency 0, IRQ 217
        Memory at d0200000 (32-bit, non-prefetchable) [size=128K]
        I/O ports at 3000
        Capabilities: [c8] Power Management version 2
        Capabilities: [d0] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-
        Capabilities: [e0] Express Endpoint IRQ 0
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number e6-54-b2-ff-ff-81-e0-00

0f:00.1 Ethernet controller: Intel Corporation Enterprise Southbridge DPT LAN Copper (rev 01)
        Subsystem: Intel Corporation: Unknown device 0000
        Flags: bus master, fast devsel, latency 0, IRQ 225
        Memory at d0220000 (32-bit, non-prefetchable) [size=128K]
        I/O ports at 3020
        Capabilities: [c8] Power Management version 2
        Capabilities: [d0] Message Signalled Interrupts: 64bit+ Queue=0/0 Enable-
        Capabilities: [e0] Express Endpoint IRQ 0
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number e6-54-b2-ff-ff-81-e0-00
回复 支持 反对

使用道具 举报

发表于 2009-1-7 11:07:13 | 显示全部楼层
2.6.9 kernel? very old. maybe this kernel can't better support your net card.
changing a new kernel to try. example 2.6.27 kernel
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-7 14:05:48 | 显示全部楼层
intel e1000是个非常常见的网卡。并且网卡驱动是动态加载的,并没有编译在内核中。
我认为内核的版本不应该是问题。
特殊的地方的是这个泰安主板,是服务器级的主板,在windows下网卡都是在驱动了主板之后才驱动的。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表